Skip to content

Commit 2d4a157

Browse files
nogeenharrieclaudecoderabbitai[bot]CodeRabbit
authored
refactor(test/mainwindow): use QDir::filePath() for .gpg-id path construction (#1491)
* refactor(test/mainwindow): use QDir::filePath() for .gpg-id path construction QDir(dir).filePath(name) handles separator normalisation intrinsically and is more idiomatic Qt than manual string concatenation + cleanPath. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * style: apply clang-format to tst_mainwindow.cpp Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
1 parent 87bf346 commit 2d4a157

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/auto/mainwindow/tst_mainwindow.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ void tst_mainwindow::initTestCase() {
6565
QVERIFY2(m_storeDir.isValid(), "temp store dir must be created");
6666

6767
// Minimal valid pass store: just a .gpg-id file
68-
QFile gpgId(QDir::cleanPath(m_storeDir.path() + QStringLiteral("/.gpg-id")));
68+
QFile gpgId(QDir::cleanPath(
69+
QDir(m_storeDir.path()).filePath(QStringLiteral(".gpg-id"))));
6970
QVERIFY2(gpgId.open(QIODevice::WriteOnly), ".gpg-id must be writable");
7071
gpgId.write("0000000000000000\n");
7172
gpgId.close();

0 commit comments

Comments
 (0)