diff --git a/connector/syncthingconnection.cpp b/connector/syncthingconnection.cpp index db043d2..8150c01 100644 --- a/connector/syncthingconnection.cpp +++ b/connector/syncthingconnection.cpp @@ -1503,10 +1503,12 @@ void SyncthingConnection::readDownloadProgressEvent(DateTime eventTime, const QJ = QStringLiteral("%1 / %2 - %3 %") .arg(QString::fromLatin1(dataSizeToString(dirInfo.blocksAlreadyDownloaded > 0 ? static_cast(dirInfo.blocksAlreadyDownloaded) * SyncthingItemDownloadProgress::syncthingBlockSize - : 0).data()), + : 0) + .data()), QString::fromLatin1(dataSizeToString(dirInfo.blocksToBeDownloaded > 0 ? static_cast(dirInfo.blocksToBeDownloaded) * SyncthingItemDownloadProgress::syncthingBlockSize - : 0).data()), + : 0) + .data()), QString::number(dirInfo.downloadPercentage)); } emit downloadProgressChanged(); @@ -2091,4 +2093,4 @@ void SyncthingConnection::recalculateStatus() * \fn SyncthingConnection::restartTriggered() * \brief Indicates a restart has been successfully triggered via restart(). */ -} +} // namespace Data diff --git a/connector/syncthingconnectionsettings.cpp b/connector/syncthingconnectionsettings.cpp index a8ac9c1..ec4b2ea 100644 --- a/connector/syncthingconnectionsettings.cpp +++ b/connector/syncthingconnectionsettings.cpp @@ -18,4 +18,4 @@ bool SyncthingConnectionSettings::loadHttpsCert() } return true; } -} +} // namespace Data diff --git a/connector/syncthingconnectionsettings.h b/connector/syncthingconnectionsettings.h index f6727e0..ab2f9d0 100644 --- a/connector/syncthingconnectionsettings.h +++ b/connector/syncthingconnectionsettings.h @@ -24,6 +24,6 @@ struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingConnectionSettings { QList expectedSslErrors; bool loadHttpsCert(); }; -} +} // namespace Data #endif // SYNCTHINGCONNECTIONSETTINGS_H diff --git a/connector/utils.cpp b/connector/utils.cpp index 78c7066..5b879ad 100644 --- a/connector/utils.cpp +++ b/connector/utils.cpp @@ -127,4 +127,4 @@ bool setDevicesPaused(QJsonObject &syncthingConfig, const QStringList &devIds, b } return altered; } -} +} // namespace Data diff --git a/connector/utils.h b/connector/utils.h index 0aa79a7..e38fdf4 100644 --- a/connector/utils.h +++ b/connector/utils.h @@ -45,6 +45,6 @@ template QStringList LIB_SYNCTHING_CONNECTOR_EXPORT ids(const Ob } return ids; } -} +} // namespace Data #endif // DATA_UTILS_H diff --git a/model/colors.h b/model/colors.h index 4ec788d..30197dd 100644 --- a/model/colors.h +++ b/model/colors.h @@ -34,7 +34,7 @@ inline QColor orange(bool bright) { return bright ? QColor(0xFFC500) : QColor(0xA85900); } -} +} // namespace Colors } // namespace Data diff --git a/plasmoid/lib/settingsdialog.cpp b/plasmoid/lib/settingsdialog.cpp index 648f94a..b2c6ddc 100644 --- a/plasmoid/lib/settingsdialog.cpp +++ b/plasmoid/lib/settingsdialog.cpp @@ -89,11 +89,11 @@ QtGui::SettingsDialog *setupSettingsDialog(SyncthingApplet &applet) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD << systemdPage #endif - ); + ); category->setIcon( QIcon::fromTheme(QStringLiteral("preferences-other"), QIcon(QStringLiteral(":/icons/hicolor/scalable/apps/preferences-other.svg")))); categories << category; return new ::QtGui::SettingsDialog(categories); } -} +} // namespace Plasmoid diff --git a/plasmoid/lib/settingsdialog.h b/plasmoid/lib/settingsdialog.h index 1a3e483..5aa51ca 100644 --- a/plasmoid/lib/settingsdialog.h +++ b/plasmoid/lib/settingsdialog.h @@ -23,6 +23,6 @@ QKeySequenceEdit *m_globalShortcutEdit; END_DECLARE_OPTION_PAGE QtGui::SettingsDialog *setupSettingsDialog(Plasmoid::SyncthingApplet &applet); -} +} // namespace Plasmoid #endif // SETTINGSDIALOG_H diff --git a/plasmoid/lib/syncthingapplet.cpp b/plasmoid/lib/syncthingapplet.cpp index a359f50..113f126 100644 --- a/plasmoid/lib/syncthingapplet.cpp +++ b/plasmoid/lib/syncthingapplet.cpp @@ -297,7 +297,7 @@ void SyncthingApplet::handleConnectionStatusChanged(SyncthingStatus status) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD && !syncthingService().isManuallyStopped() #endif - ) { + ) { m_dbusNotifier.showDisconnect(); } break; @@ -371,7 +371,7 @@ void SyncthingApplet::handleSystemdServiceError(const QString &context, const QS handleInternalError(tr("D-Bus error - unable to ") % context % QChar('\n') % name % QChar(':') % message, SyncthingErrorCategory::SpecificRequest, QNetworkReply::NoError, QNetworkRequest(), QByteArray()); } -} +} // namespace Plasmoid K_EXPORT_PLASMA_APPLET_WITH_JSON(syncthing, Plasmoid::SyncthingApplet, "metadata.json") diff --git a/plasmoid/lib/syncthingapplet.h b/plasmoid/lib/syncthingapplet.h index 5af2767..a729d92 100644 --- a/plasmoid/lib/syncthingapplet.h +++ b/plasmoid/lib/syncthingapplet.h @@ -27,7 +27,7 @@ class SyncthingDeviceModel; class SyncthingDownloadModel; class SyncthingService; enum class SyncthingErrorCategory; -} +} // namespace Data namespace QtGui { class WebViewDialog; @@ -191,6 +191,6 @@ inline Data::SyncthingConnectionSettings *SyncthingApplet::currentConnectionConf { return connectionConfig(m_currentConnectionConfig); } -} +} // namespace Plasmoid #endif // SYNCTHINGAPPLET_H diff --git a/testhelper/helper.cpp b/testhelper/helper.cpp index f9a9f9f..b816873 100644 --- a/testhelper/helper.cpp +++ b/testhelper/helper.cpp @@ -8,4 +8,4 @@ namespace TestUtilities { * The default factor is 1.0. */ double timeoutFactor = 1.0; -} +} // namespace TestUtilities diff --git a/testhelper/helper.h b/testhelper/helper.h index d2ac3ad..075a38e 100644 --- a/testhelper/helper.h +++ b/testhelper/helper.h @@ -299,6 +299,6 @@ template void waitForSignals(Action a " ms.", timeoutFactor != 1.0 ? argsToString(" (original timeout: ", timeout, " ms)") : std::string())); } } -} +} // namespace TestUtilities #endif // SYNCTHINGTESTHELPER_H diff --git a/testhelper/syncthingtestinstance.cpp b/testhelper/syncthingtestinstance.cpp index 244180f..5661abd 100644 --- a/testhelper/syncthingtestinstance.cpp +++ b/testhelper/syncthingtestinstance.cpp @@ -97,4 +97,4 @@ void SyncthingTestInstance::stop() cerr << "\n - Syncthing stderr during the testrun:\n" << m_syncthingProcess.readAllStandardError().data(); } } -} +} // namespace TestUtilities diff --git a/testhelper/syncthingtestinstance.h b/testhelper/syncthingtestinstance.h index 0182a04..1a40d05 100644 --- a/testhelper/syncthingtestinstance.h +++ b/testhelper/syncthingtestinstance.h @@ -59,6 +59,6 @@ inline QProcess &SyncthingTestInstance::syncthingProcess() { return m_syncthingProcess; } -} +} // namespace TestUtilities #endif // SYNCTHINGTESTHELPER_SYNCTHINGTESTINSTANCE_H diff --git a/tray/application/main.cpp b/tray/application/main.cpp index e3b5985..cda3711 100644 --- a/tray/application/main.cpp +++ b/tray/application/main.cpp @@ -84,8 +84,9 @@ int initSyncthingTray(bool windowed, bool waitForTray, const char *connectionCon } #else QMessageBox::critical(nullptr, QApplication::applicationName(), - QApplication::translate("main", "The Qt libraries have not been built with tray icon support. You could open the tray menu as a regular " - "window using the -w flag, though.")); + QApplication::translate("main", + "The Qt libraries have not been built with tray icon support. You could open the tray menu as a regular " + "window using the -w flag, though.")); return -2; #endif } diff --git a/tray/application/singleinstance.cpp b/tray/application/singleinstance.cpp index 4229b0a..ab3462c 100644 --- a/tray/application/singleinstance.cpp +++ b/tray/application/singleinstance.cpp @@ -93,4 +93,4 @@ void SingleInstance::readArgs() emit newInstance(static_cast(args.size() - 1), args.data()); } -} +} // namespace QtGui diff --git a/tray/application/singleinstance.h b/tray/application/singleinstance.h index 8b22a80..97d5cc4 100644 --- a/tray/application/singleinstance.h +++ b/tray/application/singleinstance.h @@ -26,6 +26,6 @@ private Q_SLOTS: private: QLocalServer *m_server; }; -} +} // namespace QtGui #endif // SINGLEINSTANCE_H diff --git a/tray/gui/devbuttonsitemdelegate.cpp b/tray/gui/devbuttonsitemdelegate.cpp index 0d288e4..9bd8da2 100644 --- a/tray/gui/devbuttonsitemdelegate.cpp +++ b/tray/gui/devbuttonsitemdelegate.cpp @@ -60,4 +60,4 @@ void DevButtonsItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem option.rect.right() - 16, buttonY, 16, 16, index.data(SyncthingDeviceModel::DevicePaused).toBool() ? m_resumeIcon : m_pauseIcon); } } -} +} // namespace QtGui diff --git a/tray/gui/devbuttonsitemdelegate.h b/tray/gui/devbuttonsitemdelegate.h index cdcdb2d..9f229c1 100644 --- a/tray/gui/devbuttonsitemdelegate.h +++ b/tray/gui/devbuttonsitemdelegate.h @@ -17,6 +17,6 @@ private: const QPixmap m_pauseIcon; const QPixmap m_resumeIcon; }; -} +} // namespace QtGui #endif // DEVBUTTONSITEMDELEGATE_H diff --git a/tray/gui/devview.cpp b/tray/gui/devview.cpp index e476b02..99d79f7 100644 --- a/tray/gui/devview.cpp +++ b/tray/gui/devview.cpp @@ -98,4 +98,4 @@ void DevView::copySelectedItemId() } } } -} +} // namespace QtGui diff --git a/tray/gui/devview.h b/tray/gui/devview.h index 3ef90f6..e5d793b 100644 --- a/tray/gui/devview.h +++ b/tray/gui/devview.h @@ -25,6 +25,6 @@ private Q_SLOTS: void copySelectedItem(); void copySelectedItemId(); }; -} +} // namespace QtGui #endif // DEVVIEW_H diff --git a/tray/gui/dirbuttonsitemdelegate.cpp b/tray/gui/dirbuttonsitemdelegate.cpp index 3f18f74..66d2583 100644 --- a/tray/gui/dirbuttonsitemdelegate.cpp +++ b/tray/gui/dirbuttonsitemdelegate.cpp @@ -67,4 +67,4 @@ void DirButtonsItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem painter->drawPixmap(option.rect.right() - 16, buttonY, 16, 16, m_folderIcon); } } -} +} // namespace QtGui diff --git a/tray/gui/dirbuttonsitemdelegate.h b/tray/gui/dirbuttonsitemdelegate.h index c9b6f43..f5b04d6 100644 --- a/tray/gui/dirbuttonsitemdelegate.h +++ b/tray/gui/dirbuttonsitemdelegate.h @@ -19,6 +19,6 @@ private: const QPixmap m_pauseIcon; const QPixmap m_resumeIcon; }; -} +} // namespace QtGui #endif // DIRBUTTONSITEMDELEGATE_H diff --git a/tray/gui/dirview.cpp b/tray/gui/dirview.cpp index e7e17d5..3fde1dd 100644 --- a/tray/gui/dirview.cpp +++ b/tray/gui/dirview.cpp @@ -115,4 +115,4 @@ void DirView::copySelectedItemPath() } } } -} +} // namespace QtGui diff --git a/tray/gui/dirview.h b/tray/gui/dirview.h index 0a51dfa..c1b35f0 100644 --- a/tray/gui/dirview.h +++ b/tray/gui/dirview.h @@ -27,6 +27,6 @@ private Q_SLOTS: void copySelectedItem(); void copySelectedItemPath(); }; -} +} // namespace QtGui #endif // DIRVIEW_H diff --git a/tray/gui/downloaditemdelegate.cpp b/tray/gui/downloaditemdelegate.cpp index bf58c13..978939b 100644 --- a/tray/gui/downloaditemdelegate.cpp +++ b/tray/gui/downloaditemdelegate.cpp @@ -95,4 +95,4 @@ QSize DownloadItemDelegate::sizeHint(const QStyleOptionViewItem &option, const Q } return defaultSize; } -} +} // namespace QtGui diff --git a/tray/gui/downloaditemdelegate.h b/tray/gui/downloaditemdelegate.h index c8370f4..14ad73d 100644 --- a/tray/gui/downloaditemdelegate.h +++ b/tray/gui/downloaditemdelegate.h @@ -17,6 +17,6 @@ public: private: const QPixmap m_folderIcon; }; -} +} // namespace QtGui #endif // DOWNLOADITEMDELEGATE_H diff --git a/tray/gui/downloadview.cpp b/tray/gui/downloadview.cpp index 766b24e..b6db274 100644 --- a/tray/gui/downloadview.cpp +++ b/tray/gui/downloadview.cpp @@ -83,4 +83,4 @@ void DownloadView::copySelectedItem() } } } -} +} // namespace QtGui diff --git a/tray/gui/downloadview.h b/tray/gui/downloadview.h index d3bccc1..6f47e4c 100644 --- a/tray/gui/downloadview.h +++ b/tray/gui/downloadview.h @@ -6,7 +6,7 @@ namespace Data { struct SyncthingItemDownloadProgress; struct SyncthingDir; -} +} // namespace Data namespace QtGui { @@ -26,6 +26,6 @@ private Q_SLOTS: void showContextMenu(); void copySelectedItem(); }; -} +} // namespace QtGui #endif // DOWNLOADVIEW_H diff --git a/tray/gui/trayicon.cpp b/tray/gui/trayicon.cpp index 6edf271..7f39e94 100644 --- a/tray/gui/trayicon.cpp +++ b/tray/gui/trayicon.cpp @@ -219,7 +219,7 @@ void TrayIcon::showStatusNotification(SyncthingStatus status) #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD && !syncthingService().isManuallyStopped() #endif - ) { + ) { #ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS if (settings.dbusNotifications) { m_dbusNotifier.showDisconnect(); @@ -277,4 +277,4 @@ void TrayIcon::showInternalErrorsDialog() centerWidget(errorViewDlg); errorViewDlg->show(); } -} +} // namespace QtGui diff --git a/tray/gui/trayicon.h b/tray/gui/trayicon.h index 421bf4f..f6bad54 100644 --- a/tray/gui/trayicon.h +++ b/tray/gui/trayicon.h @@ -16,7 +16,7 @@ QT_FORWARD_DECLARE_CLASS(QNetworkRequest) namespace Data { enum class SyncthingStatus; enum class SyncthingErrorCategory; -} +} // namespace Data namespace QtGui { @@ -59,6 +59,6 @@ inline TrayMenu &TrayIcon::trayMenu() { return m_trayMenu; } -} +} // namespace QtGui #endif // TRAY_ICON_H diff --git a/tray/gui/traymenu.cpp b/tray/gui/traymenu.cpp index 58529da..8810ac5 100644 --- a/tray/gui/traymenu.cpp +++ b/tray/gui/traymenu.cpp @@ -58,4 +58,4 @@ void TrayMenu::showAtCursor() moveInside(pos, size(), QApplication::desktop()->availableGeometry(pos)); popup(pos); } -} +} // namespace QtGui diff --git a/tray/gui/traymenu.h b/tray/gui/traymenu.h index c3c40fa..0e75990 100644 --- a/tray/gui/traymenu.h +++ b/tray/gui/traymenu.h @@ -36,6 +36,6 @@ inline TrayIcon *TrayMenu::icon() { return m_trayIcon; } -} +} // namespace QtGui #endif // TRAY_MENU_H diff --git a/tray/gui/traywidget.cpp b/tray/gui/traywidget.cpp index 6e34755..984c8a3 100644 --- a/tray/gui/traywidget.cpp +++ b/tray/gui/traywidget.cpp @@ -591,4 +591,4 @@ void TrayWidget::showDialog(QWidget *dlg) dlg->show(); dlg->activateWindow(); } -} +} // namespace QtGui diff --git a/tray/gui/traywidget.h b/tray/gui/traywidget.h index 6c1b385..14bdfb6 100644 --- a/tray/gui/traywidget.h +++ b/tray/gui/traywidget.h @@ -116,6 +116,6 @@ inline const std::vector &TrayWidget::instances() { return m_instances; } -} +} // namespace QtGui #endif // TRAY_WIDGET_H diff --git a/widgets/misc/dbusstatusnotifier.cpp b/widgets/misc/dbusstatusnotifier.cpp index e3bad93..003630d 100644 --- a/widgets/misc/dbusstatusnotifier.cpp +++ b/widgets/misc/dbusstatusnotifier.cpp @@ -35,6 +35,6 @@ void DBusStatusNotifier::handleSyncthingNotificationAction(const QString &action emit showNotificationsRequested(); } } -} +} // namespace QtGui #endif diff --git a/widgets/misc/dbusstatusnotifier.h b/widgets/misc/dbusstatusnotifier.h index 98a2a32..a3f7985 100644 --- a/widgets/misc/dbusstatusnotifier.h +++ b/widgets/misc/dbusstatusnotifier.h @@ -69,6 +69,6 @@ inline void DBusStatusNotifier::showSyncComplete(const QString &message) { m_syncCompleteNotification.update(message); } -} +} // namespace QtGui #endif // !defined(SYNCTHINGWIDGETS_DBUSSTATUSNOTIFIER_H) && defined(QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS) diff --git a/widgets/misc/errorviewdialog.cpp b/widgets/misc/errorviewdialog.cpp index 1b5c282..9b9740d 100644 --- a/widgets/misc/errorviewdialog.cpp +++ b/widgets/misc/errorviewdialog.cpp @@ -110,4 +110,4 @@ void ErrorViewDialog::clearErrors() s_instance->browser()->clear(); } } -} +} // namespace QtGui diff --git a/widgets/misc/errorviewdialog.h b/widgets/misc/errorviewdialog.h index dd1a510..0b28d38 100644 --- a/widgets/misc/errorviewdialog.h +++ b/widgets/misc/errorviewdialog.h @@ -47,6 +47,6 @@ inline void ErrorViewDialog::showInstance() { instance()->show(); } -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_ERRORVIEWDIALOG_H diff --git a/widgets/misc/internalerror.cpp b/widgets/misc/internalerror.cpp index b88ca6d..2f44879 100644 --- a/widgets/misc/internalerror.cpp +++ b/widgets/misc/internalerror.cpp @@ -29,4 +29,4 @@ bool InternalError::isRelevant(const SyncthingConnection &connection, SyncthingE #endif ; } -} +} // namespace QtGui diff --git a/widgets/misc/internalerror.h b/widgets/misc/internalerror.h index 06b49cf..3182c88 100644 --- a/widgets/misc/internalerror.h +++ b/widgets/misc/internalerror.h @@ -12,7 +12,7 @@ namespace Data { class SyncthingConnection; enum class SyncthingErrorCategory; -} +} // namespace Data namespace QtGui { @@ -34,6 +34,6 @@ inline InternalError::InternalError(const QString &message, const QUrl &url, con , when(ChronoUtilities::DateTime::now()) { } -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_INTERNALERROR_H diff --git a/widgets/misc/otherdialogs.cpp b/widgets/misc/otherdialogs.cpp index 06ad7f0..cdd6f13 100644 --- a/widgets/misc/otherdialogs.cpp +++ b/widgets/misc/otherdialogs.cpp @@ -46,13 +46,14 @@ QDialog *ownDeviceIdDialog(Data::SyncthingConnection &connection) QObject::connect( copyPushButton, &QPushButton::clicked, bind(&QClipboard::setText, QGuiApplication::clipboard(), connection.myId(), QClipboard::Clipboard)); layout->addWidget(copyPushButton); - QObject::connect(dlg, &QWidget::destroyed, bind(static_cast(&QObject::disconnect), - connection.requestQrCode(connection.myId(), [pixmapLabel](const QByteArray &data) { - QPixmap pixmap; - pixmap.loadFromData(data); - pixmapLabel->setPixmap(pixmap); - }))); + QObject::connect(dlg, &QWidget::destroyed, + bind(static_cast(&QObject::disconnect), + connection.requestQrCode(connection.myId(), [pixmapLabel](const QByteArray &data) { + QPixmap pixmap; + pixmap.loadFromData(data); + pixmapLabel->setPixmap(pixmap); + }))); dlg->setLayout(layout); return dlg; } -} +} // namespace QtGui diff --git a/widgets/misc/statusinfo.cpp b/widgets/misc/statusinfo.cpp index ae346e3..bea4934 100644 --- a/widgets/misc/statusinfo.cpp +++ b/widgets/misc/statusinfo.cpp @@ -94,4 +94,4 @@ void StatusInfo::update(const SyncthingConnection &connection) m_additionalStatusText.clear(); } } -} +} // namespace QtGui diff --git a/widgets/misc/statusinfo.h b/widgets/misc/statusinfo.h index 41d1ac9..7ae448f 100644 --- a/widgets/misc/statusinfo.h +++ b/widgets/misc/statusinfo.h @@ -48,6 +48,6 @@ inline const QIcon &StatusInfo::statusIcon() const { return *m_statusIcon; } -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_STATUSINFO_H diff --git a/widgets/misc/textviewdialog.cpp b/widgets/misc/textviewdialog.cpp index 09db755..7283abd 100644 --- a/widgets/misc/textviewdialog.cpp +++ b/widgets/misc/textviewdialog.cpp @@ -132,8 +132,9 @@ TextViewDialog *TextViewDialog::forLogEntries(SyncthingConnection &connection) { auto *const dlg = new TextViewDialog(tr("Log")); const auto loadLog = [dlg, &connection] { - connect(dlg, &QWidget::destroyed, bind(static_cast(&QObject::disconnect), - connection.requestLog(bind(&TextViewDialog::showLogEntries, dlg, _1)))); + connect(dlg, &QWidget::destroyed, + bind(static_cast(&QObject::disconnect), + connection.requestLog(bind(&TextViewDialog::showLogEntries, dlg, _1)))); }; connect(dlg, &TextViewDialog::reload, loadLog); loadLog(); @@ -167,4 +168,4 @@ void TextViewDialog::showLogEntries(const std::vector &logEnt browser()->append(entry.when % QChar(':') % QChar(' ') % QChar('\n') % entry.message % QChar('\n')); } } -} +} // namespace QtGui diff --git a/widgets/misc/textviewdialog.h b/widgets/misc/textviewdialog.h index 9551934..e60088a 100644 --- a/widgets/misc/textviewdialog.h +++ b/widgets/misc/textviewdialog.h @@ -12,7 +12,7 @@ namespace Data { class SyncthingConnection; struct SyncthingDir; struct SyncthingLogEntry; -} +} // namespace Data namespace QtGui { @@ -43,6 +43,6 @@ inline QTextBrowser *TextViewDialog::browser() { return m_browser; } -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_TEXTVIEWDIALOG_H diff --git a/widgets/settings/settings.cpp b/widgets/settings/settings.cpp index 6781c9a..8efcba2 100644 --- a/widgets/settings/settings.cpp +++ b/widgets/settings/settings.cpp @@ -33,7 +33,7 @@ template <> struct hash { return qHash(str); } }; -} +} // namespace std namespace Settings { @@ -288,4 +288,4 @@ void save() v.qt.save(settings); } -} +} // namespace Settings diff --git a/widgets/settings/settings.h b/widgets/settings/settings.h index b56b12e..af26bd8 100644 --- a/widgets/settings/settings.h +++ b/widgets/settings/settings.h @@ -109,6 +109,6 @@ struct SYNCTHINGWIDGETS_EXPORT Settings { Settings SYNCTHINGWIDGETS_EXPORT &values(); void SYNCTHINGWIDGETS_EXPORT restore(); void SYNCTHINGWIDGETS_EXPORT save(); -} +} // namespace Settings #endif // SETTINGS_H diff --git a/widgets/settings/settingsdialog.cpp b/widgets/settings/settingsdialog.cpp index b4ed4a0..85cca05 100644 --- a/widgets/settings/settingsdialog.cpp +++ b/widgets/settings/settingsdialog.cpp @@ -897,9 +897,9 @@ QWidget *WebViewOptionPage::setupWidget() auto *label = new QLabel; label->setWindowTitle(QCoreApplication::translate("QtGui::WebViewOptionPage", "General")); label->setAlignment(Qt::AlignCenter); - label->setText( - QCoreApplication::translate("QtGui::WebViewOptionPage", "Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit " - "or Qt WebEngine.\nThe Web UI will be opened in the default web browser instead.")); + label->setText(QCoreApplication::translate("QtGui::WebViewOptionPage", + "Syncthing Tray has not been built with vieb view support utilizing either Qt WebKit " + "or Qt WebEngine.\nThe Web UI will be opened in the default web browser instead.")); return label; } #endif @@ -964,7 +964,7 @@ SettingsDialog::SettingsDialog(Data::SyncthingConnection *connection, QWidget *p #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD << new SystemdOptionPage #endif - ); + ); category->setIcon(QIcon::fromTheme(QStringLiteral("system-run"), QIcon(QStringLiteral(":/icons/hicolor/scalable/apps/system-run.svg")))); categories << category; @@ -987,7 +987,7 @@ void SettingsDialog::init() // some settings could be applied without restarting the application, good idea? //connect(this, &Dialogs::SettingsDialog::applied, bind(&Dialogs::QtSettings::apply, &Settings::qtSettings())); } -} +} // namespace QtGui INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, ConnectionOptionPage) INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, NotificationsOptionPage) diff --git a/widgets/settings/settingsdialog.h b/widgets/settings/settingsdialog.h index 7fd685f..57cfb58 100644 --- a/widgets/settings/settingsdialog.h +++ b/widgets/settings/settingsdialog.h @@ -18,7 +18,7 @@ namespace Data { class SyncthingConnection; class SyncthingService; class SyncthingProcess; -} +} // namespace Data namespace QtGui { @@ -120,7 +120,7 @@ public: private: void init(); }; -} +} // namespace QtGui DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, ConnectionOptionPage) DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(QtGui, NotificationsOptionPage) diff --git a/widgets/webview/webpage.cpp b/widgets/webview/webpage.cpp index f92ece1..3d8284e 100644 --- a/widgets/webview/webpage.cpp +++ b/widgets/webview/webpage.cpp @@ -166,6 +166,6 @@ void WebPage::handleSslErrors(QNetworkReply *reply, const QList &erro } } #endif -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_NO_WEBVIEW diff --git a/widgets/webview/webpage.h b/widgets/webview/webpage.h index 434e447..df36f2e 100644 --- a/widgets/webview/webpage.h +++ b/widgets/webview/webpage.h @@ -47,7 +47,7 @@ private: WebViewDialog *m_dlg; SYNCTHINGWIDGETS_WEB_VIEW *m_view; }; -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_NO_WEBVIEW #endif // WEBPAGE_H diff --git a/widgets/webview/webviewdialog.cpp b/widgets/webview/webviewdialog.cpp index 8dee9ed..dc66860 100644 --- a/widgets/webview/webviewdialog.cpp +++ b/widgets/webview/webviewdialog.cpp @@ -122,6 +122,6 @@ bool WebViewDialog::eventFilter(QObject *watched, QEvent *event) return QMainWindow::eventFilter(watched, event); } #endif -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_NO_WEBVIEW diff --git a/widgets/webview/webviewdialog.h b/widgets/webview/webviewdialog.h index eba2e8c..759a4d5 100644 --- a/widgets/webview/webviewdialog.h +++ b/widgets/webview/webviewdialog.h @@ -46,7 +46,7 @@ inline const Data::SyncthingConnectionSettings &WebViewDialog::settings() const { return m_settings; } -} +} // namespace QtGui #endif // SYNCTHINGWIDGETS_NO_WEBVIEW #endif // WEBVIEW_DIALOG_H