Commit cd75d482 authored by David Jarvie's avatar David Jarvie
Browse files

Suppress clang-tidy warnings

parent 4c8ee41a
Pipeline #44764 passed with stage
in 17 minutes and 15 seconds
......@@ -56,7 +56,7 @@ AkonadiCollectionSearch::AkonadiCollectionSearch(const QString& mimeType, const
{
// There are no resources containing the mime type, so ensure that a
// signal is emitted after construction.
QTimer::singleShot(0, this, &AkonadiCollectionSearch::finish);
QTimer::singleShot(0, this, &AkonadiCollectionSearch::finish); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......
......@@ -94,7 +94,7 @@ void AutostartApp::setCommandLine(const QString& exe, const QStringList& args)
// Login session is starting up - need to wait for it to complete
// in order to avoid starting the client before it is restored by
// the session (where applicable).
QTimer::singleShot(AUTOSTART_DELAY * 1000, this, &AutostartApp::slotAutostart);
QTimer::singleShot(AUTOSTART_DELAY * 1000, this, &AutostartApp::slotAutostart); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
void AutostartApp::slotAutostart()
......
......@@ -861,7 +861,7 @@ void EditAlarmDlg::showEvent(QShowEvent* se)
if (theApp()->needWindowFocusFix())
{
QApplication::setActiveWindow(this);
QTimer::singleShot(0, this, &EditAlarmDlg::focusFixTimer);
QTimer::singleShot(0, this, &EditAlarmDlg::focusFixTimer); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......@@ -878,7 +878,7 @@ void EditAlarmDlg::focusFixTimer()
&& QApplication::focusWidget()->window() != this)
{
QApplication::setActiveWindow(this);
QTimer::singleShot(0, this, &EditAlarmDlg::focusFixTimer);
QTimer::singleShot(0, this, &EditAlarmDlg::focusFixTimer); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......@@ -1245,7 +1245,7 @@ void EditAlarmDlg::showOptions(bool more)
type_showOptions(more);
mRecurrenceEdit->showMoreOptions(more);
mShowingMore = more;
QTimer::singleShot(0, this, &EditAlarmDlg::slotResize);
QTimer::singleShot(0, this, &EditAlarmDlg::slotResize); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
/******************************************************************************
......
......@@ -1253,7 +1253,7 @@ void cancelRtcWake(QWidget* msgParent, const QString& eventId)
if (!wakeup.isEmpty() && (eventId.isEmpty() || wakeup[0] == eventId))
{
Private::instance()->mMsgParent = msgParent ? msgParent : MainWindow::mainMainWindow();
QTimer::singleShot(0, Private::instance(), &Private::cancelRtcWake);
QTimer::singleShot(0, Private::instance(), &Private::cancelRtcWake); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......
......@@ -850,7 +850,7 @@ void KAlarmApp::displayFatalError(const QString& message)
mFatalError = 1;
mFatalMessage = message;
if (mInstance)
QTimer::singleShot(0, mInstance, &KAlarmApp::quitFatal);
QTimer::singleShot(0, mInstance, &KAlarmApp::quitFatal); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......@@ -874,7 +874,7 @@ void KAlarmApp::quitFatal()
mInstance->quitIf(1, true);
break;
}
QTimer::singleShot(1000, this, &KAlarmApp::quitFatal);
QTimer::singleShot(1000, this, &KAlarmApp::quitFatal); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
/******************************************************************************
......@@ -899,7 +899,7 @@ void KAlarmApp::checkNextDueAlarm()
// Queue the alarm
queueAlarmId(nextEvent);
qCDebug(KALARM_LOG) << "KAlarmApp::checkNextDueAlarm:" << nextEvent.id() << ": due now";
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
else
{
......@@ -955,7 +955,8 @@ void KAlarmApp::startProcessQueue()
{
qCDebug(KALARM_LOG) << "KAlarmApp::startProcessQueue";
mInitialised = true;
QTimer::singleShot(0, this, &KAlarmApp::processQueue); // process anything already queued
// Process anything already queued.
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......@@ -1062,7 +1063,7 @@ void KAlarmApp::processQueue()
case 0:
// Initiate editing an alarm specified on the command line.
mEditingCmdLineAlarm |= 1;
QTimer::singleShot(0, this, &KAlarmApp::slotEditAlarmById);
QTimer::singleShot(0, this, &KAlarmApp::slotEditAlarmById); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
break;
case 1:
// Currently editing the alarm.
......@@ -1143,7 +1144,7 @@ void KAlarmApp::atLoginEventAdded(const KAEvent& event)
{
mActionQueue.enqueue(ActionQEntry(QueuedAction::Handle, EventId(ev)));
if (mInitialised)
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
}
......@@ -1333,7 +1334,7 @@ bool KAlarmApp::wantShowInSystemTray() const
*/
void KAlarmApp::setResourcesTimeout()
{
QTimer::singleShot(RESOURCES_TIMEOUT * 1000, this, &KAlarmApp::slotResourcesTimeout);
QTimer::singleShot(RESOURCES_TIMEOUT * 1000, this, &KAlarmApp::slotResourcesTimeout); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
/******************************************************************************
......@@ -1420,7 +1421,7 @@ void KAlarmApp::checkArchivedCalendar()
{
// Schedule the display of a user prompt, without holding up
// other processing.
QTimer::singleShot(0, this, &KAlarmApp::promptArchivedCalendar);
QTimer::singleShot(0, this, &KAlarmApp::promptArchivedCalendar); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
}
......@@ -1447,7 +1448,7 @@ void KAlarmApp::slotEditAlarmById()
showRestoredWindows();
}
mEditingCmdLineAlarm = 2; // indicate edit completion
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
......@@ -1577,7 +1578,7 @@ void KAlarmApp::slotFDOPropertiesChanged(const QString& interface,
if (!mNotificationsInhibited)
{
showRestoredWindows(); // display message windows restored at startup.
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
}
}
......@@ -1720,7 +1721,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::SubAction action, const QString& name, co
qCDebug(KALARM_LOG) << "KAlarmApp::scheduleEvent: creating new alarm" << text;
mActionQueue.enqueue(ActionQEntry(event));
if (mInitialised)
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
return true;
}
......@@ -1734,7 +1735,7 @@ bool KAlarmApp::dbusHandleEvent(const EventId& eventID, QueuedAction action)
qCDebug(KALARM_LOG) << "KAlarmApp::dbusHandleEvent:" << eventID;
mActionQueue.append(ActionQEntry(action, eventID));
if (mInitialised)
QTimer::singleShot(0, this, &KAlarmApp::processQueue);
QTimer::singleShot(0, this, &KAlarmApp::processQueue); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
return true;
}
......
......@@ -249,7 +249,7 @@ void SpinBox2::paintEvent(QPaintEvent* e)
void SpinBox2::paintTimer()
{
QTimer::singleShot(0, this, &SpinBox2::updateMirrorButtons);
QTimer::singleShot(0, this, &SpinBox2::updateMirrorButtons); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
void SpinBox2::updateMirrorButtons()
......
......@@ -372,7 +372,7 @@ void MainWindow::showEvent(QShowEvent* se)
mShown = true;
if (mMenuError)
QTimer::singleShot(0, this, &MainWindow::showMenuErrorMessage);
QTimer::singleShot(0, this, &MainWindow::showMenuErrorMessage); //NOLINT(resources/fileresourcecalendarupdater.cpp)
}
/******************************************************************************
......
......@@ -812,7 +812,7 @@ void MessageDisplayHelper::playAudio()
{
// The message is to be spoken. In case of error messges,
// call it on a timer to allow the display to be shown first.
QTimer::singleShot(0, this, &MessageDisplayHelper::slotSpeak);
QTimer::singleShot(0, this, &MessageDisplayHelper::slotSpeak); //NOLINT(resources/fileresourcecalendarupdater.cpp)
}
}
......@@ -895,7 +895,7 @@ void MessageDisplayHelper::playReady()
*/
void MessageDisplayHelper::audioTerminating()
{
QTimer::singleShot(0, this, &MessageDisplayHelper::startAudio);
QTimer::singleShot(0, this, &MessageDisplayHelper::startAudio); //NOLINT(resources/fileresourcecalendarupdater.cpp)
}
/******************************************************************************
......@@ -950,7 +950,7 @@ AudioThread::~AudioThread()
mAudioOwner = nullptr;
// Notify after deleting mAudioThread, so that isAudioPlaying() will
// return the correct value.
QTimer::singleShot(0, theApp(), &KAlarmApp::notifyAudioStopped);
QTimer::singleShot(0, theApp(), &KAlarmApp::notifyAudioStopped); //NOLINT(resources/fileresourcecalendarupdater.cpp)
}
/******************************************************************************
......@@ -1059,7 +1059,7 @@ void AudioThread::checkAudioPlay()
{
// Pause before playing the file again
mPausing = true;
QTimer::singleShot(mRepeatPause * 1000, this, &AudioThread::checkAudioPlay);
QTimer::singleShot(mRepeatPause * 1000, this, &AudioThread::checkAudioPlay); //NOLINT(resources/fileresourcecalendarupdater.cpp)
mMutex.unlock();
return;
}
......@@ -1133,7 +1133,7 @@ bool MessageDisplayHelper::activateAutoClose()
int delay = QDateTime::currentDateTimeUtc().secsTo(mCloseTime);
if (delay < 0)
delay = 0;
QTimer::singleShot(delay * 1000, this, &MessageDisplayHelper::autoCloseNow);
QTimer::singleShot(delay * 1000, this, &MessageDisplayHelper::autoCloseNow); //NOLINT(resources/fileresourcecalendarupdater.cpp)
if (!delay)
return false; // don't show the alarm if auto-closing is already due
}
......@@ -1261,7 +1261,7 @@ void MessageDisplayHelper::checkDeferralLimit()
n = QDateTime::currentDateTimeUtc().secsTo(mDeferLimit);
if (n > 0)
{
QTimer::singleShot(n * 1000, this, &MessageDisplayHelper::checkDeferralLimit);
QTimer::singleShot(n * 1000, this, &MessageDisplayHelper::checkDeferralLimit); //NOLINT(resources/fileresourcecalendarupdater.cpp)
return;
}
}
......
......@@ -961,7 +961,7 @@ void MessageWindow::showEvent(QShowEvent* se)
}
// Set the window size etc. once the frame size is known
QTimer::singleShot(0, this, &MessageWindow::frameDrawn);
QTimer::singleShot(0, this, &MessageWindow::frameDrawn); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
mShown = true;
}
......@@ -1009,7 +1009,7 @@ void MessageWindow::displayComplete()
{
// Enable the window's buttons either now or after the configured delay
if (mButtonDelay > 0)
QTimer::singleShot(mButtonDelay, this, &MessageWindow::enableButtons);
QTimer::singleShot(mButtonDelay, this, &MessageWindow::enableButtons); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
else
enableButtons();
}
......
......@@ -168,7 +168,7 @@ bool PickFileRadio::doPickFile(QString& file)
// No file is selected, so revert to the previous radio button selection.
// But wait a moment before setting the radio button, or it won't work.
mRevertButton = true; // prevent picker dialog popping up twice
QTimer::singleShot(0, this, &PickFileRadio::setLastButton);
QTimer::singleShot(0, this, &PickFileRadio::setLastButton); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
file = mFile;
return true;
......
......@@ -266,7 +266,7 @@ DirResourceImportTypeWidget::DirResourceImportTypeWidget(CalEvent::Type alarmTyp
mUi->grid->setColumnStretch(1, 1);
importTypeSelected();
QTimer::singleShot(0, this, &DirResourceImportTypeWidget::validate);
QTimer::singleShot(0, this, &DirResourceImportTypeWidget::validate); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
DirResourceImportTypeWidget::~DirResourceImportTypeWidget()
......
......@@ -88,7 +88,7 @@ bool FileResourceCalendarUpdater::update(bool useTimer)
mPromptMessage = conversionPrompt(mResource.displayName(), versionString, false);
if (useTimer)
{
QTimer::singleShot(0, this, &FileResourceCalendarUpdater::prompt);
QTimer::singleShot(0, this, &FileResourceCalendarUpdater::prompt); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
return true;
}
return prompt();
......
......@@ -27,7 +27,7 @@ ResourceCreator::ResourceCreator(CalEvent::Type defaultType, QWidget* parent)
*/
void ResourceCreator::createResource()
{
QTimer::singleShot(0, this, &ResourceCreator::doCreateResource);
QTimer::singleShot(0, this, &ResourceCreator::doCreateResource); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
// vim: et sw=4:
......@@ -791,7 +791,7 @@ void SingleFileResource::handleSettingsChange(Changes change)
break;
}
// Update the backend storage format to the current KAlarm format
QTimer::singleShot(0, this, [this] { updateFormat(); });
QTimer::singleShot(0, this, [this] { updateFormat(); }); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
return;
}
}
......
......@@ -58,7 +58,7 @@ SingleFileResourceConfigDialog::SingleFileResourceConfigDialog(bool create, QWid
connect(mUi->displayNameText, &QLineEdit::textChanged, this, &SingleFileResourceConfigDialog::validate);
connect(mUi->buttonBox, &QDialogButtonBox::rejected, this, &SingleFileResourceConfigDialog::close);
connect(mUi->buttonBox, &QDialogButtonBox::accepted, this, &SingleFileResourceConfigDialog::accept);
QTimer::singleShot(0, this, &SingleFileResourceConfigDialog::validate);
QTimer::singleShot(0, this, &SingleFileResourceConfigDialog::validate); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
}
SingleFileResourceConfigDialog::~SingleFileResourceConfigDialog()
......
......@@ -92,7 +92,7 @@ ResourceSelector::ResourceSelector(QWidget* parent)
connect(mDeleteButton, &QPushButton::clicked, this, &ResourceSelector::removeResource);
connect(mAlarmType, &QComboBox::activated, this, &ResourceSelector::alarmTypeSelected);
QTimer::singleShot(0, this, &ResourceSelector::alarmTypeSelected);
QTimer::singleShot(0, this, &ResourceSelector::alarmTypeSelected); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
Preferences::connect(&Preferences::archivedKeepDaysChanged, this, &ResourceSelector::archiveDaysChanged);
}
......@@ -128,7 +128,7 @@ void ResourceSelector::alarmTypeSelected()
mAddButton->setWhatsThis(addTip);
mAddButton->setToolTip(addTip);
// WORKAROUND: Switch scroll bars back on after allowing geometry to update ...
QTimer::singleShot(0, this, &ResourceSelector::reinstateAlarmTypeScrollBars);
QTimer::singleShot(0, this, &ResourceSelector::reinstateAlarmTypeScrollBars); //NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
selectionChanged(); // enable/disable buttons
}
......
......@@ -177,7 +177,7 @@ void TrayWindow::slotPreferences()
void TrayWindow::slotQuit()
{
// Note: QTimer::singleShot(0, ...) never calls the slot.
QTimer::singleShot(1, this, &TrayWindow::slotQuitAfter);
QTimer::singleShot(1, this, &TrayWindow::slotQuitAfter); //NOLINT(resources/fileresourcecalendarupdater.cpp)
}
void TrayWindow::slotQuitAfter()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment