diff --git a/KF5AkonadiMacros.cmake b/KF5AkonadiMacros.cmake --- a/KF5AkonadiMacros.cmake +++ b/KF5AkonadiMacros.cmake @@ -44,8 +44,7 @@ # based on kde4_add_unit_test if (WIN32) - get_target_property( _loc ${_name} LOCATION ) - set(_executable ${_loc}.bat) + set(_executable $) else() set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_name}) endif() diff --git a/src/server/akonadi.cpp b/src/server/akonadi.cpp --- a/src/server/akonadi.cpp +++ b/src/server/akonadi.cpp @@ -56,6 +56,11 @@ #include #include +#ifdef Q_OS_WIN +#include +#include +#endif + using namespace Akonadi; using namespace Akonadi::Server; diff --git a/src/server/connection.cpp b/src/server/connection.cpp --- a/src/server/connection.cpp +++ b/src/server/connection.cpp @@ -32,7 +32,10 @@ #include "collectionreferencemanager.h" #include + +#ifndef Q_OS_WIN #include +#endif #include #include diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp --- a/src/server/storage/dbconfigmysql.cpp +++ b/src/server/storage/dbconfigmysql.cpp @@ -337,6 +337,7 @@ arguments << QString::fromLatin1("--shared-memory"); #endif +#ifndef Q_OS_WIN // If mysql.socket file does not exists, then we must start the server, // otherwise we reconnect to it if (!QFile::exists(socketFile)) { @@ -387,16 +388,15 @@ connect(mDatabaseProcess, static_cast(&QProcess::finished), this, &DbConfigMysql::processFinished); -#ifndef Q_OS_WIN // wait until mysqld has created the socket file (workaround for QTBUG-47475 in Qt5.5.0) int counter = 50; // avoid an endless loop in case mysqld terminated while ((counter-- > 0) && !QFileInfo::exists(socketFile)) { QThread::msleep(100); } -#endif } else { qCDebug(AKONADISERVER_LOG) << "Found mysql.socket file, reconnecting to the database"; } +#endif const QLatin1String initCon("initConnection"); {