From 0ef3b804471426a817b236459ab8aef0abbc6196 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 3 Jul 2021 19:29:49 +0200 Subject: [PATCH] Fix typos found via `codespell --skip .git -w` --- README.md | 20 +++++++++---------- cli/args.cpp | 2 +- connector/CMakeLists.txt | 2 +- connector/syncthingconnection.cpp | 16 +++++++-------- connector/syncthingconnection.h | 6 +++--- connector/syncthingconnection_requests.cpp | 6 +++--- connector/syncthingconnectionmockhelpers.cpp | 2 +- connector/syncthingnotifier.h | 2 +- connector/syncthingprocess.cpp | 2 +- connector/syncthingprocess.h | 2 +- connector/syncthingservice.cpp | 2 +- connector/tests/connectiontests.cpp | 4 ++-- connector/tests/misctests.cpp | 4 ++-- connector/utils.cpp | 2 +- fileitemactionplugin/CMakeLists.txt | 2 +- .../syncthingfileitemaction.cpp | 2 +- libsyncthing/tests/interfacetests.cpp | 2 +- model/CMakeLists.txt | 2 +- plasmoid/lib/CMakeLists.txt | 2 +- testhelper/CMakeLists.txt | 4 ++-- testhelper/helper.h | 8 ++++---- tray/CMakeLists.txt | 6 +++--- tray/gui/traywidget.cpp | 2 +- widgets/CMakeLists.txt | 2 +- widgets/misc/internalerrorsdialog.cpp | 2 +- widgets/misc/syncthinglauncher.cpp | 2 +- widgets/misc/syncthinglauncher.h | 2 +- widgets/webview/webviewdialog.cpp | 2 +- 28 files changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 0e5a90b..260da9e 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ it is usually started via "socket activation" (e.g. `/usr/lib/systemd/user/dbus. D-Bus). All of this counts for the session D-Bus *and* for the system D-Bus although the startup of the session -D-Bus can be screwed up particularily easy. One easy way to screw it up is to start a second instance of +D-Bus can be screwed up particularly easy. One easy way to screw it up is to start a second instance of the session D-Bus manually e.g. via `dbus-run-session`. When starting the session D-Bus this way the systemd integration will *not* work and you will likely end up with two session D-Bus processes. It is also worth noticing that you do *not* need to set the `DBUS_SESSION_BUS_ADDRESS` variable manually @@ -179,7 +179,7 @@ Note that the Plasma Wayland session screwed things up in the way I've described but this change might not be available on older distributions. ### Build-time configuration -The systemd integration can be explicitely enabled/disabled add compile time by adding +The systemd integration can be explicitly enabled/disabled add compile time by adding `-DSYSTEMD_SUPPORT=ON/OFF` to the CMake arguments. If the systemd integration does not work be sure your version of Syncthing Tray has been compiled with systemd support. @@ -245,20 +245,20 @@ See the release section on GitHub. ## Build instructions The application depends on [c++utilities](https://github.com/Martchus/cpp-utilities) and -[qtutilities](https://github.com/Martchus/qtutilities) and is built the same way as these libaries. +[qtutilities](https://github.com/Martchus/qtutilities) and is built the same way as these libraries. For basic instructions checkout the README file of [c++utilities](https://github.com/Martchus/cpp-utilities). For building this straight, see the section below. There's also documentation about [various build variables](https://github.com/Martchus/cpp-utilities/blob/master/doc/buildvariables.md) which can be passed to CMake to influence the build. ### Further dependencies -The following Qt modules are requried (version 5.6 or newer): core network dbus gui widgets svg webenginewidgets/webkitwidgets +The following Qt modules are required (version 5.6 or newer): core network dbus gui widgets svg webenginewidgets/webkitwidgets It is recommended to use at least Qt 5.14 to avoid limitations in previous versions (see *Known bugs* section). The built-in web view and therefore the modules webenginewidgets/webkitwidgets are optional (see section *Select Qt module for WebView*). -To build the plugin for Dolphin integration KIO is also requried. Additionally, the Dolphin plugin requires Qt 5.8 or newer. To skip +To build the plugin for Dolphin integration KIO is also required. Additionally, the Dolphin plugin requires Qt 5.8 or newer. To skip building the plugin, add `-DNO_FILE_ITEM_ACTION_PLUGIN:BOOL=ON` to the CMake arguments. To build the Plasmoid for the Plasma 5 desktop, the Qt module QML and the KF5 module @@ -287,7 +287,7 @@ Building the testsuite requires CppUnit and Qt 5.8 or higher. ### Building this straight 0. Install (preferably the latest version of) the CGG toolchain or Clang, the required Qt modules and CMake. -1. Get the sources. For the lastest version from Git clone the following repositories: +1. Get the sources. For the latest version from Git clone the following repositories: ``` cd $SOURCES git clone https://github.com/Martchus/cpp-utilities.git c++utilities @@ -360,7 +360,7 @@ specify the directory manually, e.g. for Tumbleweed one would add Also be sure that the version of the plasma framework the plasmoid was built against is *not* newer than the version actually installed on the system. That can for instance easily happen when using -`tumbleweed-cli` for sticking to a previous snapshot but having the lastest version of the plasmoid +`tumbleweed-cli` for sticking to a previous snapshot but having the latest version of the plasmoid from my home repository installed. --- @@ -410,11 +410,11 @@ Translations for further locales can be added quite easily: ### Using backend libraries The contained backend libraries (which provide connecting to Syncthing, data models and more) are written for internal -use whithin the components contained by this repository. +use within the components contained by this repository. Hence those libraries do *not* provide a stable ABI/API. If you like to use them to develop Syncthing integration or tooling with Qt and C++, it makes most sense to contribute it as an additional component -directly to this repository. Then I will be able to take it into account when changeing the API. +directly to this repository. Then I will be able to take it into account when changing the API. ### KDE integration Since the Dolphin integration and the Plasmoid are plugins, testing and debugging requires a few extra steps. @@ -428,7 +428,7 @@ It is possible to turn on logging of the underlying library by setting environme * `LIB_SYNCTHING_CONNECTOR_LOG_API_CALLS`: log calls to Syncthing's REST-API * `LIB_SYNCTHING_CONNECTOR_LOG_API_REPLIES`: log replies from Syncthing's REST-API (except events) * `LIB_SYNCTHING_CONNECTOR_LOG_EVENTS`: log events emitted by Syncthing's events REST-API endpoint -* `LIB_SYNCTHING_CONNECTOR_LOG_DIRS_OR_DEVS_RESETTED`: log when directories/devices are internally resetted +* `LIB_SYNCTHING_CONNECTOR_LOG_DIRS_OR_DEVS_RESETTED`: log when directories/devices are internally reset ## Planned features The tray is still under development; the following features are under construction or planned: diff --git a/cli/args.cpp b/cli/args.cpp index 90b1df6..fc45547 100644 --- a/cli/args.cpp +++ b/cli/args.cpp @@ -33,7 +33,7 @@ Args::Args() { "number" }) , timeout("timeout", 't', "specifies how many milliseconds to wait at most", { "number" }) , editor("editor", '\0', "specifies the editor to be opened", { "editor name", "editor option" }) - , configFile("config-file", 'f', "specifies the Syncthing config file to read API key and URL from, when not explicitely specified", { "path" }) + , configFile("config-file", 'f', "specifies the Syncthing config file to read API key and URL from, when not explicitly specified", { "path" }) , apiKey("api-key", 'k', "specifies the API key", { "key" }) , url("url", 'u', "specifies the Syncthing URL, default is http://localhost:8080", { "URL" }) , credentials("credentials", 'c', "specifies user name and password", { "user name", "password" }) diff --git a/connector/CMakeLists.txt b/connector/CMakeLists.txt index 971a1ac..256b40c 100644 --- a/connector/CMakeLists.txt +++ b/connector/CMakeLists.txt @@ -77,7 +77,7 @@ if (USE_BOOST_PROCESS) use_package(TARGET_NAME Threads::Threads PACKAGE_NAME Threads PACKAGE_ARGS REQUIRED) endif () -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network) set(META_PUBLIC_QT_MODULES Core ${ADDITIONAL_QT_MODULES}) diff --git a/connector/syncthingconnection.cpp b/connector/syncthingconnection.cpp index 044ad85..750db9a 100644 --- a/connector/syncthingconnection.cpp +++ b/connector/syncthingconnection.cpp @@ -47,11 +47,11 @@ QNetworkAccessManager &networkAccessManager() * \remarks All requests are performed asynchronously. * * The first thing to do when working with that class is setting the URL to connect to and the API key - * via the constructor or setSyncthingUrl() and setApiKey(). Credentials for the HTTP authentification + * via the constructor or setSyncthingUrl() and setApiKey(). Credentials for the HTTP authentication * can be set via setCredentials() if not included in the URL. * * Requests can then be done via the request...() methods, eg. requestConfig(). This would emit the - * newConfig() signal on success and the error() signal when an error occured. The other request...() + * newConfig() signal on success and the error() signal when an error occurred. The other request...() * methods work in a similar way. * * However, usually it is best to simply call the connect() method. It will do all required requests @@ -313,7 +313,7 @@ void SyncthingConnection::disconnect() /*! * \brief Aborts status-relevant, pending requests. - * \remarks Status-relevant means that requests for tiggering actions like rescan() or restart() are excluded. requestQrCode() does not + * \remarks Status-relevant means that requests for triggering actions like rescan() or restart() are excluded. requestQrCode() does not * contribute to the status as well and is excluded as well. */ void SyncthingConnection::abortAllRequests() @@ -1002,7 +1002,7 @@ void SyncthingConnection::handleFatalConnectionError() } /*! - * \brief Handles cancelation of additional requests done via continueConnecting() method. + * \brief Handles cancellation of additional requests done via continueConnecting() method. */ void SyncthingConnection::handleAdditionalRequestCanceled() { @@ -1119,25 +1119,25 @@ void SyncthingConnection::recalculateStatus() /*! * \fn SyncthingConnection::newConfigTriggered() - * \brief Indicates a new configuration has posted sucessfully via postConfig(). + * \brief Indicates a new configuration has posted successfully via postConfig(). * \remarks In contrast to newConfig(), this signal is only emitted for configuration changes internally posted via postConfig(). */ /*! * \fn SyncthingConnection::rescanTriggered() - * \brief Indicates a rescan has been triggered sucessfully. + * \brief Indicates a rescan has been triggered successfully. * \remarks Only emitted for rescans triggered internally via rescan() or rescanAll(). */ /*! * \fn SyncthingConnection::pauseTriggered() - * \brief Indicates a device has been paused sucessfully. + * \brief Indicates a device has been paused successfully. * \remarks Only emitted for pausing triggered internally via pause() or pauseAll(). */ /*! * \fn SyncthingConnection::resumeTriggered() - * \brief Indicates a device has been resumed sucessfully. + * \brief Indicates a device has been resumed successfully. * \remarks Only emitted for resuming triggered internally via resume() or resumeAll(). */ diff --git a/connector/syncthingconnection.h b/connector/syncthingconnection.h index b1a554d..675ba6c 100644 --- a/connector/syncthingconnection.h +++ b/connector/syncthingconnection.h @@ -58,7 +58,7 @@ enum class SyncthingConnectionLoggingFlags : quint64 { ApiCalls = (1 << 1), /**< log calls to Syncthing's REST-API and responses */ ApiReplies = (1 << 2), /**< log replies fromm Syncthing's REST-API */ Events = (1 << 3), /**< log events received via Syncthing's event API */ - DirsOrDevsResetted = (1 << 4), /**< log list of directories/devices when list is resetted */ + DirsOrDevsResetted = (1 << 4), /**< log list of directories/devices when list is reset */ All = ApiCalls | ApiReplies | Events | DirsOrDevsResetted, /** log as much as possible */ }; @@ -482,7 +482,7 @@ inline SyncthingStatus SyncthingConnection::status() const /*! * \brief Returns whether the connection to Syncthing has been established. * - * If ture, all information like dirInfo() and devInfo() has been populated and will be updated if it changes. + * If true, all information like dirInfo() and devInfo() has been populated and will be updated if it changes. */ inline bool SyncthingConnection::isConnected() const { @@ -534,7 +534,7 @@ inline void SyncthingConnection::setRequestingCompletionEnabled(bool requestingC } /*! - * \brief Interanlly called to emit the notification with the specified \a message. + * \brief Internally called to emit the notification with the specified \a message. * \remarks Ensures the unread notifications flag is set. */ inline void SyncthingConnection::emitNotification(CppUtilities::DateTime when, const QString &message) diff --git a/connector/syncthingconnection_requests.cpp b/connector/syncthingconnection_requests.cpp index c397fbc..718a090 100644 --- a/connector/syncthingconnection_requests.cpp +++ b/connector/syncthingconnection_requests.cpp @@ -834,7 +834,7 @@ void SyncthingConnection::readErrors() return; } - // ignore any errors occured before connecting + // ignore any errors occurred before connecting if (m_lastErrorTime.isNull()) { m_lastErrorTime = DateTime::now(); } @@ -1342,7 +1342,7 @@ void SyncthingConnection::readLog() /*! * \brief Posts the specified \a rawConfig. - * \remarks The signal newConfigTriggered() is emitted when the config has been posted sucessfully. In the error case, error() is emitted. + * \remarks The signal newConfigTriggered() is emitted when the config has been posted successfully. In the error case, error() is emitted. * Besides, the newConfig() signal should be emitted as well, indicating Syncthing has actually applied the new configuration. */ void SyncthingConnection::postConfigFromJsonObject(const QJsonObject &rawConfig) @@ -1354,7 +1354,7 @@ void SyncthingConnection::postConfigFromJsonObject(const QJsonObject &rawConfig) /*! * \brief Posts the specified \a rawConfig. * \param rawConfig A valid JSON document containing the configuration. It is directly passed to Syncthing. - * \remarks The signal newConfigTriggered() is emitted when the config has been posted sucessfully. In the error case, error() is emitted. + * \remarks The signal newConfigTriggered() is emitted when the config has been posted successfully. In the error case, error() is emitted. * Besides, the newConfig() signal should be emitted as well, indicating Syncthing has actually applied the new configuration. */ void SyncthingConnection::postConfigFromByteArray(const QByteArray &rawConfig) diff --git a/connector/syncthingconnectionmockhelpers.cpp b/connector/syncthingconnectionmockhelpers.cpp index 59f0b0a..0599c9a 100644 --- a/connector/syncthingconnectionmockhelpers.cpp +++ b/connector/syncthingconnectionmockhelpers.cpp @@ -36,7 +36,7 @@ string readMockFile(const string &filePath) try { return readFile(filePath); } catch (const std::ios_base::failure &failure) { - cerr << Phrases::Error << "An IO error occured when reading mock config file \"" << filePath << "\": " << failure.what() << Phrases::EndFlush; + cerr << Phrases::Error << "An IO error occurred when reading mock config file \"" << filePath << "\": " << failure.what() << Phrases::EndFlush; exit(-2); } } diff --git a/connector/syncthingnotifier.h b/connector/syncthingnotifier.h index faf3f81..370ac32 100644 --- a/connector/syncthingnotifier.h +++ b/connector/syncthingnotifier.h @@ -133,7 +133,7 @@ inline void SyncthingNotifier::setEnabledNotifications(SyncthingHighLevelNotific } /*! - * \brief Returns the number of seconds after startup or standby-wakeup to supress disconnect notifications. + * \brief Returns the number of seconds after startup or standby-wakeup to suppress disconnect notifications. */ inline unsigned int SyncthingNotifier::ignoreInavailabilityAfterStart() const { diff --git a/connector/syncthingprocess.cpp b/connector/syncthingprocess.cpp index 4c1c84f..e239f4d 100644 --- a/connector/syncthingprocess.cpp +++ b/connector/syncthingprocess.cpp @@ -116,7 +116,7 @@ SyncthingProcess::~SyncthingProcess() } /*! - * \brief Splits the given arguments similar to how a shell would split it. So whitespaces are considered seperators unless quotes are used. + * \brief Splits the given arguments similar to how a shell would split it. So whitespaces are considered separators unless quotes are used. */ QStringList SyncthingProcess::splitArguments(const QString &arguments) { diff --git a/connector/syncthingprocess.h b/connector/syncthingprocess.h index 59bf579..48da7da 100644 --- a/connector/syncthingprocess.h +++ b/connector/syncthingprocess.h @@ -124,7 +124,7 @@ inline bool SyncthingProcess::isActiveFor(unsigned int atLeastSeconds) const /// \brief Returns whether the process has been manually stopped via SyncthingProcess::stopSyncthing(), SyncthingProcess::killSyncthing() /// or SyncthingProcess::restartSyncthing(). -/// \remarks Resetted on SyncthingProcess::startSyncthing() and SyncthingProcess::restartSyncthing(). +/// \remarks Reset on SyncthingProcess::startSyncthing() and SyncthingProcess::restartSyncthing(). inline bool SyncthingProcess::isManuallyStopped() const { return m_manuallyStopped; diff --git a/connector/syncthingservice.cpp b/connector/syncthingservice.cpp index 5defc6f..7739a9b 100644 --- a/connector/syncthingservice.cpp +++ b/connector/syncthingservice.cpp @@ -291,7 +291,7 @@ void SyncthingService::setScopeAndUnitName(SystemdScope scope, const QString &un } /*! - * \brief Returns whether systemd (and specificly its D-Bus interface for user services) is available. + * \brief Returns whether systemd (and specifically its D-Bus interface for user services) is available. * \remarks The availability might not be instantly detected and may change at any time. Use the systemdAvailableChanged() * to react to availability changes. */ diff --git a/connector/tests/connectiontests.cpp b/connector/tests/connectiontests.cpp index 0d1ef96..1b1883b 100644 --- a/connector/tests/connectiontests.cpp +++ b/connector/tests/connectiontests.cpp @@ -337,9 +337,9 @@ void ConnectionTests::testErrorCases() // check whether Syncthing is available if ((errorMessage == QStringLiteral("Unable to request Syncthing status: Connection refused")) || (errorMessage == QStringLiteral("Unable to request Syncthing config: Connection refused"))) { - // consider test failed if we receive "Connection refused" when another error has already occured + // consider test failed if we receive "Connection refused" when another error has already occurred if (syncthingAvailable) { - CPPUNIT_FAIL("Syncthing became unavailable after another error had already occured"); + CPPUNIT_FAIL("Syncthing became unavailable after another error had already occurred"); } // consider test failed if Syncthing takes too long to come up (or we fail to connect) diff --git a/connector/tests/misctests.cpp b/connector/tests/misctests.cpp index 543525f..4d9057d 100644 --- a/connector/tests/misctests.cpp +++ b/connector/tests/misctests.cpp @@ -143,13 +143,13 @@ void MiscTests::testUtils() #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD /*! - * \brief Tests SyncthingService class, but error case with non-existant service so far. + * \brief Tests SyncthingService class, but error case with non-existent service so far. */ void MiscTests::testService() { SyncthingService service; service.isSystemdAvailable(); - service.setUnitName(QStringLiteral("non-existant.service")); + service.setUnitName(QStringLiteral("non-existent.service")); CPPUNIT_ASSERT(!service.isUnitAvailable()); CPPUNIT_ASSERT_EQUAL(QString(), service.description()); CPPUNIT_ASSERT(!service.isRunning()); diff --git a/connector/utils.cpp b/connector/utils.cpp index aebfcca..5e4b824 100644 --- a/connector/utils.cpp +++ b/connector/utils.cpp @@ -61,7 +61,7 @@ QString directoryStatusString(const SyncthingStatistics &stats) } /*! - * \brief Returns the "sync complete" notication message for the specified directories. + * \brief Returns the "sync complete" notification message for the specified directories. */ QString syncCompleteString(const std::vector &completedDirs, const SyncthingDev *remoteDevice) { diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt index b66dc18..774f15e 100644 --- a/fileitemactionplugin/CMakeLists.txt +++ b/fileitemactionplugin/CMakeLists.txt @@ -28,7 +28,7 @@ use_syncthingconnector() find_package(syncthingmodel ${META_APP_VERSION} REQUIRED) use_syncthingmodel() -# link also explicitely against the following Qt and KF modules +# link also explicitly against the following Qt and KF modules list(APPEND ADDITIONAL_QT_MODULES Network) list(APPEND ADDITIONAL_KF_MODULES KIO) set(KIO_MODULE_TARGETS KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets KF5::KIONTLM) diff --git a/fileitemactionplugin/syncthingfileitemaction.cpp b/fileitemactionplugin/syncthingfileitemaction.cpp index e38f559..47b9e8f 100644 --- a/fileitemactionplugin/syncthingfileitemaction.cpp +++ b/fileitemactionplugin/syncthingfileitemaction.cpp @@ -155,7 +155,7 @@ QList SyncthingFileItemAction::createActions(const KFileItemListPrope } } - // add actions for explicitely selected Syncthing dirs + // add actions for explicitly selected Syncthing dirs if (!detectedDirs.isEmpty()) { // rescan item diff --git a/libsyncthing/tests/interfacetests.cpp b/libsyncthing/tests/interfacetests.cpp index 409d4f6..97f3838 100644 --- a/libsyncthing/tests/interfacetests.cpp +++ b/libsyncthing/tests/interfacetests.cpp @@ -173,7 +173,7 @@ void InterfaceTests::testRun(const std::function &runFunction, bool const auto timeout((DateTime::gmtNow() - startTime) > TimeSpan::fromSeconds(30)); if (!timeout && (!myIdAnnounced || !performanceAnnounced || (assertTestConfig && (!testDir1Ready || !testDev1Ready || !testDev2Ready)))) { // log status - cout << "still wating for:"; + cout << "still waiting for:"; if (!myIdAnnounced) { cout << " myIdAnnounced"; } diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index a7b2c2c..36c1f84 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -47,7 +47,7 @@ use_qt_utilities() find_package(syncthingconnector ${META_APP_VERSION} REQUIRED) use_syncthingconnector(VISIBILITY PUBLIC) -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network Gui Widgets Svg) # include modules to apply configuration diff --git a/plasmoid/lib/CMakeLists.txt b/plasmoid/lib/CMakeLists.txt index 39553b2..a8c7566 100644 --- a/plasmoid/lib/CMakeLists.txt +++ b/plasmoid/lib/CMakeLists.txt @@ -28,7 +28,7 @@ use_syncthingmodel() find_package(syncthingwidgets ${META_APP_VERSION} REQUIRED) use_syncthingwidgets() -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network Qml) list(APPEND ADDITIONAL_KF_MODULES Plasma) diff --git a/testhelper/CMakeLists.txt b/testhelper/CMakeLists.txt index ab77207..3dd5ca1 100644 --- a/testhelper/CMakeLists.txt +++ b/testhelper/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) set(META_PROJECT_NAME syncthingtesthelper) set(META_PROJECT_TYPE library) set(META_APP_NAME "Syncthing Tray Test Helper") -set(META_APP_DESCRIPTION "Helper for testing compontents of Syncthing Tray") +set(META_APP_DESCRIPTION "Helper for testing components of Syncthing Tray") set(META_PUBLIC_QT_MODULES Core) set(META_NO_INSTALL_TARGETS ON) set(META_NO_CPP_UNIT ON) @@ -35,7 +35,7 @@ list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS}) find_package(syncthingconnector ${META_APP_VERSION} REQUIRED) use_syncthingconnector() -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network) # include modules to apply configuration diff --git a/testhelper/helper.h b/testhelper/helper.h index 682aa06..3afe3c4 100644 --- a/testhelper/helper.h +++ b/testhelper/helper.h @@ -341,7 +341,7 @@ template bool waitForSignals(Action ac * \brief Waits until the specified signals have been emitted when performing async operations triggered by \a action. Aborts when \a failure is emitted. * \arg action Specifies a method to trigger the action to run when waiting. * \arg timeout Specifies the max. time to wait in ms. Set to zero to wait forever. - * \arg failure Specifies the signal indicating an error occured. + * \arg failure Specifies the signal indicating an error occurred. * \arg signalinfo Specifies the signals to wait for. * \throws Fails if not all signals have been emitted in at least \a timeout milliseconds or when at least one of the * required connections can not be established. @@ -384,14 +384,14 @@ bool waitForSignalsOrFail(Action action, int timeout, const SignalInfo &failure, } while (!(failureEmitted = checkWhetherAllSignalsEmitted(failure)) && !(allSignalsEmitted = checkWhetherAllSignalsEmitted(signalinfo...)) && (!timeout || timer.isActive())); - // check whether a timeout occured + // check whether a timeout occurred const bool timeoutFailed(!allSignalsEmitted && timeout && !timer.isActive()); #ifndef SYNCTHINGTESTHELPER_FOR_CLI if (failureEmitted) { CPPUNIT_FAIL( - argsToString("Signal(s) ", failedSignalNames(signalinfo...).data(), " has/have not emmitted before ", failure.signalName().data(), '.')); + argsToString("Signal(s) ", failedSignalNames(signalinfo...).data(), " has/have not emitted before ", failure.signalName().data(), '.')); } else if (timeoutFailed) { - CPPUNIT_FAIL(argsToString("Signal(s) ", failedSignalNames(signalinfo...).data(), " has/have not emmitted within at least ", timer.interval(), + CPPUNIT_FAIL(argsToString("Signal(s) ", failedSignalNames(signalinfo...).data(), " has/have not emitted within at least ", timer.interval(), " ms (set environment variable SYNCTHING_TEST_TIMEOUT_FACTOR to increase the timeout).", timeoutFactor != 1.0 ? argsToString(" (original timeout: ", timeout, " ms)") : std::string())); } diff --git a/tray/CMakeLists.txt b/tray/CMakeLists.txt index 69f7151..2ba226b 100644 --- a/tray/CMakeLists.txt +++ b/tray/CMakeLists.txt @@ -42,8 +42,8 @@ set(ICON_FILES resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg) set(DOC_FILES README.md) -# declare required icons; used when bundling icon themes -# note: Icons required by libraries the tray application depends on need to be specified as well. +# declare required icons; used when bundling icon themes (Icons required by libraries the tray application depends on +# need to be specified as well.) set(REQUIRED_ICONS color-profile dialog-cancel @@ -112,7 +112,7 @@ use_syncthingmodel() find_package(syncthingwidgets ${META_APP_VERSION} REQUIRED) use_syncthingwidgets() -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network) # apply basic configuration diff --git a/tray/gui/traywidget.cpp b/tray/gui/traywidget.cpp index ca3de93..6cc7d49 100644 --- a/tray/gui/traywidget.cpp +++ b/tray/gui/traywidget.cpp @@ -510,7 +510,7 @@ void TrayWidget::applySettings(const QString &connectionConfig) m_menu->icon()->updateStatusIconAndText(); } - // show warning when explicitely specified connection configuration was not found + // show warning when explicitly specified connection configuration was not found if (!specifiedConnectionConfigFound && !connectionConfig.isEmpty()) { auto *const msgBox = new QMessageBox(QMessageBox::Warning, QCoreApplication::applicationName(), tr("The specified connection configuration %1 is not defined and hence ignored.").arg(connectionConfig)); diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt index dc095b0..bf208a1 100644 --- a/widgets/CMakeLists.txt +++ b/widgets/CMakeLists.txt @@ -105,7 +105,7 @@ if (SYNCTHING_WIDGETS_LOG_JAVASCRIPT_CONSOLE) message(WARNING "JavaScript console of web view will be logged to stderr") endif () -# link also explicitely against the following Qt modules +# link also explicitly against the following Qt modules list(APPEND ADDITIONAL_QT_MODULES Network Concurrent) # include modules to apply configuration diff --git a/widgets/misc/internalerrorsdialog.cpp b/widgets/misc/internalerrorsdialog.cpp index c73240d..c9bdcc6 100644 --- a/widgets/misc/internalerrorsdialog.cpp +++ b/widgets/misc/internalerrorsdialog.cpp @@ -105,7 +105,7 @@ void InternalErrorsDialog::internalAddError(const InternalError &error) void InternalErrorsDialog::updateStatusLabel() { - m_statusLabel->setText(tr("%1 error(s) occured", nullptr, static_cast(min(s_internalErrors.size(), numeric_limits::max()))) + m_statusLabel->setText(tr("%1 error(s) occurred", nullptr, static_cast(min(s_internalErrors.size(), numeric_limits::max()))) .arg(s_internalErrors.size())); } diff --git a/widgets/misc/syncthinglauncher.cpp b/widgets/misc/syncthinglauncher.cpp index 5d2dd4f..36895a0 100644 --- a/widgets/misc/syncthinglauncher.cpp +++ b/widgets/misc/syncthinglauncher.cpp @@ -22,7 +22,7 @@ SyncthingLauncher *SyncthingLauncher::s_mainInstance = nullptr; * \remarks * - This is *not* strictly a singleton class. However, one instance is supposed to be the "main instance" (see SyncthingLauncher::setMainInstance()). * - A SyncthingLauncher instance can only launch one Syncthing instance at a time. - * - Using Syncthing as library is still under development and must be explicitely enabled by setting the CMake variable USE_LIBSYNCTHING. + * - Using Syncthing as library is still under development and must be explicitly enabled by setting the CMake variable USE_LIBSYNCTHING. */ /*! diff --git a/widgets/misc/syncthinglauncher.h b/widgets/misc/syncthinglauncher.h index f004a7d..e3e4b70 100644 --- a/widgets/misc/syncthinglauncher.h +++ b/widgets/misc/syncthinglauncher.h @@ -120,7 +120,7 @@ inline bool SyncthingLauncher::isActiveFor(unsigned int atLeastSeconds) const /// \brief Returns whether the Syncthing instance has been manually stopped using SyncthingLauncher::terminate() /// or SyncthingLauncher::kill(). -/// \remarks This is resetted when calling SyncthingLauncher::launch(). +/// \remarks This is reset when calling SyncthingLauncher::launch(). inline bool SyncthingLauncher::isManuallyStopped() const { return m_manuallyStopped; diff --git a/widgets/webview/webviewdialog.cpp b/widgets/webview/webviewdialog.cpp index 8fe71f6..392d205 100644 --- a/widgets/webview/webviewdialog.cpp +++ b/widgets/webview/webviewdialog.cpp @@ -62,7 +62,7 @@ QtGui::WebViewDialog::~WebViewDialog() void QtGui::WebViewDialog::applySettings(const Data::SyncthingConnectionSettings &connectionSettings, bool aboutToShow) { - // delete the web view if currently hidden and the configuration to keep it running in the backround isn't enabled + // delete the web view if currently hidden and the configuration to keep it running in the background isn't enabled const auto &settings(Settings::values()); if (!aboutToShow && !settings.webView.keepRunning && isHidden()) { deleteLater();