Run code formatter

This commit is contained in:
Jonathan White 2019-06-18 18:23:12 -04:00
parent 09181fab13
commit 1e915eef89
3 changed files with 25 additions and 27 deletions

View file

@ -489,8 +489,7 @@ void BrowserService::addEntry(const QString& id,
config.save(entry); config.save(entry);
} }
BrowserService::ReturnValue BrowserService::ReturnValue BrowserService::updateEntry(const QString& id,
BrowserService::updateEntry(const QString& id,
const QString& uuid, const QString& uuid,
const QString& login, const QString& login,
const QString& password, const QString& password,
@ -877,8 +876,7 @@ Group* BrowserService::getDefaultEntryGroup(const QSharedPointer<Database>& sele
return nullptr; return nullptr;
} }
const QString groupName = const QString groupName = QLatin1String(KEEPASSXCBROWSER_GROUP_NAME);
QLatin1String(KEEPASSXCBROWSER_GROUP_NAME);
for (auto* g : rootGroup->groupsRecursive(true)) { for (auto* g : rootGroup->groupsRecursive(true)) {
if (g->name() == groupName && !g->isRecycled()) { if (g->name() == groupName && !g->isRecycled()) {

View file

@ -17,9 +17,9 @@
#include "TestBrowser.h" #include "TestBrowser.h"
#include "TestGlobal.h" #include "TestGlobal.h"
#include "browser/BrowserSettings.h"
#include "crypto/Crypto.h" #include "crypto/Crypto.h"
#include "sodium/crypto_box.h" #include "sodium/crypto_box.h"
#include "browser/BrowserSettings.h"
#include <QString> #include <QString>
QTEST_GUILESS_MAIN(TestBrowser) QTEST_GUILESS_MAIN(TestBrowser)
@ -40,7 +40,6 @@ void TestBrowser::initTestCase()
void TestBrowser::cleanupTestCase() void TestBrowser::cleanupTestCase()
{ {
} }
/** /**
@ -275,7 +274,8 @@ void TestBrowser::testSortEntries()
} }
browserSettings()->setBestMatchOnly(false); browserSettings()->setBestMatchOnly(false);
auto result = m_browserService->sortEntries(entries, "github.com", "https://github.com/session"); // entries, host, submitUrl auto result =
m_browserService->sortEntries(entries, "github.com", "https://github.com/session"); // entries, host, submitUrl
QCOMPARE(result.size(), 10); QCOMPARE(result.size(), 10);
QCOMPARE(result[0]->username(), QString("User 2")); QCOMPARE(result[0]->username(), QString("User 2"));
QCOMPARE(result[0]->url(), QString("https://github.com/")); QCOMPARE(result[0]->url(), QString("https://github.com/"));