Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8edf5dd

Browse filesBrowse files
committed
.
1 parent 11d09a5 commit 8edf5dd
Copy full SHA for 8edf5dd

File tree

2 files changed

+6
-2
lines changed
Filter options

2 files changed

+6
-2
lines changed

‎src/plugins/servicebackends/windows/windowsservicebackend.cpp

Copy file name to clipboardExpand all lines: src/plugins/servicebackends/windows/windowsservicebackend.cpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ void WindowsServiceBackend::serviceMain(DWORD dwArgc, wchar_t **lpszArgv)
211211

212212
qCDebug(logWinSvc) << Q_FUNC_INFO << "registering service";
213213
_backendInstance->_statusHandle = RegisterServiceCtrlHandlerW(SVCNAME, WindowsServiceBackend::handler);
214-
Q_ASSERT(_backendInstance->_statusHandle);
214+
if (_backendInstance->_statusHandle) {
215+
qCCritical(logWinSvc) << "Failed to acquire service handle with error:"
216+
<< qUtf8Printable(qt_error_string(GetLastError()));
217+
return;
218+
}
215219
_backendInstance->setStatus(SERVICE_START_PENDING);
216220

217221
// pass the arguments to the main thread and notifiy him

‎tests/auto/service/TestWindowsService/tst_windowsservice.cpp

Copy file name to clipboardExpand all lines: tests/auto/service/TestWindowsService/tst_windowsservice.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void TestWindowsService::init()
122122
{
123123
QProcess testP;
124124
testP.setProgram(svcDir.absoluteFilePath(svcName));
125-
testP.setArguments({QStringLiteral("--backend"), QStringLiteral("debug")});
125+
testP.setArguments({QStringLiteral("--backend"), QStringLiteral("windows")});
126126
testP.setWorkingDirectory(svcDir.absolutePath());
127127
testP.setProcessChannelMode(QProcess::MergedChannels);
128128
testP.start();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.