Skip to content

Commit

Permalink
FdoSecrets: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetf committed Nov 13, 2020
1 parent 000e182 commit f5caf39
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
11 changes: 5 additions & 6 deletions src/fdosecrets/objects/Collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "fdosecrets/objects/Session.h"

#include "core/Config.h"
#include "core/Database.h"
#include "core/Tools.h"
#include "gui/DatabaseTabWidget.h"
#include "gui/DatabaseWidget.h"
Expand Down Expand Up @@ -330,12 +329,12 @@ namespace FdoSecrets
itemPath = attributes.value(ItemAttributes::PathKey);

// check existing item using attributes
auto existings = searchItems(attributes);
if (existings.isError()) {
return existings;
auto existing = searchItems(attributes);
if (existing.isError()) {
return existing;
}
if (!existings.value().isEmpty() && replace) {
item = existings.value().front();
if (!existing.value().isEmpty() && replace) {
item = existing.value().front();
newlyCreated = false;
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/fdosecrets/objects/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace FdoSecrets
: DBusObject(nullptr)
, m_plugin(plugin)
, m_databases(std::move(dbTabs))
, m_insdieEnsureDefaultAlias(false)
, m_insideEnsureDefaultAlias(false)
, m_serviceWatcher(nullptr)
{
connect(
Expand Down Expand Up @@ -176,19 +176,19 @@ namespace FdoSecrets

void Service::ensureDefaultAlias()
{
if (m_insdieEnsureDefaultAlias) {
if (m_insideEnsureDefaultAlias) {
return;
}

m_insdieEnsureDefaultAlias = true;
m_insideEnsureDefaultAlias = true;

auto coll = findCollection(m_databases->currentDatabaseWidget());
if (coll) {
// adding alias will automatically remove the association with previous collection.
coll->addAlias(DEFAULT_ALIAS).okOrDie();
}

m_insdieEnsureDefaultAlias = false;
m_insideEnsureDefaultAlias = false;
}

void Service::dbusServiceUnregistered(const QString& service)
Expand Down
2 changes: 1 addition & 1 deletion src/fdosecrets/objects/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace FdoSecrets
QList<Session*> m_sessions;
QHash<QString, Session*> m_peerToSession;

bool m_insdieEnsureDefaultAlias;
bool m_insideEnsureDefaultAlias;

std::unique_ptr<QDBusServiceWatcher> m_serviceWatcher;
};
Expand Down
4 changes: 2 additions & 2 deletions src/fdosecrets/objects/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace FdoSecrets
{

QHash<QString, QVariant> Session::negoniationState;
QHash<QString, QVariant> Session::negotiationState;

Session* Session::Create(std::unique_ptr<CipherPair>&& cipher, const QString& peer, Service* parent)
{
Expand Down Expand Up @@ -57,7 +57,7 @@ namespace FdoSecrets

void Session::CleanupNegotiation(const QString& peer)
{
negoniationState.remove(peer);
negotiationState.remove(peer);
}

DBusReturn<void> Session::close()
Expand Down
4 changes: 2 additions & 2 deletions src/fdosecrets/objects/Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace FdoSecrets
public:
static std::unique_ptr<CipherPair> CreateCiphers(const QString& peer,
const QString& algorithm,
const QVariant& intpu,
const QVariant& input,
QVariant& output,
bool& incomplete);
static void CleanupNegotiation(const QString& peer);
Expand Down Expand Up @@ -99,7 +99,7 @@ namespace FdoSecrets
QString m_peer;
QUuid m_id;

static QHash<QString, QVariant> negoniationState;
static QHash<QString, QVariant> negotiationState;
};

} // namespace FdoSecrets
Expand Down
4 changes: 2 additions & 2 deletions tests/gui/TestGuiFdoSecrets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void TestGuiFdoSecrets::init()
m_dbWidget = m_tabWidget->currentDatabaseWidget();
m_db = m_dbWidget->database();

// by default expsoe the root group
// by default expose the root group
FdoSecrets::settings()->setExposedGroup(m_db, m_db->rootGroup()->uuid());
QVERIFY(m_dbWidget->save());
}
Expand Down Expand Up @@ -1047,7 +1047,7 @@ void TestGuiFdoSecrets::testExposeSubgroup()
QCOMPARE(exposedEntries, subgroup->entries());
}

void TestGuiFdoSecrets::testModifiyingExposedGroup()
void TestGuiFdoSecrets::testModifyingExposedGroup()
{
// test when exposed group is removed the collection is not exposed anymore
auto subgroup = m_db->rootGroup()->findGroupByPath("/Homebanking");
Expand Down
2 changes: 1 addition & 1 deletion tests/gui/TestGuiFdoSecrets.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private slots:
void testDefaultAliasAlwaysPresent();

void testExposeSubgroup();
void testModifiyingExposedGroup();
void testModifyingExposedGroup();

protected slots:
void createDatabaseCallback();
Expand Down

0 comments on commit f5caf39

Please sign in to comment.