Commit 5a4c14c2 authored by Tomas Mecir's avatar Tomas Mecir

start kde5 migration

parent 4c09e5fc
......@@ -3,7 +3,17 @@ project(kmuddy)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} )
find_package(KDE4 REQUIRED)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(Qt5 REQUIRED COMPONENTS Widgets)
find_package(KF5 CONFIG REQUIRED KCoreAddons I18n KIOCore Phonon)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE))
include(KDECMakeSettings)
include(FeatureSummary)
include(KDEFrameworkCompilerSettings)
macro_optional_find_package(MXP)
if (MXP_FOUND)
......@@ -17,9 +27,7 @@ configure_file(config-mxp.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mxp.h )
#set(CMAKE_VERBOSE_MAKEFILE ON)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
link_directories(${KDE4_LIB_DIR})
add_definitions(${QT_DEFINITIONS})
#include(ConvenienceLibs.cmake)
......
......@@ -48,7 +48,7 @@ set(kmuddy_SRCS
cscriptapi.cpp
)
kde4_add_executable(kmuddy ${kmuddy_SRCS})
add_executable(kmuddy ${kmuddy_SRCS})
set (KMUDDY_LIBRARIES kmuddycore dialogs ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KUTILS_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_PHONON_LIBS} ${KDE4_KDE3SUPPORT_LIBS} z )
......@@ -61,7 +61,7 @@ target_link_libraries(kmuddy ${KMUDDY_LIBRARIES} )
install(TARGETS kmuddy DESTINATION ${BIN_INSTALL_DIR})
# install the icons
kde4_install_icons( ${ICON_INSTALL_DIR} )
ecm_install_icons( ${ICON_INSTALL_DIR} )
install (FILES kmuddy.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
......@@ -20,6 +20,7 @@
#include <kaboutdata.h>
#include <klocale.h>
#include <kapplication.h>
#include <Kdelibs4ConfigMigrator>
#include <signal.h>
......@@ -77,7 +78,15 @@ int main(int argc, char *argv[])
//when switching tabs using Alt+number - ignoring the signal, hoping
//for the best...
signal (SIGALRM, SIG_IGN);
// migrate settings from kde4
Kdelibs4ConfigMigrator migrator(QStringLiteral("kmuddy")); // the same name defined in the aboutData
// all the config files of your application
migrator.setConfigFiles(QStringList() << QStringLiteral("kmuddyrc"));
// list of KXMLGUI files used by your application
migrator.setUiFiles(QStringList() << QStringLiteral("kmuddymapperpart.rc"));
migrator.migrate();
KApplication a;
a.setApplicationName ("KMuddy");
KMuddy *kmuddy = 0;
......
......@@ -5,9 +5,6 @@
<Action name = "viewUpperLevel"/>
<Action name = "viewLowerLevel"/>
</Menu>
<Menu name="Window"><Text>&amp;Window</Text>
<Action name = "viewSpeedwalkList"/>
</Menu>
</MenuBar>
<StatusBar/>
<ToolBar fullWidth="false" name="tools" position="left"><Text>Tools</Text>
......
Markdown is supported
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