GUI: compile without emit/signals/slots/foreach keywords

Instead use the variants not clashing with keywords/function names
current and future C++ standards introduce (Q_EMIT/Q_SIGNALS/Q_SLOTS).
This commit is contained in:
Moritz Bunkus 2020-04-12 14:49:59 +02:00
parent 4f67ea89fc
commit a1b00956cf
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
100 changed files with 218 additions and 217 deletions

View File

@ -142,6 +142,7 @@ def setup_globals
cflags_common += " -march=i686" if $building_for[:windows] && /i686/.match(c(:host))
cflags_common += " -fPIC " if c?(:USE_QT) && !$building_for[:windows]
cflags_common += " -DQT_STATICPLUGIN" if c?(:USE_QT) && $building_for[:windows]
cflags_common += " -DQT_NO_KEYWORDS" if c?(:USE_QT)
cflags_common += " -DUSE_DRMINGW -I#{c(:DRMINGW_PATH)}/include" if c?(:USE_DRMINGW) && $building_for[:windows]
cflags_common += " -DMTX_APPIMAGE" if c?(:APPIMAGE_BUILD) && !$building_for[:windows]

View File

@ -469,21 +469,21 @@ App::handleCommandLineArgumentsLocally() {
auto p = p_func();
if (!p->m_cliParser->configFiles().isEmpty())
emit openConfigFilesRequested(p->m_cliParser->configFiles());
Q_EMIT openConfigFilesRequested(p->m_cliParser->configFiles());
if (!p->m_cliParser->addToMerge().isEmpty())
emit addingFilesToMergeRequested(p->m_cliParser->addToMerge());
Q_EMIT addingFilesToMergeRequested(p->m_cliParser->addToMerge());
if (!p->m_cliParser->runInfoOn().isEmpty())
emit runningInfoOnRequested(p->m_cliParser->runInfoOn());
Q_EMIT runningInfoOnRequested(p->m_cliParser->runInfoOn());
if (!p->m_cliParser->editChapters().isEmpty())
emit editingChaptersRequested(p->m_cliParser->editChapters());
Q_EMIT editingChaptersRequested(p->m_cliParser->editChapters());
if (!p->m_cliParser->editHeaders().isEmpty())
emit editingHeadersRequested(p->m_cliParser->editHeaders());
Q_EMIT editingHeadersRequested(p->m_cliParser->editHeaders());
emit toolRequested(p->m_cliParser->requestedTool());
Q_EMIT toolRequested(p->m_cliParser->requestedTool());
}
void

View File

@ -74,7 +74,7 @@ public:
Util::NetworkAccessManager &networkAccessManager();
signals:
Q_SIGNALS:
void addingFilesToMergeRequested(QStringList const &fileNames);
void editingChaptersRequested(QStringList const &fileNames);
void editingHeadersRequested(QStringList const &fileNames);
@ -82,7 +82,7 @@ signals:
void runningInfoOnRequested(QStringList const &fileNames);
void toolRequested(ToolBase *tool);
public slots:
public Q_SLOTS:
void saveSettings() const;
void receiveInstanceCommunication();
void setupAppearance();

View File

@ -29,7 +29,7 @@ public:
QString language() const;
OptQString country() const;
public slots:
public Q_SLOTS:
void verifyStartTimestamp();
protected:

View File

@ -45,7 +45,7 @@ public:
void setupUi(QStringList const &additionalLanguages, QStringList const &additionalCountryCodes);
void retranslateUi();
public slots:
public Q_SLOTS:
void verifyOptions();
protected:

View File

