Commit 4232e80b authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

fix compile of single application code

ATM blocking doesn't work
parent cdbc20b0
......@@ -2,11 +2,6 @@
add_executable(kate-bin main.cpp data/kate.qrc)
target_link_libraries(kate-bin PRIVATE kate-lib)
# Use a single application on MacOS + Windows instead of dbus.
if(APPLE OR WIN32)
target_compile_definitions(kate-bin PRIVATE USE_QT_SINGLE_APP)
endif()
# we have different windows icons, less margins
set(ICONS_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/icons/unix)
if(WIN32)
......
......@@ -255,7 +255,6 @@ int main(int argc, char **argv)
* use dbus, if available for linux and co.
* allows for reuse of running Kate instances
*/
#ifndef USE_QT_SINGLE_APP
if (QDBusConnectionInterface *const sessionBusInterface = QDBusConnection::sessionBus().interface()) {
/**
* try to get the current running kate instances
......@@ -539,18 +538,15 @@ int main(int argc, char **argv)
}
/**
* for mac & windows: use QtSingleApplication
*/
#else
/**
* if we had no DBus session bus, we can try to use the SingleApplication communication.
* only try to reuse existing kate instances if not already forbidden by arguments
*/
if (!force_new) {
else if (!force_new) {
/**
* any instance running we can use?
* later we could do here pid checks and stuff
*/
bool instanceFound = app.isRunning();
bool instanceFound = app.isSecondary();
/**
* if instance was found, send over all urls to be opened
......@@ -559,7 +555,7 @@ int main(int argc, char **argv)
/**
* tell single application to block if needed
*/
app.setBlock(needToBlock);
// FIXME app.setBlock(needToBlock);
/**
* construct one big message with all urls to open
......@@ -586,7 +582,6 @@ int main(int argc, char **argv)
return !app.sendMessage(QJsonDocument::fromVariant(QVariant(message)).toJson());
}
}
#endif // USE_QT_SINGLE_APP
/**
* if we arrive here, we need to start a new kate instance!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment