Changeset View
Changeset View
Standalone View
Standalone View
src/agentbase/agentbase.cpp
Show First 20 Lines • Show All 898 Lines • ▼ Show 20 Line(s) | |||||
899 | 899 | | |||
900 | AgentBase::~AgentBase() | 900 | AgentBase::~AgentBase() | ||
901 | { | 901 | { | ||
902 | delete d_ptr; | 902 | delete d_ptr; | ||
903 | } | 903 | } | ||
904 | 904 | | |||
905 | void AgentBase::debugAgent(int argc, char **argv) | 905 | void AgentBase::debugAgent(int argc, char **argv) | ||
906 | { | 906 | { | ||
907 | Q_UNUSED(argc); | ||||
907 | #ifdef Q_OS_WIN | 908 | #ifdef Q_OS_WIN | ||
mlaurent: argv is used in windows
=> put it in #else | |||||
This is OK the way it is: this is a special code for Windows, so it's ifdefed correctly. dvratil: This is OK the way it is: this is a special code for Windows, so it's `ifdef`ed correctly. | |||||
It is now, after I moved Q_UNUSED(argv) to the else branch. Laurent was right about this. dkurz: It is now, after I moved `Q_UNUSED(argv)` to the `else` branch. Laurent was right about this. | |||||
Ah, sorry: I haven't noticed the comment was for a previous revision and though Laurent wanted you to swap the ifdef logic. dvratil: Ah, sorry: I haven't noticed the comment was for a previous revision and though Laurent wanted… | |||||
908 | if (qEnvironmentVariableIsSet("AKONADI_DEBUG_WAIT")) { | 909 | if (qEnvironmentVariableIsSet("AKONADI_DEBUG_WAIT")) { | ||
909 | if (QByteArray(argv[0]).endsWith(qgetenv("AKONADI_DEBUG_WAIT") + ".exe")) { | 910 | if (QByteArray(argv[0]).endsWith(qgetenv("AKONADI_DEBUG_WAIT") + ".exe")) { | ||
910 | while (!IsDebuggerPresent()) { | 911 | while (!IsDebuggerPresent()) { | ||
911 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); | 912 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); | ||
912 | } | 913 | } | ||
913 | DebugBreak(); | 914 | DebugBreak(); | ||
914 | } | 915 | } | ||
915 | } | 916 | } | ||
917 | #else | ||||
918 | Q_UNUSED(argv); | ||||
916 | #endif | 919 | #endif | ||
917 | } | 920 | } | ||
918 | 921 | | |||
919 | QString AgentBase::parseArguments(int argc, char **argv) | 922 | QString AgentBase::parseArguments(int argc, char **argv) | ||
920 | { | 923 | { | ||
921 | Q_UNUSED(argc); | 924 | Q_UNUSED(argc); | ||
922 | 925 | | |||
923 | QCommandLineOption identifierOption(QStringLiteral("identifier"), i18n("Agent identifier"), | 926 | QCommandLineOption identifierOption(QStringLiteral("identifier"), i18n("Agent identifier"), | ||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |
argv is used in windows
> put it in #else