diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d63fe4..08ec998 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,11 +82,11 @@ ENDIF() IF( NOT USE_QT4 ) SET( DEPENDENCIES_STRING "${DEPENDENCIES_STRING}QT5" ) - FIND_PACKAGE( Qt5 REQUIRED Core Gui Widgets ) - INCLUDE_DIRECTORIES( ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ) + FIND_PACKAGE( Qt5 REQUIRED Core Gui Widgets DBus ) + INCLUDE_DIRECTORIES( ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS}) # Add compiler flags for building executables (-fPIE) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}" ) - LIST(APPEND QT_LINKER_LIBS Qt5::Core Qt5::Gui Qt5::Widgets ) + LIST(APPEND QT_LINKER_LIBS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus ) LIST(APPEND QT_MODULES Core Gui Widgets ) ENDIF() diff --git a/app/main.cpp b/app/main.cpp index d5421fb..b2bc25c 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -22,8 +22,9 @@ * \brief main file */ -#include #include "config.h" +#include +#include #include "plaYUVerApp.h" #include "SubWindowHandle.h" #ifdef USE_FERVOR @@ -38,15 +39,24 @@ using namespace plaYUVer; int main( int argc, char *argv[] ) { - QApplication a( argc, argv ); - QApplication::setApplicationName("PlaYUVer"); - QApplication::setApplicationVersion(PLAYUVER_VERSION_STRING); - QApplication::setOrganizationName("pixlra"); - QApplication::setOrganizationDomain("playuver.pixlra"); - qRegisterMetaType("PlaYUVerStreamInfoVector"); qRegisterMetaTypeStreamOperators("PlaYUVerStreamInfoVector"); + QApplication a( argc, argv ); + QApplication::setApplicationName( "PlaYUVer" ); + QApplication::setApplicationVersion( PLAYUVER_VERSION_STRING ); + QApplication::setOrganizationName( "pixlra" ); + QApplication::setOrganizationDomain( "playuver.pixlra" ); + + /** + * use dbus, if available + * allows for resuse of running Kate instances + */ + if( QDBusConnectionInterface * const sessionBusInterface = QDBusConnection::sessionBus().interface() ) + { + + } + plaYUVerApp w; w.show(); w.parseArgs( argc, argv );