Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords

This commit is contained in:
Janek Bevendorff 2017-03-10 15:58:42 +01:00
parent 4c0e2af6e3
commit 8d487d31a4
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
109 changed files with 274 additions and 274 deletions

View file

@ -120,7 +120,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
QFileInfo fileInfo(fileName);
QString canonicalFilePath = fileInfo.canonicalFilePath();
if (canonicalFilePath.isEmpty()) {
Q_EMIT messageGlobal(tr("File not found!"), MessageWidget::Error);
emit messageGlobal(tr("File not found!"), MessageWidget::Error);
return;
}
@ -141,7 +141,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
if (!file.open(QIODevice::ReadWrite)) {
if (!file.open(QIODevice::ReadOnly)) {
// can't open
Q_EMIT messageGlobal(
emit messageGlobal(
tr("Unable to open the database.").append("\n").append(file.errorString()), MessageWidget::Error);
return;
}
@ -198,7 +198,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
insertDatabase(db, dbStruct);
if (dbStruct.readOnly) {
Q_EMIT messageTab(tr("File opened in read only mode."), MessageWidget::Warning);
emit messageTab(tr("File opened in read only mode."), MessageWidget::Warning);
}
updateLastDatabases(dbStruct.filePath);
@ -209,7 +209,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
else {
dbStruct.dbWidget->switchToOpenDatabase(dbStruct.filePath);
}
Q_EMIT messageDismissGlobal();
emit messageDismissGlobal();
}
void DatabaseTabWidget::mergeDatabase()
@ -314,7 +314,7 @@ void DatabaseTabWidget::deleteDatabase(Database* db)
delete db;
if (emitDatabaseWithFileClosed) {
Q_EMIT databaseWithFileClosed(filePath);
emit databaseWithFileClosed(filePath);
}
}
@ -340,7 +340,7 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
// write the database to the file
m_writer.writeDatabase(&saveFile, db);
if (m_writer.hasError()) {
Q_EMIT messageTab(tr("Writing the database failed.").append("\n")
emit messageTab(tr("Writing the database failed.").append("\n")
.append(m_writer.errorString()), MessageWidget::Error);
return false;
}
@ -350,17 +350,17 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
dbStruct.modified = false;
dbStruct.dbWidget->databaseSaved();
updateTabName(db);
Q_EMIT messageDismissTab();
emit messageDismissTab();
return true;
}
else {
Q_EMIT messageTab(tr("Writing the database failed.").append("\n")
emit messageTab(tr("Writing the database failed.").append("\n")
.append(saveFile.errorString()), MessageWidget::Error);
return false;
}
}
else {
Q_EMIT messageTab(tr("Writing the database failed.").append("\n")
emit messageTab(tr("Writing the database failed.").append("\n")
.append(saveFile.errorString()), MessageWidget::Error);
return false;
}
@ -503,7 +503,7 @@ void DatabaseTabWidget::exportToCsv()
CsvExporter csvExporter;
if (!csvExporter.exportDatabase(fileName, db)) {
Q_EMIT messageGlobal(
emit messageGlobal(
tr("Writing the CSV file failed.").append("\n")
.append(csvExporter.errorString()), MessageWidget::Error);
}
@ -565,7 +565,7 @@ void DatabaseTabWidget::updateTabName(Database* db)
}
setTabText(index, tabName);
Q_EMIT tabNameChanged();
emit tabNameChanged();
}
void DatabaseTabWidget::updateTabNameFromDbSender()
@ -745,7 +745,7 @@ void DatabaseTabWidget::lockDatabases()
// database has changed so we can't use the db variable anymore
updateTabName(dbWidget->database());
Q_EMIT databaseLocked(dbWidget);
emit databaseLocked(dbWidget);
}
}
@ -803,12 +803,12 @@ void DatabaseTabWidget::changeDatabase(Database* newDb, bool unsavedChanges)
void DatabaseTabWidget::emitActivateDatabaseChanged()
{
Q_EMIT activateDatabaseChanged(currentDatabaseWidget());
emit activateDatabaseChanged(currentDatabaseWidget());
}
void DatabaseTabWidget::emitDatabaseUnlockedFromDbWidgetSender()
{
Q_EMIT databaseUnlocked(static_cast<DatabaseWidget*>(sender()));
emit databaseUnlocked(static_cast<DatabaseWidget*>(sender()));
}
void DatabaseTabWidget::connectDatabase(Database* newDb, Database* oldDb)