@ -220,7 +220,7 @@ Tab::retranslateUi() {
p->chapterModel->retranslateUi();
p->nameModel->retranslateUi();
emit titleChanged();
Q_EMIT titleChanged();
}
void
@ -370,12 +370,12 @@ Tab::loadFromMatroskaFile(QString const &fileName,
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(text).exec();
if (!append)
emit removeThisTab();
Q_EMIT removeThisTab();
return {};
}
if (!append && !readFileEndTimestampForMatroska(*analyzer)) {
emit removeThisTab();
Q_EMIT removeThisTab();
return {};
}
@ -393,7 +393,7 @@ Tab::loadFromMatroskaFile(QString const &fileName,
if (!chapters) {
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(QY("The file you tried to open (%1) could not be read successfully.").arg(fileName)).exec();
if (!append)
emit removeThisTab();
Q_EMIT removeThisTab();
return {};
}
@ -461,14 +461,14 @@ Tab::loadFromChapterFile(QString const &fileName,
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(message).exec();
if (!append)
emit removeThisTab();
Q_EMIT removeThisTab();
} else if (format != mtx::chapters::format_e::xml) {
auto result = checkSimpleFormatForBomAndNonAscii(chapters, fileName, append);
if (!append) {
p->fileName.clear();
emit titleChanged();
Q_EMIT titleChanged();
}
return result;
@ -515,7 +515,7 @@ Tab::reloadOrAppendSimpleChaptersWithCharacterSet(QString const &characterSet,
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(QY("Error message from the parser: %1").arg(error)).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
}
bool
@ -564,11 +564,11 @@ Tab::loadFromMplsFile(QString const &fileName,
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(message).exec();
if (!append)
emit removeThisTab();
Q_EMIT removeThisTab();
} else if (!append) {
p->fileName.clear();
emit titleChanged();
Q_EMIT titleChanged();
}
return { chapters, false };
@ -680,7 +680,7 @@ Tab::saveAsImpl(bool requireNewFileName,
settings.save();
updateFileNameDisplay();
emit titleChanged();
Q_EMIT titleChanged();
}
MainWindow::get()->setStatusBarMessage(QY("The file has been saved successfully."));
@ -1226,7 +1226,7 @@ Tab::addEdition(bool before) {
p->chapterModel->insertEdition(row, edition);
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
return p->chapterModel->index(row, 0);
}
@ -1292,7 +1292,7 @@ Tab::addChapter(bool before) {
p->chapterModel->insertChapter(row, chapter, selectedIdx.parent());
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
return p->chapterModel->index(row, 0, selectedIdx.parent());
}
@ -1312,7 +1312,7 @@ Tab::addSubChapter() {
p->chapterModel->appendChapter(chapter, selectedIdx);
expandCollapseAll(true, selectedIdx);
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
}
void
@ -1320,7 +1320,7 @@ Tab::removeElement() {
auto p = p_func();
p->chapterModel->removeTree(Util::selectedRowIdx(p->ui->elements));
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
}
void
@ -1623,7 +1623,7 @@ Tab::duplicateElement() {
if (newElementIdx.isValid())
expandCollapseAll(true, newElementIdx);
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
}
void
@ -1699,7 +1699,7 @@ Tab::generateSubChapters() {
expandCollapseAll(true, selectedIdx);
emit numberOfEntriesChanged();
Q_EMIT numberOfEntriesChanged();
}
bool
@ -2046,7 +2046,7 @@ Tab::focusSameControlInNextChapterElement() {
void
Tab::closeTab() {
emit removeThisTab();
Q_EMIT removeThisTab();
}
void

View File

@ -78,12 +78,12 @@ public:
virtual bool areWidgetsEnabled() const;
virtual bool isSourceMatroska() const;
signals:
Q_SIGNALS:
void removeThisTab();
void titleChanged();
void numberOfEntriesChanged();
public slots:
public Q_SLOTS:
virtual void newFile();
virtual void load();
virtual void append(QString const &fileName);

View File

@ -35,7 +35,7 @@ public:
virtual std::pair<QString, QString> nextPreviousWindowActionTexts() const override;
virtual QVector<Tab *> tabs();
public slots:
public Q_SLOTS:
virtual void retranslateUi();
virtual void toolShown() override;
virtual void tabTitleChanged();

View File

@ -94,7 +94,7 @@ AttachedFilePage::dragEnterEvent(QDragEnterEvent *event) {
void
AttachedFilePage::dropEvent(QDropEvent *event) {
if (m_filesDDHandler.handle(event, true))
emit filesDropped(m_filesDDHandler.fileNames());
Q_EMIT filesDropped(m_filesDDHandler.fileNames());
}
QString

View File

@ -46,7 +46,7 @@ public:
virtual void saveContent();
virtual void replaceContent(bool deriveNameAndMimeType);
signals:
Q_SIGNALS:
void filesDropped(QStringList const &fileNames);
protected:

View File

@ -67,7 +67,7 @@ AttachmentsPage::dragEnterEvent(QDragEnterEvent *event) {
void
AttachmentsPage::dropEvent(QDropEvent *event) {
if (m_filesDDHandler.handle(event, true))
emit filesDropped(m_filesDDHandler.fileNames());
Q_EMIT filesDropped(m_filesDDHandler.fileNames());
}
QString

View File

@ -36,10 +36,10 @@ public:
virtual bool hasThisBeenModified() const override;
virtual QString internalIdentifier() const override;
signals:
Q_SIGNALS:
void filesDropped(QStringList const &fileNames);
public slots:
public Q_SLOTS:
virtual void retranslateUi() override;
virtual void rereadChildren(PageModel &model);

View File

@ -211,7 +211,7 @@ PageModel::dropMimeData(QMimeData const *data,
Util::requestAllItems(*this);
emit attachmentsReordered();
Q_EMIT attachmentsReordered();
return result;
}

View File

@ -47,7 +47,7 @@ public:
virtual bool canDropMimeData(QMimeData const *data, Qt::DropAction action, int row, int, QModelIndex const &parent) const override;
virtual bool dropMimeData(QMimeData const *data, Qt::DropAction action, int row, int column, QModelIndex const &parent) override;
signals:
Q_SIGNALS:
void attachmentsReordered();
};

View File

@ -122,7 +122,7 @@ Tab::load() {
.arg(QY("The file you tried to open (%1) is not recognized as a valid Matroska/WebM file.").arg(m_fileName))
.arg(QY("Possible reasons are: the file is not a Matroska file; the file is write-protected; the file is locked by another process; you do not have permission to access the file."));
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(text).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
return;
}
@ -148,7 +148,7 @@ Tab::load() {
.arg(QY("The file you tried to open (%1) could not be read successfully.").arg(m_fileName))
.arg(error);
Util::MessageBox::critical(this)->title(QY("File parsing failed")).text(text).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
return;
}

View File

@ -67,10 +67,10 @@ public:
virtual void addAttachment(KaxAttachedPtr const &attachment);
virtual bool isClosingOrReloadingOkIfModified(ModifiedConfirmationMode mode);
signals:
Q_SIGNALS:
void removeThisTab();
public slots:
public Q_SLOTS:
virtual void showTreeContextMenu(QPoint const &pos);
virtual void selectionChanged(QModelIndex const &current, QModelIndex const &previous);
virtual void load();

View File

@ -37,7 +37,7 @@ public:
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dropEvent(QDropEvent *event) override;
public slots:
public Q_SLOTS:
virtual void retranslateUi();
virtual void toolShown() override;
virtual void selectFileToOpen();

View File

@ -29,7 +29,7 @@ public:
virtual bool validateValue() const override;
virtual void copyValueToElement() override;
public slots:
public Q_SLOTS:
virtual void setupPredefinedTrackNames();
};

View File

@ -32,7 +32,7 @@ protected:
virtual void setItems(QList<QStandardItem *> const &items) const override;
virtual void summarizeProperties();
public slots:
public Q_SLOTS:
virtual void retranslateUi() override;
};

View File

@ -62,7 +62,7 @@ public:
virtual void modifyThis() override;
virtual void retranslateUi() override;
public slots:
public Q_SLOTS:
virtual void onResetClicked();
virtual void onAddOrRemoveChecked();
};

View File

@ -52,7 +52,7 @@ ElementReader::run() {
} catch (mtx::mm_io::exception &) {
}
emit elementRead(m_idx);
Q_EMIT elementRead(m_idx);
}
}

View File

@ -25,7 +25,7 @@ public:
virtual void run() override;
virtual void abort() override;
signals:
Q_SIGNALS:
void elementRead(const QModelIndex &idx);
};

View File

@ -38,7 +38,7 @@ public:
void detachWindow();
public slots:
public Q_SLOTS:
virtual int exec() override;
virtual void retranslateUi();
virtual void requestDetachingWindow();

View File

@ -29,7 +29,7 @@ public:
JobSettings settings();
public slots:
public Q_SLOTS:
virtual void accept() override;
void enableOkButton(QString const &fileName);
};

View File

@ -104,7 +104,7 @@ JobSettingsWidget::browseFileName() {
void
JobSettingsWidget::emitFileNameChangeSignal(QString const &fileName) {
emit fileNameChanged(fileName);
Q_EMIT fileNameChanged(fileName);
}
}

View File

@ -31,10 +31,10 @@ public:
void setSettings(JobSettings const &jobSettings);
void setFileNameVisible(bool visible);
signals:
Q_SIGNALS:
void fileNameChanged(QString const &fileName);
public slots:
public Q_SLOTS:
void enableControlsAccordingToMode();
void browseFileName();
void emitFileNameChangeSignal(QString const &fileName);

View File

@ -65,7 +65,7 @@ public:
bool hasChildren(const QModelIndex &parent) const override;
std::pair<QString, bool> elementName(libebml::EbmlElement &element);
public slots:
public Q_SLOTS:
void addElement(int level, libebml::EbmlElement *element, bool readFully);
void addElementInfo(int level, QString const &text, std::optional<int64_t> position, std::optional<int64_t> size, std::optional<int64_t> dataSize);
void addElementStructure(QStandardItem &parent, libebml::EbmlElement &element);

View File

