mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Use C++11 keywords directly.
This commit is contained in:
parent
dc7b6623a9
commit
6e45cf0dab
@ -79,7 +79,7 @@ void AutoType::loadPlugin(const QString& pluginPath)
|
||||
QObject* pluginInstance = m_pluginLoader->instance();
|
||||
if (pluginInstance) {
|
||||
m_plugin = qobject_cast<AutoTypePlatformInterface*>(pluginInstance);
|
||||
m_executor = Q_NULLPTR;
|
||||
m_executor = nullptr;
|
||||
|
||||
if (m_plugin) {
|
||||
if (m_plugin->isAvailable()) {
|
||||
|
@ -33,24 +33,24 @@ class AutoTypePlatformTest : public QObject,
|
||||
Q_INTERFACES(AutoTypePlatformInterface AutoTypeTestInterface)
|
||||
|
||||
public:
|
||||
QString keyToString(Qt::Key key) Q_DECL_OVERRIDE;
|
||||
QString keyToString(Qt::Key key) override;
|
||||
|
||||
bool isAvailable() Q_DECL_OVERRIDE;
|
||||
QStringList windowTitles() Q_DECL_OVERRIDE;
|
||||
WId activeWindow() Q_DECL_OVERRIDE;
|
||||
QString activeWindowTitle() Q_DECL_OVERRIDE;
|
||||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
|
||||
int platformEventFilter(void* event) Q_DECL_OVERRIDE;
|
||||
int initialTimeout() Q_DECL_OVERRIDE;
|
||||
bool raiseWindow(WId window) Q_DECL_OVERRIDE;
|
||||
AutoTypeExecutor* createExecutor() Q_DECL_OVERRIDE;
|
||||
bool isAvailable() override;
|
||||
QStringList windowTitles() override;
|
||||
WId activeWindow() override;
|
||||
QString activeWindowTitle() override;
|
||||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
int platformEventFilter(void* event) override;
|
||||
int initialTimeout() override;
|
||||
bool raiseWindow(WId window) override;
|
||||
AutoTypeExecutor* createExecutor() override;
|
||||
|
||||
void setActiveWindowTitle(const QString& title) Q_DECL_OVERRIDE;
|
||||
void setActiveWindowTitle(const QString& title) override;
|
||||
|
||||
QString actionChars() Q_DECL_OVERRIDE;
|
||||
int actionCount() Q_DECL_OVERRIDE;
|
||||
void clearActions() Q_DECL_OVERRIDE;
|
||||
QString actionChars() override;
|
||||
int actionCount() override;
|
||||
void clearActions() override;
|
||||
|
||||
void addActionChar(AutoTypeChar* action);
|
||||
void addActionKey(AutoTypeKey* action);
|
||||
@ -69,8 +69,8 @@ class AutoTypeExecturorTest : public AutoTypeExecutor
|
||||
public:
|
||||
explicit AutoTypeExecturorTest(AutoTypePlatformTest* platform);
|
||||
|
||||
void execChar(AutoTypeChar* action) Q_DECL_OVERRIDE;
|
||||
void execKey(AutoTypeKey* action) Q_DECL_OVERRIDE;
|
||||
void execChar(AutoTypeChar* action) override;
|
||||
void execKey(AutoTypeKey* action) override;
|
||||
|
||||
private:
|
||||
AutoTypePlatformTest* const m_platform;
|
||||
|
@ -578,7 +578,7 @@ XkbDescPtr AutoTypePlatformX11::getKeyboard()
|
||||
XID keyboard_id = XkbUseCoreKbd;
|
||||
XDeviceInfo* devices = XListInputDevices(m_dpy, &num_devices);
|
||||
if (!devices) {
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_devices; i++) {
|
||||
|
@ -124,8 +124,8 @@ class AutoTypeExecturorX11 : public AutoTypeExecutor
|
||||
public:
|
||||
explicit AutoTypeExecturorX11(AutoTypePlatformX11* platform);
|
||||
|
||||
void execChar(AutoTypeChar* action) Q_DECL_OVERRIDE;
|
||||
void execKey(AutoTypeKey* action) Q_DECL_OVERRIDE;
|
||||
void execChar(AutoTypeChar* action) override;
|
||||
void execKey(AutoTypeKey* action) override;
|
||||
|
||||
private:
|
||||
AutoTypePlatformX11* const m_platform;
|
||||
|
@ -76,7 +76,7 @@ Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& ke
|
||||
"You can import it by clicking on Database > 'Import KeePass 1 database'.\n"
|
||||
"This is a one-way migration. You won't be able to open the imported "
|
||||
"database with the old KeePassX 0.4 version."));
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
else if (!ok || signature2 != KeePass2::SIGNATURE_2) {
|
||||
raiseError(tr("Not a KeePass database."));
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
|
||||
Application::Application(int& argc, char** argv)
|
||||
: QApplication(argc, argv)
|
||||
, m_mainWindow(Q_NULLPTR)
|
||||
, m_mainWindow(nullptr)
|
||||
{
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
|
||||
installNativeEventFilter(new XcbEventFilter());
|
||||
|
@ -333,7 +333,7 @@ bool DatabaseTabWidget::saveDatabaseAs(Database* db)
|
||||
}
|
||||
QString fileName = fileDialog()->getSaveFileName(this, tr("Save database as"),
|
||||
oldFileName, tr("KeePass 2 Database").append(" (*.kdbx)"),
|
||||
Q_NULLPTR, 0, "kdbx");
|
||||
nullptr, 0, "kdbx");
|
||||
if (!fileName.isEmpty()) {
|
||||
QFileInfo fileInfo(fileName);
|
||||
QString lockFilePath;
|
||||
@ -454,7 +454,7 @@ void DatabaseTabWidget::exportToCsv()
|
||||
|
||||
QString fileName = fileDialog()->getSaveFileName(this, tr("Export database to CSV file"),
|
||||
QString(), tr("CSV file").append(" (*.csv)"),
|
||||
Q_NULLPTR, 0, "csv");
|
||||
nullptr, 0, "csv");
|
||||
if (fileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ private Q_SLOTS:
|
||||
void modelReset();
|
||||
|
||||
protected:
|
||||
void dragMoveEvent(QDragMoveEvent* event) Q_DECL_OVERRIDE;
|
||||
void dragMoveEvent(QDragMoveEvent* event) override;
|
||||
|
||||
private:
|
||||
void recInitExpanded(Group* group);
|
||||
|
@ -31,8 +31,8 @@ public:
|
||||
HashedBlockStream(QIODevice* baseDevice, qint32 blockSize);
|
||||
~HashedBlockStream();
|
||||
|
||||
bool reset() Q_DECL_OVERRIDE;
|
||||
void close() Q_DECL_OVERRIDE;
|
||||
bool reset() override;
|
||||
void close() override;
|
||||
|
||||
protected:
|
||||
qint64 readData(char* data, qint64 maxSize) override;
|
||||
|
Loading…
Reference in New Issue
Block a user