mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-22 20:51:23 -05:00
clang-tidy: use nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
7e1d980d08
commit
a4d4adb1f6
@ -98,7 +98,7 @@ QSharedPointer<PasswordGenerator> Generate::createGenerator(QSharedPointer<QComm
|
|||||||
passwordGenerator->setLength(passwordLength.toInt());
|
passwordGenerator->setLength(passwordLength.toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
PasswordGenerator::CharClasses classes = 0x0;
|
PasswordGenerator::CharClasses classes;
|
||||||
|
|
||||||
if (parser->isSet(Generate::LowerCaseOption)) {
|
if (parser->isSet(Generate::LowerCaseOption)) {
|
||||||
classes |= PasswordGenerator::LowerLetters;
|
classes |= PasswordGenerator::LowerLetters;
|
||||||
@ -116,7 +116,7 @@ QSharedPointer<PasswordGenerator> Generate::createGenerator(QSharedPointer<QComm
|
|||||||
classes |= PasswordGenerator::EASCII;
|
classes |= PasswordGenerator::EASCII;
|
||||||
}
|
}
|
||||||
|
|
||||||
PasswordGenerator::GeneratorFlags flags = 0x0;
|
PasswordGenerator::GeneratorFlags flags;
|
||||||
|
|
||||||
if (parser->isSet(Generate::ExcludeSimilarCharsOption)) {
|
if (parser->isSet(Generate::ExcludeSimilarCharsOption)) {
|
||||||
flags |= PasswordGenerator::ExcludeLookAlike;
|
flags |= PasswordGenerator::ExcludeLookAlike;
|
||||||
|
@ -119,14 +119,14 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Constructs a KMessageWidget with the specified @p parent.
|
* Constructs a KMessageWidget with the specified @p parent.
|
||||||
*/
|
*/
|
||||||
explicit KMessageWidget(QWidget *parent = 0);
|
explicit KMessageWidget(QWidget* parent = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a KMessageWidget with the specified @p parent and
|
* Constructs a KMessageWidget with the specified @p parent and
|
||||||
* contents @p text.
|
* contents @p text.
|
||||||
*/
|
*/
|
||||||
explicit KMessageWidget(const QString &text, QWidget *parent = 0);
|
explicit KMessageWidget(const QString& text, QWidget* parent = nullptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
*/
|
*/
|
||||||
|
@ -164,7 +164,7 @@ void TestEntryModel::testAttachmentsModel()
|
|||||||
|
|
||||||
QSignalSpy spyReset(model, SIGNAL(modelReset()));
|
QSignalSpy spyReset(model, SIGNAL(modelReset()));
|
||||||
entryAttachments->clear();
|
entryAttachments->clear();
|
||||||
model->setEntryAttachments(0);
|
model->setEntryAttachments(nullptr);
|
||||||
QCOMPARE(spyReset.count(), 2);
|
QCOMPARE(spyReset.count(), 2);
|
||||||
QCOMPARE(model->rowCount(), 0);
|
QCOMPARE(model->rowCount(), 0);
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ void TestEntryModel::testAttributesModel()
|
|||||||
|
|
||||||
QSignalSpy spyReset(model, SIGNAL(modelReset()));
|
QSignalSpy spyReset(model, SIGNAL(modelReset()));
|
||||||
entryAttributes->clear();
|
entryAttributes->clear();
|
||||||
model->setEntryAttributes(0);
|
model->setEntryAttributes(nullptr);
|
||||||
QCOMPARE(spyReset.count(), 2);
|
QCOMPARE(spyReset.count(), 2);
|
||||||
QCOMPARE(model->rowCount(), 0);
|
QCOMPARE(model->rowCount(), 0);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void TestKeePass1Reader::initTestCase()
|
|||||||
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/basic.kdb");
|
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/basic.kdb");
|
||||||
|
|
||||||
KeePass1Reader reader;
|
KeePass1Reader reader;
|
||||||
m_db = reader.readDatabase(filename, "masterpw", 0);
|
m_db = reader.readDatabase(filename, "masterpw", nullptr);
|
||||||
QVERIFY(m_db);
|
QVERIFY(m_db);
|
||||||
QVERIFY(!reader.hasError());
|
QVERIFY(!reader.hasError());
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ void TestKeePass1Reader::testTwofish()
|
|||||||
|
|
||||||
QString dbFilename = QString("%1/%2.kdb").arg(QString(KEEPASSX_TEST_DATA_DIR), name);
|
QString dbFilename = QString("%1/%2.kdb").arg(QString(KEEPASSX_TEST_DATA_DIR), name);
|
||||||
|
|
||||||
auto db = reader.readDatabase(dbFilename, "masterpw", 0);
|
auto db = reader.readDatabase(dbFilename, "masterpw", nullptr);
|
||||||
QVERIFY(db);
|
QVERIFY(db);
|
||||||
QVERIFY(!reader.hasError());
|
QVERIFY(!reader.hasError());
|
||||||
QCOMPARE(db->rootGroup()->children().size(), 1);
|
QCOMPARE(db->rootGroup()->children().size(), 1);
|
||||||
@ -229,7 +229,7 @@ void TestKeePass1Reader::testCP1252Password()
|
|||||||
QString dbFilename = QString("%1/%2.kdb").arg(QString(KEEPASSX_TEST_DATA_DIR), name);
|
QString dbFilename = QString("%1/%2.kdb").arg(QString(KEEPASSX_TEST_DATA_DIR), name);
|
||||||
QString password = QString::fromUtf8("\xe2\x80\x9e\x70\x61\x73\x73\x77\x6f\x72\x64\xe2\x80\x9d");
|
QString password = QString::fromUtf8("\xe2\x80\x9e\x70\x61\x73\x73\x77\x6f\x72\x64\xe2\x80\x9d");
|
||||||
|
|
||||||
auto db = reader.readDatabase(dbFilename, password, 0);
|
auto db = reader.readDatabase(dbFilename, password, nullptr);
|
||||||
QVERIFY(db);
|
QVERIFY(db);
|
||||||
QVERIFY(!reader.hasError());
|
QVERIFY(!reader.hasError());
|
||||||
QCOMPARE(db->rootGroup()->children().size(), 1);
|
QCOMPARE(db->rootGroup()->children().size(), 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user