@ -129,14 +129,14 @@ Tab::load(QString const &fileName) {
connect(&info, &Util::KaxInfo::elementFound, p->m_model, &Model::addElement);
connect(&info, &Util::KaxInfo::elementInfoFound, p->m_model, &Model::addElementInfo);
emit titleChanged();
Q_EMIT titleChanged();
p->m_queue->add(new InitialScan{info, Util::KaxInfo::ScanType::StartOfFile});
p->m_queue->add(new InitialScan{info, Util::KaxInfo::ScanType::Level1Elements});
} catch (mtx::mm_io::exception &ex) {
Util::MessageBox::critical(this)->title(QY("Reading failed")).text(QY("The file you tried to open (%1) could not be read successfully.").arg(fileName)).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
} catch (mtx::kax_info::exception &ex) {
qDebug() << "Info::Tab::load: kax_info exception:" << Q(ex.what());
@ -188,13 +188,13 @@ Tab::retranslateUi() {
p->m_showHexDumpAction->setText(QY("Show &hex dump"));
emit titleChanged();
Q_EMIT titleChanged();
}
void
Tab::showError(const QString &message) {
Util::MessageBox::critical(this)->title(QY("Error reading Matroska file")).text(message).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
}
void

View File

@ -33,11 +33,11 @@ public:
void load(QString const &fileName);
void save();
signals:
Q_SIGNALS:
void removeThisTab();
void titleChanged();
public slots:
public Q_SLOTS:
void retranslateUi();
void showError(const QString &message);
void expandImportantElements();

View File

@ -35,7 +35,7 @@ public:
virtual std::pair<QString, QString> nextPreviousWindowActionTexts() const override;
virtual void openFile(QString const &fileName);
public slots:
public Q_SLOTS:
virtual void retranslateUi();
virtual void selectAndOpenFile();

View File

@ -95,8 +95,8 @@ InfoJob::infoStarted() {
setStatus(Job::Running);
setProgress(0);
emit lineRead(QY("Source file name: %1").arg(QDir::toNativeSeparators(p->config->m_sourceFileName)), InfoLine);
emit lineRead(QY("Destination file name: %1").arg(QDir::toNativeSeparators(p->config->m_destinationFileName)), InfoLine);
Q_EMIT lineRead(QY("Source file name: %1").arg(QDir::toNativeSeparators(p->config->m_sourceFileName)), InfoLine);
Q_EMIT lineRead(QY("Destination file name: %1").arg(QDir::toNativeSeparators(p->config->m_destinationFileName)), InfoLine);
}
void
@ -119,7 +119,7 @@ InfoJob::updateProgress(int percentage,
void
InfoJob::showError(QString const &text) {
emit lineRead(text, ErrorLine);
Q_EMIT lineRead(text, ErrorLine);
}
QString

View File

@ -43,7 +43,7 @@ public:
virtual void runProgramSetupVariables(ProgramRunner::VariableMap &variables) const override;
public slots:
public Q_SLOTS:
virtual void abort() override;
virtual void showError(const QString &message);
virtual void updateProgress(int percentage, const QString &text);

View File

@ -194,7 +194,7 @@ Job::setStatus(Status status) {
if (oldStatus == Running)
runProgramsAfterCompletion();
emit statusChanged(p->id, oldStatus, status);
Q_EMIT statusChanged(p->id, oldStatus, status);
}
bool
@ -214,7 +214,7 @@ Job::setProgress(unsigned int progress) {
p->progress = progress;
p->modified = true;
emit progressChanged(p->id, p->progress);
Q_EMIT progressChanged(p->id, p->progress);
}
void
@ -437,7 +437,7 @@ Job::acknowledgeErrors() {
void
Job::updateUnacknowledgedWarningsAndErrors() {
emit numUnacknowledgedWarningsOrErrorsChanged(p_func()->id, numUnacknowledgedWarnings(), numUnacknowledgedErrors());
Q_EMIT numUnacknowledgedWarningsOrErrorsChanged(p_func()->id, numUnacknowledgedWarnings(), numUnacknowledgedErrors());
}
int

View File

@ -114,7 +114,7 @@ protected:
void setupJobConnections();
virtual void maybeRemoveOutputFile();
public slots:
public Q_SLOTS:
virtual void setStatus(Job::Status status);
virtual void setProgress(unsigned int progress);
virtual void addLineToInternalLogs(QString const &line, mtx::gui::Jobs::Job::LineType type);
@ -122,7 +122,7 @@ public slots:
virtual void updateUnacknowledgedWarningsAndErrors();
virtual void openOutputFolder() const;
signals:
Q_SIGNALS:
void statusChanged(uint64_t id, mtx::gui::Jobs::Job::Status oldStatus, mtx::gui::Jobs::Job::Status newStatus);
void progressChanged(uint64_t id, unsigned int progress);
void numUnacknowledgedWarningsOrErrorsChanged(uint64_t id, int numWarnings, int numErrors);

View File

@ -292,7 +292,7 @@ Model::onStatusChanged(uint64_t id,
m_queueStartTime = QDateTime::currentDateTime();
m_queueNumDone = 0;
emit queueStatusChanged(QueueStatus::Running);
Q_EMIT queueStatusChanged(QueueStatus::Running);
}
@ -385,7 +385,7 @@ Model::updateNumUnacknowledgedWarningsOrErrors() {
numErrors += job->numUnacknowledgedErrors();
}
emit numUnacknowledgedWarningsOrErrorsChanged(numWarnings, numErrors);
Q_EMIT numUnacknowledgedWarningsOrErrorsChanged(numWarnings, numErrors);
}
void
@ -426,7 +426,7 @@ Model::startNextAutoJob() {
auto wasRunning = m_running;
m_running = false;
if (wasRunning)
emit queueStatusChanged(QueueStatus::Stopped);
Q_EMIT queueStatusChanged(QueueStatus::Stopped);
}
void
@ -454,7 +454,7 @@ Model::stop() {
auto wasRunning = m_running;
m_running = false;
if (wasRunning)
emit queueStatusChanged(QueueStatus::Stopped);
Q_EMIT queueStatusChanged(QueueStatus::Stopped);
}
void
@ -466,7 +466,7 @@ Model::resetTotalProgress() {
m_queueNumDone = 0;
emit progressChanged(0, 0);
Q_EMIT progressChanged(0, 0);
}
void
@ -496,7 +496,7 @@ Model::updateProgress() {
qDebug() << "updateProgress: total" << totalProgress << "numDone" << m_queueNumDone << "numRunning" << numRunning << "numPendingAuto" << numPendingAuto << "runningProgress" << runningProgress;
emit progressChanged(progress, totalProgress);
Q_EMIT progressChanged(progress, totalProgress);
}
void
@ -510,7 +510,7 @@ Model::updateJobStats() {
++numJobs[idx];
}
emit jobStatsChanged(numJobs[ Job::PendingAuto ], numJobs[ Job::PendingManual ], numJobs[ Job::Running ], numJobs[ Job::Disabled ]);
Q_EMIT jobStatsChanged(numJobs[ Job::PendingAuto ], numJobs[ Job::PendingManual ], numJobs[ Job::Running ], numJobs[ Job::Disabled ]);
}
void

View File

@ -83,14 +83,14 @@ public:
QDateTime queueStartTime() const;
signals:
Q_SIGNALS:
void progressChanged(int progress, int totalProgress);
void jobStatsChanged(int numPendingAutomatic, int numPendingManual, int numRunning, int numOther);
void numUnacknowledgedWarningsOrErrorsChanged(int numWarnings, int numErrors);
void queueStatusChanged(QueueStatus status);
public slots:
public Q_SLOTS:
void onStatusChanged(uint64_t id, mtx::gui::Jobs::Job::Status oldStatus, mtx::gui::Jobs::Job::Status newStatus);
void onProgressChanged(uint64_t id, unsigned int progress);
void onNumUnacknowledgedWarningsOrErrorsChanged(uint64_t id, int numWarnings, int numErrors);

View File

@ -106,23 +106,23 @@ MuxJob::processLine(QString const &rawLine) {
if (line.startsWith("#GUI#warning ")) {
line.replace(QRegularExpression{"^#GUI#warning *"}, "");
emit lineRead(line, WarningLine);
Q_EMIT lineRead(line, WarningLine);
return;
}
if (line.startsWith("#GUI#error ")) {
line.replace(QRegularExpression{"^#GUI#error *"}, "");
emit lineRead(line, ErrorLine);
Q_EMIT lineRead(line, ErrorLine);
return;
}
if (line.startsWith("#GUI#begin_scanning_playlists")) {
emit startedScanningPlaylists();
Q_EMIT startedScanningPlaylists();
return;
}
if (line.startsWith("#GUI#end_scanning_playlists")) {
emit finishedScanningPlaylists();
Q_EMIT finishedScanningPlaylists();
return;
}
@ -132,7 +132,7 @@ MuxJob::processLine(QString const &rawLine) {
return;
}
emit lineRead(line, InfoLine);
Q_EMIT lineRead(line, InfoLine);
}
void
@ -167,7 +167,7 @@ MuxJob::processFinished(int exitCode,
void
MuxJob::processError(QProcess::ProcessError error) {
if (QProcess::FailedToStart == error)
emit lineRead(QY("The mkvmerge executable was not found."), ErrorLine);
Q_EMIT lineRead(QY("The mkvmerge executable was not found."), ErrorLine);
setStatus(Job::Failed);
}

View File

@ -45,7 +45,7 @@ public:
virtual void runProgramSetupVariables(ProgramRunner::VariableMap &variables) const override;
public slots:
public Q_SLOTS:
virtual void readAvailable();
virtual void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
virtual void processError(QProcess::ProcessError error);
@ -57,7 +57,7 @@ protected:
void processLine(QString const &rawLine);
virtual void saveJobInternal(Util::ConfigFile &settings) const;
signals:
Q_SIGNALS:
void startedScanningPlaylists();
void finishedScanningPlaylists();

View File

@ -39,7 +39,7 @@ public:
virtual QString defaultAudioFileName() const;
public slots:
public Q_SLOTS:
virtual void executeActionsAfterJobFinishes(Job const &job);
virtual void executeActionsAfterQueueFinishes(Jobs::QueueStatus status);

View File

@ -49,7 +49,7 @@ public:
bool checkIfOverwritingExistingFileIsOK(QString const &existingDestination);
bool checkIfOverwritingExistingJobIsOK(QString const &newDestination, bool isMuxJobAndSplittingEnabled = false);
public slots:
public Q_SLOTS:
virtual void retranslateUi();
void onStartAutomatically();
void onStartManually();

View File

@ -35,7 +35,7 @@ public:
void setChangeLogContent(QString const &content);
public slots:
public Q_SLOTS:
void setReleaseInformation(std::shared_ptr<pugi::xml_document> releasesInfo);
void updateCheckFinished(mtx::gui::UpdateCheckStatus status, mtx_release_version_t releaseVersion);
void visitDownloadLocation();

View File

@ -447,7 +447,7 @@ MainWindow::beforeCloseCheckRunningJobs() {
void
MainWindow::closeEvent(QCloseEvent *event) {
emit aboutToClose();
Q_EMIT aboutToClose();
auto ok = mergeTool()->closeAllTabs();
ok = ok && headerEditorTool()->closeAllTabs();
@ -488,7 +488,7 @@ MainWindow::editPreferencesAndShowPage(PreferencesDialog::Page page) {
if (dlg.uiLocaleChanged() || dlg.probeRangePercentageChanged())
QtConcurrent::run(Util::FileIdentifier::cleanAllCacheFiles);
emit preferencesChanged();
Q_EMIT preferencesChanged();
}
#if defined(HAVE_UPDATE_CHECK)
@ -617,7 +617,7 @@ MainWindow::showSystemInformation() {
void
MainWindow::showEvent(QShowEvent *event) {
emit windowShown();
Q_EMIT windowShown();
event->accept();
}

View File

@ -68,12 +68,12 @@ public:
virtual void registerSubWindowWidget(ToolBase &toolBase, QTabWidget &tabWidget);
signals:
Q_SIGNALS:
void windowShown();
void preferencesChanged();
void aboutToClose();
public slots:
public Q_SLOTS:
virtual void changeToolToSender();
virtual void toolChanged(int index);
virtual void editPreferences();

View File

@ -57,7 +57,7 @@ public:
bool disableToolTipsChanged() const;
bool probeRangePercentageChanged() const;
public slots:
public Q_SLOTS:
void editDefaultAdditionalCommandLineOptions();
void enableOutputFileNameControls();
void browseMediaInfoExe();

View File

@ -333,7 +333,7 @@ PrefsRunProgramWidget::changeExecutable() {
enableControls();
emit titleChanged();
Q_EMIT titleChanged();
}
void
@ -349,12 +349,12 @@ PrefsRunProgramWidget::commandLineEdited(QString const &commandLine) {
enableControls();
emit titleChanged();
Q_EMIT titleChanged();
}
void
PrefsRunProgramWidget::nameEdited() {
emit titleChanged();
Q_EMIT titleChanged();
}
void
@ -404,14 +404,14 @@ PrefsRunProgramWidget::changeAudioFile() {
enableControls();
emit titleChanged();
Q_EMIT titleChanged();
}
void
PrefsRunProgramWidget::audioFileEdited() {
enableControls();
emit titleChanged();
Q_EMIT titleChanged();
}
void
@ -421,7 +421,7 @@ PrefsRunProgramWidget::typeChanged(int index) {
showPageForType(type);
emit titleChanged();
Q_EMIT titleChanged();
enableControls();
}

View File

@ -28,10 +28,10 @@ public:
Util::Settings::RunProgramConfigPtr config() const;
QString validate() const;
signals:
Q_SIGNALS:
void titleChanged();
protected slots:
protected Q_SLOTS:
void typeChanged(int index);
void selectVariableToAdd();

View File

@ -92,7 +92,7 @@ SelectCharacterSetDialog::updatePreview() {
void
SelectCharacterSetDialog::emitResult() {
emit characterSetSelected(selectedCharacterSet());
Q_EMIT characterSetSelected(selectedCharacterSet());
}
QString

View File

@ -30,10 +30,10 @@ public:
void setUserData(QVariant const &data);
QVariant const &userData() const;
signals:
Q_SIGNALS:
void characterSetSelected(QString const &characterSet);
public slots:
public Q_SLOTS:
virtual void updatePreview();
virtual void emitResult();
virtual void retranslateUi();

View File

@ -31,7 +31,7 @@ public:
void retranslateUi();
public slots:
public Q_SLOTS:
void setProgress(int progress, int totalProgress);
void setJobStats(int numPendingAutomatic, int numPendingManual, int numRunning, int numOther);
void setNumUnacknowledgedWarningsOrErrors(int numWarnings, int numErrors);

View File

@ -25,7 +25,7 @@ public:
explicit TaskbarProgress(QWidget *parent = nullptr);
virtual ~TaskbarProgress();
public slots:
public Q_SLOTS:
void setupWindowHandle();
void updateTaskbarProgress(int progress, int totalProgress);
void updateTaskbarStatus(Jobs::QueueStatus status);

View File

@ -17,7 +17,7 @@ public:
virtual void setupActions() = 0;
virtual std::pair<QString, QString> nextPreviousWindowActionTexts() const { return {}; };
public slots:
public Q_SLOTS:
virtual void toolShown() = 0;
};

View File

@ -53,7 +53,7 @@ UpdateChecker::start() {
qDebug() << "UpdateChecker::start: initiating requests";
emit checkStarted();
Q_EMIT checkStarted();
qDebug() << "UpdateChecker::start: checkStarted emitted";
auto &manager = App::instance()->networkAccessManager();
@ -104,11 +104,11 @@ UpdateChecker::handleDownloadedContent(quint64 token,
qDebug() << "UpdateChecker::handleDownloadedContent: latest version info retrieved; status:" << static_cast<int>(status);
emit checkFinished(status, p->m_release);
Q_EMIT checkFinished(status, p->m_release);
} else {
qDebug() << "UpdateChecker::handleDownloadedContent: releases info retrieved";
emit releaseInformationRetrieved(doc);
Q_EMIT releaseInformationRetrieved(doc);
}
if (p->m_numFinished < p->m_tokens.size())

View File

@ -35,12 +35,12 @@ public:
UpdateChecker &setRetrieveReleasesInfo(bool enable);
signals:
Q_SIGNALS:
void checkStarted();
void checkFinished(mtx::gui::UpdateCheckStatus status, mtx_release_version_t release);
void releaseInformationRetrieved(std::shared_ptr<pugi::xml_document> releasesInfo);
public slots:
public Q_SLOTS:
void handleDownloadedContent(quint64 token, QByteArray const &content);
void start();

View File

@ -28,7 +28,7 @@ public:
int fileIndex() const;
bool alwaysUseThisDecision() const;
public slots:
public Q_SLOTS:
void selectionChanged();
};

View File

@ -43,7 +43,7 @@ public:
QString additionalOptions() const;
bool saveAsDefault() const;
public slots:
public Q_SLOTS:
void enableOkButton();
private:

View File

@ -68,7 +68,7 @@ Tab::setupAttachmentsControls() {
m_removeAttachmentsAction->setIcon(QIcon{Q(":/icons/16x16/list-remove.png")});
m_selectAllAttachmentsAction->setIcon(QIcon{Q(":/icons/16x16/edit-select-all.png")});
// Signals & slots
// Q_SIGNALS & Q_SLOTS
connect(m_addAttachmentsAction, &QAction::triggered, this, &Tab::onAddAttachments);
connect(m_removeAttachmentsAction, &QAction::triggered, this, &Tab::onRemoveAttachments);
connect(m_removeAllAttachmentsAction, &QAction::triggered, this, &Tab::onRemoveAllAttachments);

View File

@ -23,7 +23,7 @@ public:
explicit CommandLineDialog(QWidget *parent, QStringList const &options, QString const &title);
~CommandLineDialog();
public slots:
public Q_SLOTS:
void onEscapeModeChanged(int index);
void copyToClipboard();
};

View File

@ -27,7 +27,7 @@ public:
QString executable() const;
public slots:
public Q_SLOTS:
void browse();
};

View File

@ -104,7 +104,7 @@ FileIdentificationWorker::identifyFiles() {
qDebug() << "FileIdentificationWorker::identifyFiles: starting loop";
emit queueStarted();
Q_EMIT queueStarted();
while (true) {
QString fileName;
@ -114,7 +114,7 @@ FileIdentificationWorker::identifyFiles() {
if (p->m_toIdentify.isEmpty()) {
qDebug() << "FileIdentificationWorker::identifyFiles: exiting loop (nothing left to do)";
emit queueFinished();
Q_EMIT queueFinished();
return;
}
@ -124,7 +124,7 @@ FileIdentificationWorker::identifyFiles() {
if (pack.m_fileNames.isEmpty()) {
qDebug() << "FileIdentificationWorker::identifyFiles: pack finished, notifying";
emit filesIdentified(pack.m_identifiedFiles, pack.m_append, pack.m_sourceFileIdx);
Q_EMIT filesIdentified(pack.m_identifiedFiles, pack.m_append, pack.m_sourceFileIdx);
p->m_toIdentify.removeFirst();
continue;
@ -154,7 +154,7 @@ FileIdentificationWorker::abortIdentification() {
p->m_toIdentify.clear();
emit queueFinished();
Q_EMIT queueFinished();
}
bool
@ -168,13 +168,13 @@ FileIdentificationWorker::handleFileThatShouldBeSelectedElsewhere(QString const
auto content = std::string{ file.read(1024).data() };
if (std::regex_search(content, p->m_simpleChaptersRE) || std::regex_search(content, p->m_xmlChaptersRE))
emit identifiedAsXmlOrSimpleChapters(fileName);
Q_EMIT identifiedAsXmlOrSimpleChapters(fileName);
else if (std::regex_search(content, p->m_xmlSegmentInfoRE))
emit identifiedAsXmlSegmentInfo(fileName);
Q_EMIT identifiedAsXmlSegmentInfo(fileName);
else if (std::regex_search(content, p->m_xmlTagsRE))
emit identifiedAsXmlTags(fileName);
Q_EMIT identifiedAsXmlTags(fileName);
else
return false;
@ -212,7 +212,7 @@ FileIdentificationWorker::handleIdentifiedPlaylist(SourceFilePtr const &sourceFi
if (Util::Settings::AlwaysScan == policy)
return scanPlaylists(files);
emit playlistScanDecisionNeeded(sourceFile, files);
Q_EMIT playlistScanDecisionNeeded(sourceFile, files);
return Result::Wait;
}
@ -238,7 +238,7 @@ FileIdentificationWorker::scanPlaylists(QFileInfoList const &files) {
p->m_abortPlaylistScan = false;
emit playlistScanStarted(numFiles);
Q_EMIT playlistScanStarted(numFiles);
QList<SourceFilePtr> identifiedPlaylists;
auto minimumPlaylistDuration = timestamp_c::s(Util::Settings::get().m_minimumPlaylistDuration);
@ -256,16 +256,16 @@ FileIdentificationWorker::scanPlaylists(QFileInfoList const &files) {
if (p->m_abortPlaylistScan) {
qDebug() << "FileIdentificationWorker::scanPlaylists: scan aborted";
emit playlistScanFinished();
Q_EMIT playlistScanFinished();
return Result::Continue;
}
emit playlistScanProgressChanged(idx + 1);
Q_EMIT playlistScanProgressChanged(idx + 1);
}
emit playlistScanProgressChanged(numFiles);
emit playlistScanFinished();
Q_EMIT playlistScanProgressChanged(numFiles);
Q_EMIT playlistScanFinished();
if (identifiedPlaylists.isEmpty()) {
qDebug() << "FileIdentificationWorker::scanPlaylists: scan finished, no files";
@ -274,7 +274,7 @@ FileIdentificationWorker::scanPlaylists(QFileInfoList const &files) {
qDebug() << "FileIdentificationWorker::scanPlaylists: scan finished with one or more files, potentially requiring user selection";
emit playlistSelectionNeeded(identifiedPlaylists);
Q_EMIT playlistSelectionNeeded(identifiedPlaylists);
return Result::Wait;
}
@ -298,7 +298,7 @@ FileIdentificationWorker::identifyThisFile(QString const &fileName) {
Util::FileIdentifier identifier{fileName};
if (!identifier.identify()) {
qDebug() << "FileIdentificationWorker::identifyThisFile: failed";
emit identificationFailed(identifier.errorTitle(), identifier.errorText());
Q_EMIT identificationFailed(identifier.errorTitle(), identifier.errorText());
return Result::Wait;
}

View File

@ -40,14 +40,14 @@ public:
bool isEmpty() const;
public slots:
public Q_SLOTS:
void continueByScanningPlaylists(QFileInfoList const &files);
protected slots:
protected Q_SLOTS:
void identifyFiles();
void abortIdentification();
signals:
Q_SIGNALS:
void queueStarted();
void queueFinished();
@ -93,7 +93,7 @@ public:
void continueIdentification();
void abortIdentification();
public slots:
public Q_SLOTS:
void abortPlaylistScan();
};

View File

@ -328,7 +328,7 @@ Tab::setupInputControls() {
m_appendFilesAction2->setIcon(QIcon{Q(":/icons/16x16/distribute-horizontal-x.png")});
m_addAdditionalPartsAction2->setIcon(QIcon{Q(":/icons/16x16/distribute-horizontal-margin.png")});
// Connect signals & slots.
// Connect Q_SIGNALS & Q_SLOTS.
auto mw = MainWindow::get();
using CMSAction = Util::Settings::ClearMergeSettingsAction;

View File

@ -345,7 +345,7 @@ void
Tab::setDestination(QString const &newValue) {
if (newValue.isEmpty()) {
m_config.m_destination.clear();
emit titleChanged();
Q_EMIT titleChanged();
return;
}
@ -360,7 +360,7 @@ Tab::setDestination(QString const &newValue) {
settings.m_lastOutputDir = QFileInfo{ newValue }.absoluteDir();
}
emit titleChanged();
Q_EMIT titleChanged();
if (m_config.m_destination == newValue)
return;

View File

@ -31,7 +31,7 @@ public:
SourceFilePtr select();
protected slots:
protected Q_SLOTS:
void onScannedFileSelected(QTreeWidgetItem *current, QTreeWidgetItem *);
protected:

View File

@ -55,7 +55,7 @@ public:
virtual bool canDropMimeData(QMimeData const *data, Qt::DropAction action, int row, int column, QModelIndex const &parent) const override;
virtual bool dropMimeData(QMimeData const *data, Qt::DropAction action, int row, int column, QModelIndex const &parent) override;
public slots:
public Q_SLOTS:
void updateSelectionStatus();
void updateSourceFileLists();

View File

@ -157,14 +157,14 @@ Tab::load(QString const &fileName) {
MainWindow::get()->setStatusBarMessage(QY("The configuration has been loaded."));
emit titleChanged();
Q_EMIT titleChanged();
} catch (InvalidSettingsX &) {
m_config.reset();
Util::MessageBox::critical(this)->title(QY("Error loading settings file")).text(QY("The settings file '%1' contains invalid settings and was not loaded.").arg(fileName)).exec();
emit removeThisTab();
Q_EMIT removeThisTab();
}
}
@ -177,7 +177,7 @@ Tab::cloneConfig(MuxConfig const &config) {
m_config.m_configFileName.clear();
m_savedState.clear();
emit titleChanged();
Q_EMIT titleChanged();
}
void
@ -223,7 +223,7 @@ Tab::onSaveConfigAs() {
m_savedState = currentState();
emit titleChanged();
Q_EMIT titleChanged();
MainWindow::get()->setStatusBarMessage(QY("The configuration has been saved."));
}
@ -331,7 +331,7 @@ Tab::retranslateUi() {
retranslateOutputUI();
retranslateAttachmentsUI();
emit titleChanged();
Q_EMIT titleChanged();
}
bool
@ -503,7 +503,7 @@ Tab::handleClearingMergeSettings(Util::Settings::ClearMergeSettingsAction action
void
Tab::signalRemovalOfThisTab() {
emit removeThisTab();
Q_EMIT removeThisTab();
}
QString

View File

@ -93,11 +93,11 @@ public:
virtual void cloneConfig(MuxConfig const &config);
virtual void addFiles(QStringList const &fileNames);
signals:
Q_SIGNALS:
void removeThisTab();
void titleChanged();
public slots:
public Q_SLOTS:
// Input tab:
virtual void onSaveConfig();
virtual void onSaveConfigAs();

View File

@ -40,7 +40,7 @@ public:
virtual void addMergeTabIfNoneOpen();
public slots:
public Q_SLOTS:
virtual void retranslateUi();
virtual void newConfig();

View File

@ -71,7 +71,7 @@ public:
virtual bool canDropMimeData(QMimeData const *data, Qt::DropAction action, int row, int column, QModelIndex const &parent) const override;
virtual bool dropMimeData(QMimeData const *data, Qt::DropAction action, int row, int column, QModelIndex const &parent) override;
public slots:
public Q_SLOTS:
void updateTrackLists();
void updateSelectionStatus();
void updateEffectiveDefaultTrackFlags();

View File

@ -69,7 +69,7 @@ BasicLineEdit::dropEvent(QDropEvent *event) {
if (p->m_setTextToDroppedFileName && !fileNames.isEmpty())
setText(fileNames[0]);
emit filesDropped(fileNames);
Q_EMIT filesDropped(fileNames);
return;
}
@ -81,7 +81,7 @@ void
BasicLineEdit::keyPressEvent(QKeyEvent *event) {
if ( (event->modifiers() == Qt::ShiftModifier)
&& mtx::included_in(static_cast<Qt::Key>(event->key()), Qt::Key_Return, Qt::Key_Enter)) {
emit shiftReturnPressed();
Q_EMIT shiftReturnPressed();
event->accept();
} else

View File

@ -31,7 +31,7 @@ public:
BasicLineEdit &acceptDroppedFiles(bool enable);
BasicLineEdit &setTextToDroppedFileName(bool enable);
signals:
Q_SIGNALS:
void filesDropped(QStringList const &fileNames);
void shiftReturnPressed();

View File

@ -52,7 +52,7 @@ BasicTabWidget::eventFilter(QObject *o,
auto tabIdx = tabBar()->tabAt(me->pos());
if (tabIdx >= 0)
emit tabCloseRequested(tabIdx);
Q_EMIT tabCloseRequested(tabIdx);
return true;
}

View File

@ -72,7 +72,7 @@ BasicTreeView::dropEvent(QDropEvent *event) {
auto p = p_func();
if (p->m_acceptDroppedFiles && p->m_filesDDHandler.handle(event, true)) {
emit filesDropped(p->m_filesDDHandler.fileNames(), event->mouseButtons(), event->keyboardModifiers());
Q_EMIT filesDropped(p->m_filesDDHandler.fileNames(), event->mouseButtons(), event->keyboardModifiers());
return;
}
@ -94,24 +94,24 @@ BasicTreeView::keyPressEvent(QKeyEvent *event) {
if ( p->m_enterActivatesAllSelected
&& (event->modifiers() == Qt::NoModifier)
&& mtx::included_in(static_cast<Qt::Key>(event->key()), Qt::Key_Return, Qt::Key_Enter)) {
emit allSelectedActivated();
Q_EMIT allSelectedActivated();
event->accept();
} else if ( (event->modifiers() == Qt::NoModifier)
&& mtx::included_in(static_cast<Qt::Key>(event->key()), Qt::Key_Backspace, Qt::Key_Delete))
emit deletePressed();
Q_EMIT deletePressed();
else if ( (event->modifiers() == Qt::NoModifier)
&& (event->key() == Qt::Key_Insert))
emit insertPressed();
Q_EMIT insertPressed();
else if ( (event->modifiers() == Qt::ControlModifier)
&& (event->key() == Qt::Key_Up))
emit ctrlUpPressed();
Q_EMIT ctrlUpPressed();
else if ( (event->modifiers() == Qt::ControlModifier)
&& (event->key() == Qt::Key_Down))
emit ctrlDownPressed();
Q_EMIT ctrlDownPressed();
else if ( (event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier))
&& (event->key() == Qt::Key_Space))

View File

@ -31,7 +31,7 @@ public:
BasicTreeView &acceptDroppedFiles(bool enable);
BasicTreeView &enterActivatesAllSelected(bool enable);
signals:
Q_SIGNALS:
void filesDropped(QStringList const &fileNames, Qt::MouseButtons mouseButtons, Qt::KeyboardModifiers keyboardModifiers);
void allSelectedActivated();
void deletePressed();
@ -39,7 +39,7 @@ signals:
void ctrlUpPressed();
void ctrlDownPressed();
public slots:
public Q_SLOTS:
void toggleSelectionOfCurrentItem();
protected:

View File

@ -37,7 +37,7 @@ public:
virtual ComboBoxBase &reInitializeIfNecessary();
virtual bool onlyShowOftenUsed() const;
public slots:
public Q_SLOTS:
virtual void reInitialize();
protected:

View File

@ -63,7 +63,7 @@ ElideLabel::setText(QString const &text) {
p->m_text = text;
updateLabel();
emit textChanged(p->m_text);
Q_EMIT textChanged(p->m_text);
}
Qt::TextElideMode

View File

@ -37,10 +37,10 @@ public:
virtual QSize sizeHint() const;
virtual QSize minimumSizeHint() const;
public slots:
public Q_SLOTS:
void setText(QString const &text);
signals:
Q_SIGNALS:
void textChanged(QString const &text);
protected:

View File

@ -219,7 +219,7 @@ FancyTabBar::tabRect(int index)
// mode itself
void
FancyTabBar::emitCurrentIndex() {
emit currentChanged(m_currentIndex);
Q_EMIT currentChanged(m_currentIndex);
}
void
@ -343,7 +343,7 @@ FancyTabBar::setCurrentIndex(int index) {
if (isTabEnabled(index)) {
m_currentIndex = index;
update();
emit currentChanged(m_currentIndex);
Q_EMIT currentChanged(m_currentIndex);
}
}
@ -578,9 +578,9 @@ FancyTabWidget::setCurrentIndex(int index) {
void
FancyTabWidget::showWidget(int index) {
emit currentAboutToShow(index);
Q_EMIT currentAboutToShow(index);
m_modesStack->setCurrentIndex(index);
emit currentChanged(index);
Q_EMIT currentChanged(index);
}
void

View File

@ -111,10 +111,10 @@ public:
int count() const;
QRect tabRect(int index) const;
signals:
Q_SIGNALS:
void currentChanged(int);
public slots:
public Q_SLOTS:
void emitCurrentIndex();
private:
@ -154,14 +154,14 @@ public:
FancyTabBar *tabBar();
signals:
Q_SIGNALS:
void currentAboutToShow(int index);
void currentChanged(int index);
public slots:
public Q_SLOTS:
void setCurrentIndex(int index);
private slots:
private Q_SLOTS:
void showWidget(int index);
};

View File

@ -40,7 +40,7 @@ FilesDragDropWidget::dropEvent(QDropEvent *event) {
auto p = p_func();
if (p->m_filesDDHandler.handle(event, true))
emit filesDropped(p->m_filesDDHandler.fileNames());
Q_EMIT filesDropped(p->m_filesDDHandler.fileNames());
}
}

View File

@ -26,7 +26,7 @@ public:
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dropEvent(QDropEvent *event) override;
signals:
Q_SIGNALS:
void filesDropped(QStringList const &files);
};

View File

@ -30,7 +30,7 @@ public:
HeaderViewManager &setDefaultSizes(QHash<QString, int> const &defaultSizes);
public slots:
public Q_SLOTS:
void saveState();
void restoreState();

View File

@ -61,9 +61,9 @@ InstallationChecker::runChecks() {
#endif // SYS_WINDOWS
if (!m_problems.isEmpty())
emit problemsFound(m_problems);
Q_EMIT problemsFound(m_problems);
emit finished();
Q_EMIT finished();
}
void

View File

@ -35,11 +35,11 @@ public:
QString mkvmergeVersion() const;
Problems problems() const;
signals:
Q_SIGNALS:
void problemsFound(Util::InstallationChecker::Problems const &results);
void finished();
public slots:
public Q_SLOTS:
void runChecks();
public:

View File

@ -61,7 +61,7 @@ KaxInfo::~KaxInfo() {
void
KaxInfo::ui_show_error(std::string const &error) {
emit errorFound(Q(error));
Q_EMIT errorFound(Q(error));
}
void
@ -71,7 +71,7 @@ KaxInfo::ui_show_element_info(int level,
std::optional<int64_t> size,
std::optional<int64_t> dataSize) {
if (p_func()->m_use_gui)
emit elementInfoFound(level, Q(text), position, size, dataSize);
Q_EMIT elementInfoFound(level, Q(text), position, size, dataSize);
else
kax_info_c::ui_show_element_info(level, text, position, size, dataSize);
@ -85,7 +85,7 @@ KaxInfo::ui_show_element(EbmlElement &e) {
if ((p->m_scanType == ScanType::StartOfFile) && Is<KaxCluster>(e))
p->m_firstLevel1ElementPosition = e.GetElementPosition();
else
emit elementFound(p->m_level, &e, p->m_scanType == ScanType::StartOfFile);
Q_EMIT elementFound(p->m_level, &e, p->m_scanType == ScanType::StartOfFile);
} else
kax_info_c::ui_show_element(e);
@ -94,7 +94,7 @@ KaxInfo::ui_show_element(EbmlElement &e) {
void
KaxInfo::ui_show_progress(int percentage,
std::string const &text) {
emit progressChanged(percentage, Q(text));
Q_EMIT progressChanged(percentage, Q(text));
}
void
@ -126,22 +126,22 @@ KaxInfo::scanStartOfFile() {
auto p = p_func();
emit startOfFileScanStarted();
Q_EMIT startOfFileScanStarted();
p->m_firstLevel1ElementPosition.reset();
p->m_abort = false;
auto result = p->m_in ? process_file() : open_and_process_file(p->m_source_file_name);
emit startOfFileScanFinished(result);
Q_EMIT startOfFileScanFinished(result);
}
void
KaxInfo::scanLevel1Elements() {
emit level1ElementsScanStarted();
Q_EMIT level1ElementsScanStarted();
auto result = doScanLevel1Elements();
emit level1ElementsScanFinished(result);
Q_EMIT level1ElementsScanFinished(result);
}
mtx::kax_info_c::result_e

View File

@ -54,13 +54,13 @@ public:
void disableFrameInfo();
public slots:
public Q_SLOTS:
virtual void runScan(ScanType type);
virtual void scanStartOfFile();
virtual void scanLevel1Elements();
virtual void abort();
signals:
Q_SIGNALS:
void elementInfoFound(int level, QString const &text, std::optional<int64_t> position, std::optional<int64_t> size, std::optional<int64_t> dataSize);
void elementFound(int level, EbmlElement *e, bool readFully);
void errorFound(const QString &message);

View File

@ -25,7 +25,7 @@ public:
bool isPlaying() const;
public slots:
public Q_SLOTS:
void playFile(QString const &fileName, unsigned int volume);
void stopPlayback();
};

View File

@ -85,7 +85,7 @@ NetworkAccessManager::httpFinished() {
qDebug() << "NetworkAccessManager::httpFinished: token" << token << "request done, read" << content.size();
emit downloadFinished(token, content);
Q_EMIT downloadFinished(token, content);
} else
qDebug() << "NetworkAccessManager::httpFinished: unknown reply?";

View File

@ -29,13 +29,13 @@ public:
quint64 download(QUrl const &url);
signals:
Q_SIGNALS:
void downloadFinished(quint64 token, QByteArray const &content);
public slots:
public Q_SLOTS:
void httpFinished();
protected slots:
protected Q_SLOTS:
void startDownload(quint64 token, QUrl const &url);
protected:

View File

@ -39,7 +39,7 @@ public:
virtual bool hasError() const;
virtual void run();
public slots:
public Q_SLOTS:
virtual void dataAvailable();
virtual void onError();

View File

@ -25,7 +25,7 @@ public:
virtual void add(Runnable *work);
public slots:
public Q_SLOTS:
virtual void run();
virtual void abort();

View File

@ -216,7 +216,7 @@ public:
QString lastOpenDirPath() const;
QString lastConfigDirPath() const;
public slots:
public Q_SLOTS:
void storeSplitterSizes();
protected:

View File

@ -138,7 +138,7 @@ SideBySideMultiSelect::moveSelectedListWidgetItems(QListWidget &from,
to.addItem(actualItem);
}
emit listsChanged();
Q_EMIT listsChanged();
}
void

View File

@ -41,10 +41,10 @@ public:
ItemList selectedItems() const;
QStringList selectedItemValues() const;
signals:
Q_SIGNALS:
void listsChanged();
public slots:
public Q_SLOTS:
void availableSelectionChanged();
void selectedSelectionChanged();

View File

@ -39,7 +39,7 @@ public:
void addItem(QString const &name);
public slots:
public Q_SLOTS:
void enableControls();
void addNewItem();

View File

@ -146,7 +146,7 @@ StyleHelper::setBaseColor(QColor const &newcolor) {
if (color.isValid() && color != m_baseColor) {
m_baseColor = color;
foreach (QWidget *w, QApplication::topLevelWidgets())
for (auto & w : QApplication::topLevelWidgets())
w->update();
}
}

View File

@ -33,7 +33,7 @@ public:
virtual bool eventFilter(QObject *o, QEvent *e) override;
public slots:
public Q_SLOTS:
virtual void copyToClipboard();
};

View File

@ -49,7 +49,7 @@ public:
virtual ~WaitingSpinnerWidget();
public slots:
public Q_SLOTS:
void start();
void stop();
void reset();
@ -78,7 +78,7 @@ public:
bool isSpinning() const;
private slots:
private Q_SLOTS:
void rotate();
protected:

View File

@ -46,7 +46,7 @@ class TabPrivate {
bool m_forCurrentJob;
// Only use this variable for determining whether or not to ignore
// certain signals.
// certain Q_SIGNALS.
QObject const *m_currentlyConnectedJob;
QAction *m_saveOutputAction, *m_clearOutputAction, *m_openFolderAction;
@ -234,7 +234,7 @@ Tab::onStatusChanged(uint64_t id,
// Check for the signalled status, not the current one, in order to
// detect a change from "not running" to "running" only once, no
// matter which order the signals arrive in.
// matter which order the Q_SIGNALS arrive in.
if (Jobs::Job::Running == newStatus)
setInitialDisplay(*job);
@ -456,7 +456,7 @@ Tab::clearOutput() {
p->ui->remainingTimeCurrentJob->setText(Q(""));
p->ui->remainingTimeQueue->setText(Q(""));
emit watchCurrentJobTabCleared();
Q_EMIT watchCurrentJobTabCleared();
}
void

View File

@ -44,11 +44,11 @@ public:
bool isSaveOutputEnabled() const;
bool isCurrentJobTab() const;
signals:
Q_SIGNALS:
void abortJob();
void watchCurrentJobTabCleared();
public slots:
public Q_SLOTS:
void onStatusChanged(uint64_t id, mtx::gui::Jobs::Job::Status oldStatus, mtx::gui::Jobs::Job::Status newStatus);
void onJobProgressChanged(uint64_t id, unsigned int progress);
void onQueueProgressChanged(int progress, int totalProgress);

View File

@ -43,7 +43,7 @@ public:
virtual void setupActions() override;
virtual std::pair<QString, QString> nextPreviousWindowActionTexts() const override;
public slots:
public Q_SLOTS:
virtual void toolShown() override;
virtual void closeTab(int idx);
virtual void closeCurrentTab();