Hello community, here is the log from the commit of package ktuberling for openSUSE:Factory checked in at 2016-01-10 13:06:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ktuberling (Old) and /work/SRC/openSUSE:Factory/.ktuberling.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ktuberling" Changes: -------- --- /work/SRC/openSUSE:Factory/ktuberling/ktuberling.changes 2015-11-15 12:41:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ktuberling.new/ktuberling.changes 2016-01-10 13:06:48.000000000 +0100 @@ -1,0 +2,9 @@ +Sun Dec 13 13:29:38 UTC 2015 - [email protected] + +- Update to KDE Applications 15.12.0 + * KDE Applications 15.12.0 + * https://www.kde.org/announcements/announce-applications-15.12.0.php + * boo#958887 + + +------------------------------------------------------------------- Old: ---- ktuberling-15.08.3.tar.xz New: ---- ktuberling-15.12.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ktuberling.spec ++++++ --- /var/tmp/diff_new_pack.ejOudW/_old 2016-01-10 13:06:50.000000000 +0100 +++ /var/tmp/diff_new_pack.ejOudW/_new 2016-01-10 13:06:50.000000000 +0100 @@ -17,19 +17,37 @@ Name: ktuberling -BuildRequires: libkdegames4-devel -BuildRequires: xz +BuildRequires: libkdegames-devel +BuildRequires: extra-cmake-modules +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5QuickWidgets) +BuildRequires: pkgconfig(Qt5Test) +BuildRequires: pkgconfig(Qt5Svg) +BuildRequires: kconfig-devel +BuildRequires: kcoreaddons-devel +BuildRequires: kwidgetsaddons-devel +BuildRequires: ki18n-devel +BuildRequires: kguiaddons-devel +BuildRequires: kconfigwidgets-devel +BuildRequires: kitemviews-devel +BuildRequires: kiconthemes-devel +BuildRequires: kxmlgui-devel +BuildRequires: kio-devel +BuildRequires: knotifyconfig-devel +BuildRequires: kdelibs4support-devel +BuildRequires: phonon4qt5-devel +BuildRequires: knewstuff-devel +BuildRequires: update-desktop-files Summary: Potato drawing editor License: GPL-2.0+ Group: Amusements/Toys/Other Url: http://www.kde.org -Version: 15.08.3 +Version: 15.12.0 Release: 0 Source0: ktuberling-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: potatoguy = %{version} Obsoletes: potatoguy < %{version} -%kde4_runtime_requires %description KTuberling is a nice potato editor for kids. The game intended for @@ -42,23 +60,21 @@ %setup -q %build - %cmake_kde4 -d build + %cmake_kf5 -d build %make_jobs %install - cd build - %kde4_makeinstall - %suse_update_desktop_file -r ktuberling Game KidsGame - %kde_post_install + %kf5_makeinstall -C build + %suse_update_desktop_file -r org.kde.ktuberling Game KidsGame %files %defattr(-,root,root) %doc COPYING COPYING.DOC -%{_kde4_bindir}/ktuberling -%{_kde4_htmldir}/en/ktuberling/ -%{_kde4_applicationsdir}/ktuberling.desktop -%{_kde4_iconsdir}/hicolor/*/apps/ktuberling.* -%{_kde4_iconsdir}/hicolor/*/mimetypes/application-x-tuberling.* -%{_kde4_appsdir}/ktuberling/ +%{_kf5_bindir}/ktuberling +%{_kf5_htmldir}/en/ktuberling/ +%{_kf5_applicationsdir}/org.kde.ktuberling.desktop +%{_kf5_iconsdir}/hicolor/*/*/* +%{_kf5_appsdir}/ktuberling/ +%_datadir/kxmlgui5/ktuberling/ %changelog ++++++ ktuberling-15.08.3.tar.xz -> ktuberling-15.12.0.tar.xz ++++++ Files old/ktuberling-15.08.3/128-apps-ktuberling.png and new/ktuberling-15.12.0/128-apps-ktuberling.png differ Files old/ktuberling-15.08.3/128-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/128-mimetypes-application-x-tuberling.png differ Files old/ktuberling-15.08.3/16-apps-ktuberling.png and new/ktuberling-15.12.0/16-apps-ktuberling.png differ Files old/ktuberling-15.08.3/16-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/16-mimetypes-application-x-tuberling.png differ Files old/ktuberling-15.08.3/22-apps-ktuberling.png and new/ktuberling-15.12.0/22-apps-ktuberling.png differ Files old/ktuberling-15.08.3/22-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/22-mimetypes-application-x-tuberling.png differ Files old/ktuberling-15.08.3/32-apps-ktuberling.png and new/ktuberling-15.12.0/32-apps-ktuberling.png differ Files old/ktuberling-15.08.3/32-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/32-mimetypes-application-x-tuberling.png differ Files old/ktuberling-15.08.3/48-apps-ktuberling.png and new/ktuberling-15.12.0/48-apps-ktuberling.png differ Files old/ktuberling-15.08.3/48-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/48-mimetypes-application-x-tuberling.png differ Files old/ktuberling-15.08.3/64-apps-ktuberling.png and new/ktuberling-15.12.0/64-apps-ktuberling.png differ Files old/ktuberling-15.08.3/64-mimetypes-application-x-tuberling.png and new/ktuberling-15.12.0/64-mimetypes-application-x-tuberling.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/CMakeLists.txt new/ktuberling-15.12.0/CMakeLists.txt --- old/ktuberling-15.08.3/CMakeLists.txt 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/CMakeLists.txt 2015-12-09 13:00:01.000000000 +0100 @@ -1,15 +1,43 @@ project(ktuberling) -if(NOT COMPILING_KDEGAMES) - find_package(KDE4 REQUIRED) - include(KDE4Defaults) - include(MacroLibrary) - find_package(KDEGames REQUIRED) - - add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) - add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - include_directories(${KDEGAMES_INCLUDE_DIRS} ${KDE4_INCLUDES} ${QDBUS_INCLUDE_DIRS}) -endif(NOT COMPILING_KDEGAMES) +cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) +set (QT_MIN_VERSION "5.3.0") + +find_package(ECM 1.7.0 REQUIRED CONFIG) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test) +find_package(KF5 REQUIRED COMPONENTS + CoreAddons + Config + ItemModels + WidgetsAddons + WindowSystem + Config + DBusAddons + I18n + ConfigWidgets + TextWidgets + XmlGui + KIO + NotifyConfig + NewStuff + KDELibs4Support) #TODO eventually remove kdelibs4support + +find_package(KF5KDEGames 4.9.0 REQUIRED) +find_package(Phonon4Qt5 CONFIG REQUIRED) + +include_directories(BEFORE ${PHONON_INCLUDES}) + +include(FeatureSummary) +include(ECMAddAppIcon) +include(ECMInstallIcons) +include(KDEInstallDirs) +include(KDECompilerSettings) +include(KDECMakeSettings) + +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) add_subdirectory( sounds ) add_subdirectory( pics ) @@ -26,22 +54,25 @@ soundfactory.cpp playgrounddelegate.cpp ) -kde4_add_app_icon(ktuberling_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-ktuberling.png") -kde4_add_executable(ktuberling ${ktuberling_SRCS}) +file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-ktuberling.png") +ecm_add_app_icon(ktuberling_SRCS ICONS ${ICONS_SRCS}) +add_executable(ktuberling ${ktuberling_SRCS}) -target_link_libraries(ktuberling ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} kdegames ${KDE4_PHONON_LIBS} ) +target_link_libraries(ktuberling KF5::KIOCore KF5KDEGames Phonon::phonon4qt5 Qt5::Svg Phonon::phonon4qt5 KF5::DBusAddons KF5::XmlGui KF5::Completion Qt5::PrintSupport KF5::KDELibs4Support) -install(TARGETS ktuberling ${INSTALL_TARGETS_DEFAULT_ARGS} ) +install(TARGETS ktuberling ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) ########### install files ############### -install( PROGRAMS ktuberling.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES ktuberlingui.rc DESTINATION ${DATA_INSTALL_DIR}/ktuberling ) - -kde4_install_icons( ${ICON_INSTALL_DIR} ) +install( PROGRAMS org.kde.ktuberling.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) +install( FILES ktuberlingui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/ktuberling ) +ecm_install_icons( ICONS 128-apps-ktuberling.png 16-apps-ktuberling.png 22-apps-ktuberling.png 32-apps-ktuberling.png 48-apps-ktuberling.png 64-apps-ktuberling.png +128-mimetypes-application-x-tuberling.png 16-mimetypes-application-x-tuberling.png 22-mimetypes-application-x-tuberling.png 32-mimetypes-application-x-tuberling.png 48-mimetypes-application-x-tuberling.png 64-mimetypes-application-x-tuberling.png + DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor ) +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/action.cpp new/ktuberling-15.12.0/action.cpp --- old/ktuberling-15.08.3/action.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/action.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -45,9 +45,10 @@ -ActionRemove::ActionRemove(ToDraw *item, QGraphicsScene *scene) +ActionRemove::ActionRemove(ToDraw *item, const QPointF &oldPos, QGraphicsScene *scene) : m_item(item), m_scene(scene), m_done(true) { + m_oldPos = QPointF(oldPos.x() / scene->width(), oldPos.y() / scene->height()); } ActionRemove::~ActionRemove() @@ -63,6 +64,7 @@ void ActionRemove::undo() { + m_item->setPos(m_oldPos.x() * m_scene->width(), m_oldPos.y() * m_scene->height()); m_scene->addItem(m_item); m_done = false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/action.h new/ktuberling-15.12.0/action.h --- old/ktuberling-15.08.3/action.h 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/action.h 2015-12-09 13:00:01.000000000 +0100 @@ -40,7 +40,7 @@ class ActionRemove : public QUndoCommand { public: - ActionRemove(ToDraw *item, QGraphicsScene *scene); + ActionRemove(ToDraw *item, const QPointF &oldPos, QGraphicsScene *scene); ~ActionRemove(); void redo(); @@ -48,6 +48,7 @@ private: ToDraw *m_item; + QPointF m_oldPos; QGraphicsScene *m_scene; bool m_done; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/doc/CMakeLists.txt new/ktuberling-15.12.0/doc/CMakeLists.txt --- old/ktuberling-15.08.3/doc/CMakeLists.txt 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/doc/CMakeLists.txt 2015-12-09 13:00:01.000000000 +0100 @@ -1,4 +1,4 @@ ########### install files ############### # # -kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR ktuberling) +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR ktuberling) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/doc/index.docbook new/ktuberling-15.12.0/doc/index.docbook --- old/ktuberling-15.08.3/doc/index.docbook 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/doc/index.docbook 2015-12-09 13:00:01.000000000 +0100 @@ -1,5 +1,5 @@ <?xml version="1.0" ?> -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ +<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [ <!ENTITY kappname "&ktuberling;"> <!ENTITY package "kdegames"> <!ENTITY technical.reference SYSTEM "technical-reference.docbook"> Files old/ktuberling-15.08.3/hi128-app-ktuberling.png and new/ktuberling-15.12.0/hi128-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi128-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi128-mime-application-x-tuberling.png differ Files old/ktuberling-15.08.3/hi16-app-ktuberling.png and new/ktuberling-15.12.0/hi16-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi16-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi16-mime-application-x-tuberling.png differ Files old/ktuberling-15.08.3/hi22-app-ktuberling.png and new/ktuberling-15.12.0/hi22-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi22-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi22-mime-application-x-tuberling.png differ Files old/ktuberling-15.08.3/hi32-app-ktuberling.png and new/ktuberling-15.12.0/hi32-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi32-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi32-mime-application-x-tuberling.png differ Files old/ktuberling-15.08.3/hi48-app-ktuberling.png and new/ktuberling-15.12.0/hi48-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi48-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi48-mime-application-x-tuberling.png differ Files old/ktuberling-15.08.3/hi64-app-ktuberling.png and new/ktuberling-15.12.0/hi64-app-ktuberling.png differ Files old/ktuberling-15.08.3/hi64-mime-application-x-tuberling.png and new/ktuberling-15.12.0/hi64-mime-application-x-tuberling.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/ktuberling.desktop new/ktuberling-15.12.0/ktuberling.desktop --- old/ktuberling-15.08.3/ktuberling.desktop 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/ktuberling.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,131 +0,0 @@ -[Desktop Entry] -Exec=ktuberling -caption %c %u -Name=Potato Guy -Name[af]=Aartappel Man -Name[ast]=Pá Pataca -Name[be]=Бульбяш -Name[bn]=পটেটো গাই -Name[br]=Paotr ar patatez -Name[bs]=Krompirko -Name[ca]=Home Patata -Name[ca@valencia]=Home Patata -Name[cs]=Bramborový chlapík -Name[cy]=Potato Guy -Name[da]=Kartoffelfyren -Name[de]=Kartoffelknülch -Name[el]=Πατατάνθρωπος -Name[en_GB]=Potato Guy -Name[eo]=Terpomulo -Name[es]=Señor Patata -Name[et]=Kartulimees -Name[eu]=Patata jauna -Name[fa]=مرد سیب زمینی -Name[fi]=Perunamies -Name[fr]=Monsieur Patate -Name[ga]=Potato Guy -Name[gl]=O home pataca -Name[he]=מר תפוח אדמה -Name[hne]=आलू परसाद -Name[hr]=Krumpirko -Name[hu]=Krumpli bácsi -Name[is]=Kartöflukall -Name[it]=Uomo patata -Name[ja]=ポテトマン -Name[kk]=Картопбай -Name[km]=មនុស្សដំឡូង -Name[ko]=감자돌이 -Name[lt]=Bulvinis Vyrukas -Name[lv]=Kartupeļu vīrs -Name[mk]=Компирко -Name[mr]=बटाटा व्यक्ति -Name[nb]=Potetfyren -Name[nds]=Kantüffelfips -Name[ne]=पोट्याटो गाइ -Name[nl]=Aardappelmannetje -Name[nn]=Potetfyren -Name[pa]=ਆਲੂ ਮੁੰਡਾ -Name[pl]=Ziemniaczany facet -Name[pt]=Homem Batata -Name[pt_BR]=Homem-Batata -Name[ro]=Domnul Cartof -Name[ru]=Картофельный парень -Name[se]=Buđetolmmái -Name[sk]=Zemiakový chlapec -Name[sl]=Krompirček -Name[sr]=Кромпирко -Name[sr@ijekavian]=Кромпирко -Name[sr@ijekavianlatin]=Krompirko -Name[sr@latin]=Krompirko -Name[sv]=Potatismannen -Name[ta]=உருளைகிழங்கு வீரர் -Name[tg]=Писараки Картошкагин -Name[tr]=Patates Adam -Name[ug]=Potato Guy -Name[uk]=Картопляний хлопець -Name[vi]=Potato Guy -Name[wa]=Monsieu Crompire -Name[xh]=Umfana wetapile -Name[x-test]=xxPotato Guyxx -Name[zh_CN]=土豆小子 -Name[zh_TW]=馬鈴薯小子 -GenericName=Picture Game for Children -GenericName[ast]=Xuegu de dibuxu pa neños -GenericName[bs]=Igra slika za djecu -GenericName[ca]=Joc d'imatges per a la canalla -GenericName[ca@valencia]=Joc d'imatges per a la canalla -GenericName[cs]=Obrázková hra pro děti -GenericName[da]=Billedspil til børn -GenericName[de]=Bastelspiel für Kinder -GenericName[el]=Παιχνίδι με εικόνες για παιδιά -GenericName[en_GB]=Picture Game for Children -GenericName[eo]=Bildludo por infanoj -GenericName[es]=Juego de dibujo para niños -GenericName[et]=Laste pildimäng -GenericName[eu]=Umeentzako irudien jokoa -GenericName[fa]=بازی تصویری برای بچهها -GenericName[fi]=Peli lapsille -GenericName[fr]=Jeu d'image pour les enfants -GenericName[ga]=Cluiche Pictiúir do Phaistí -GenericName[gl]=Xogo de imaxes para nenos -GenericName[hne]=लइका मन बर फोटू वाले खेल -GenericName[hu]=Képes játék gyermekeknek -GenericName[is]=Myndaleikur fyrir börn -GenericName[it]=Gioco di immagini per bambini -GenericName[ja]=子供のための福笑いゲーム -GenericName[kk]=Сурет салу балалар ойны -GenericName[km]=ល្បែងរូបភាពសម្រាប់ក្មេងៗ -GenericName[ko]=어린이를 위한 그림 게임 -GenericName[lv]=Bilžu spēle bērniem -GenericName[mr]=मुलांकरिता प्रतिमा खेळ -GenericName[nb]=Bildespill for unger -GenericName[nds]=Billerspeel för Kinners -GenericName[nl]=Plaatjesspel voor kinderen -GenericName[nn]=Biletspel for ungar -GenericName[pl]=Gra obrazkowa dla dzieci -GenericName[pt]=Jogo de Imagens para Crianças -GenericName[pt_BR]=Jogo de figuras para Crianças -GenericName[ro]=Joc cu imagini pentru copii -GenericName[ru]=Игра с картинками для детей -GenericName[sk]=Obrázková hra pre deti -GenericName[sl]=Slikovna igra za otroke -GenericName[sr]=Игра за децу -GenericName[sr@ijekavian]=Игра за дјецу -GenericName[sr@ijekavianlatin]=Igra za djecu -GenericName[sr@latin]=Igra za decu -GenericName[sv]=Bildspel för barn -GenericName[te]=పిల్లల చిత్రాల ఆట -GenericName[tr]=Çocuklar için Resim Oyunu -GenericName[ug]=بالىلار ئۈچۈن سۈرەت ئويۇنى -GenericName[uk]=Гра у картинки для дітей -GenericName[wa]=Djeu d' dessin po ls efants -GenericName[x-test]=xxPicture Game for Childrenxx -GenericName[zh_CN]=孩子们的游戏 -GenericName[zh_TW]=小孩的圖畫遊戲 -Type=Application -X-DocPath=ktuberling/index.html -Terminal=false -Icon=ktuberling -MimeType=application/x-tuberling; -X-KDE-StartupNotify=true -X-DBUS-StartupType=Multi -Categories=Qt;KDE;Game;KidsGame; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/main.cpp new/ktuberling-15.12.0/main.cpp --- old/ktuberling-15.08.3/main.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/main.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -8,43 +8,51 @@ * (at your option) any later version. * ***************************************************************************/ -#include <kapplication.h> -#include <klocale.h> -#include <kcmdlineargs.h> -#include <kaboutdata.h> -#include <kglobal.h> -#include "toplevel.h" +#include <KLocalizedString> +#include <KAboutData> +#include <QApplication> +#include <QCommandLineParser> +#include <QCommandLineOption> +#include <QDir> +#include <KDBusService> +#include "toplevel.h" -static const KLocalizedString description = ki18n("Potato game for kids"); -static const KLocalizedString text = ki18n("A program original by <email address='%1'>Éric Bischoff</email>\nand John Calhoun.\n\nThis program is dedicated to my daughter Sunniva.").subs(QLatin1String("[email protected]")); +static const QString description = i18n("Potato game for kids"); +static const KLocalizedString text = ki18n("A program original by <email address='%1'>Éric Bischoff</email>\nand John Calhoun.\n\nThis program is dedicated to my daughter Sunniva.").subs(QStringLiteral("[email protected]")); -static const char version[] = "0.9.0"; +static const char version[] = "1.0.0"; // Main function int main(int argc, char *argv[]) { + QApplication app(argc, argv); - KAboutData aboutData( "ktuberling", 0, ki18n("KTuberling"), - version, description, KAboutData::License_GPL, - ki18n("(c) 1999-2009, The KTuberling Developers"), text, "http://games.kde.org/ktuberling" ); - aboutData.addAuthor(ki18n("Albert Astals Cid"), ki18n("Maintainer"), "[email protected]"); - aboutData.addAuthor(ki18n("Éric Bischoff"), ki18n("Former Developer"), "[email protected]"); - aboutData.addCredit(ki18n("John Calhoun"), ki18n("Original concept and artwork")); - aboutData.addCredit(ki18n("Agnieszka Czajkowska"), ki18n("New artwork"), "[email protected]"); - aboutData.addCredit(ki18n("Bas Willems"), ki18n("New artwork"), "[email protected]"); - aboutData.addCredit(ki18n("Roger Larsson"), ki18n("Sounds tuning"), "[email protected]"); - aboutData.addCredit(ki18n("Dolores Almansa"), ki18n("New artwork"), "[email protected]"); - KCmdLineArgs::init(argc, argv, &aboutData); - - KCmdLineOptions options; - options.add("+<tuberling-file>", ki18n("Potato to open")); - KCmdLineArgs::addCmdLineOptions(options); + KLocalizedString::setApplicationDomain("ktuberling"); - KApplication app; - KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" )); + KAboutData aboutData( QStringLiteral("ktuberling"), i18n("KTuberling"), + version, description, KAboutLicense::GPL, + i18n("(c) 1999-2009, The KTuberling Developers")); + aboutData.addAuthor(i18n("Albert Astals Cid"), i18n("Maintainer"), QStringLiteral("[email protected]")); + aboutData.addAuthor(i18n("Éric Bischoff"), i18n("Former Developer"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("John Calhoun"), i18n("Original concept and artwork")); + aboutData.addCredit(i18n("Agnieszka Czajkowska"), i18n("New artwork"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Bas Willems"), i18n("New artwork"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Roger Larsson"), i18n("Sounds tuning"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Dolores Almansa"), i18n("New artwork"), QStringLiteral("[email protected]")); + aboutData.setHomepage(QStringLiteral("http://games.kde.org/ktuberling")); + QCommandLineParser parser; + KAboutData::setApplicationData(aboutData); + parser.addVersionOption(); + parser.addHelpOption(); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+<tuberling-file>"), i18n("Potato to open"))); + + aboutData.setupCommandLine(&parser); + parser.process(app); + aboutData.processCommandLine(&parser); + KDBusService service; TopLevel *toplevel=0; if (app.isSessionRestored()) @@ -52,10 +60,9 @@ else { toplevel = new TopLevel(); toplevel->show(); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - if (args->count()) - toplevel->open(args->url(0)); - args->clear(); + if (parser.positionalArguments().count()) + toplevel->open(QUrl::fromUserInput(parser.positionalArguments().at(0), QDir::currentPath())); + } return app.exec(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/org.kde.ktuberling.desktop new/ktuberling-15.12.0/org.kde.ktuberling.desktop --- old/ktuberling-15.08.3/org.kde.ktuberling.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/ktuberling-15.12.0/org.kde.ktuberling.desktop 2015-12-09 13:00:01.000000000 +0100 @@ -0,0 +1,156 @@ +[Desktop Entry] +Exec=ktuberling -qwindowtitle %c %u +Name=Potato Guy +Name[af]=Aartappel Man +Name[ast]=Pá Pataca +Name[be]=Бульбяш +Name[bn]=পটেটো গাই +Name[br]=Paotr ar patatez +Name[bs]=Krompirko +Name[ca]=Home Patata +Name[ca@valencia]=Home Patata +Name[cs]=Bramborový chlapík +Name[cy]=Potato Guy +Name[da]=Kartoffelfyren +Name[de]=Kartoffelknülch +Name[el]=Πατατάνθρωπος +Name[en_GB]=Potato Guy +Name[eo]=Terpomulo +Name[es]=Señor Patata +Name[et]=Kartulimees +Name[eu]=Patata jauna +Name[fa]=مرد سیب زمینی +Name[fi]=Perunamies +Name[fr]=Monsieur Patate +Name[ga]=Potato Guy +Name[gl]=O home pataca +Name[he]=מר תפוח אדמה +Name[hne]=आलू परसाद +Name[hr]=Krumpirko +Name[hu]=Krumpli bácsi +Name[is]=Kartöflukall +Name[it]=Uomo patata +Name[ja]=ポテトマン +Name[kk]=Картопбай +Name[km]=មនុស្សដំឡូង +Name[ko]=감자돌이 +Name[lt]=Bulvinis Vyrukas +Name[lv]=Kartupeļu vīrs +Name[mk]=Компирко +Name[mr]=बटाटा व्यक्ति +Name[nb]=Potetfyren +Name[nds]=Kantüffelfips +Name[ne]=पोट्याटो गाइ +Name[nl]=Aardappelmannetje +Name[nn]=Potetfyren +Name[pa]=ਆਲੂ ਮੁੰਡਾ +Name[pl]=Ziemniaczany facet +Name[pt]=Homem Batata +Name[pt_BR]=Homem-Batata +Name[ro]=Domnul Cartof +Name[ru]=Картофельный парень +Name[se]=Buđetolmmái +Name[sk]=Zemiakový chlapec +Name[sl]=Krompirček +Name[sr]=Кромпирко +Name[sr@ijekavian]=Кромпирко +Name[sr@ijekavianlatin]=Krompirko +Name[sr@latin]=Krompirko +Name[sv]=Potatismannen +Name[ta]=உருளைகிழங்கு வீரர் +Name[tg]=Писараки Картошкагин +Name[tr]=Patates Adam +Name[ug]=Potato Guy +Name[uk]=Картопляний хлопець +Name[vi]=Potato Guy +Name[wa]=Monsieu Crompire +Name[xh]=Umfana wetapile +Name[x-test]=xxPotato Guyxx +Name[zh_CN]=土豆小子 +Name[zh_TW]=馬鈴薯小子 +GenericName=Picture Game for Children +GenericName[ast]=Xuegu de dibuxu pa neños +GenericName[bs]=Igra slika za djecu +GenericName[ca]=Joc d'imatges per a la canalla +GenericName[ca@valencia]=Joc d'imatges per a la canalla +GenericName[cs]=Obrázková hra pro děti +GenericName[da]=Billedspil til børn +GenericName[de]=Bastelspiel für Kinder +GenericName[el]=Παιχνίδι με εικόνες για παιδιά +GenericName[en_GB]=Picture Game for Children +GenericName[eo]=Bildludo por infanoj +GenericName[es]=Juego de dibujo para niños +GenericName[et]=Laste pildimäng +GenericName[eu]=Umeentzako irudien jokoa +GenericName[fa]=بازی تصویری برای بچهها +GenericName[fi]=Peli lapsille +GenericName[fr]=Jeu d'image pour les enfants +GenericName[ga]=Cluiche Pictiúir do Phaistí +GenericName[gl]=Xogo de imaxes para nenos +GenericName[hne]=लइका मन बर फोटू वाले खेल +GenericName[hu]=Képes játék gyermekeknek +GenericName[is]=Myndaleikur fyrir börn +GenericName[it]=Gioco di immagini per bambini +GenericName[ja]=子供のための福笑いゲーム +GenericName[kk]=Сурет салу балалар ойны +GenericName[km]=ល្បែងរូបភាពសម្រាប់ក្មេងៗ +GenericName[ko]=어린이를 위한 그림 게임 +GenericName[lv]=Bilžu spēle bērniem +GenericName[mr]=मुलांकरिता प्रतिमा खेळ +GenericName[nb]=Bildespill for unger +GenericName[nds]=Billerspeel för Kinners +GenericName[nl]=Plaatjesspel voor kinderen +GenericName[nn]=Biletspel for ungar +GenericName[pl]=Gra obrazkowa dla dzieci +GenericName[pt]=Jogo de Imagens para Crianças +GenericName[pt_BR]=Jogo de figuras para Crianças +GenericName[ro]=Joc cu imagini pentru copii +GenericName[ru]=Игра с картинками для детей +GenericName[sk]=Obrázková hra pre deti +GenericName[sl]=Slikovna igra za otroke +GenericName[sr]=Игра за децу +GenericName[sr@ijekavian]=Игра за дјецу +GenericName[sr@ijekavianlatin]=Igra za djecu +GenericName[sr@latin]=Igra za decu +GenericName[sv]=Bildspel för barn +GenericName[te]=పిల్లల చిత్రాల ఆట +GenericName[tr]=Çocuklar için Resim Oyunu +GenericName[ug]=بالىلار ئۈچۈن سۈرەت ئويۇنى +GenericName[uk]=Гра у картинки для дітей +GenericName[wa]=Djeu d' dessin po ls efants +GenericName[x-test]=xxPicture Game for Childrenxx +GenericName[zh_CN]=孩子们的游戏 +GenericName[zh_TW]=小孩的圖畫遊戲 +Comment=A simple constructor game suitable for children and adults alike +Comment[ca]=Un joc de construcció senzill, adequat per nens i també per adults +Comment[ca@valencia]=Un joc de construcció senzill, adequat per nens i també per adults +Comment[da]=En simpelt byggeprogram til børn i alle aldre +Comment[de]=Ein einfaches Aufbauspiel für Kinder und Erwachsene +Comment[en_GB]=A simple constructor game suitable for children and adults alike +Comment[es]=Un sencillo juego de construcción adecuado para niños y para adultos +Comment[fi]=Yksinkertainen rakennuspeli, joka sopii niin lapsille kuin aikuisille +Comment[gl]=Un construtor de xogos sinxelo que poden usar tanto nenos como adultos. +Comment[hu]=Egyszerű építőjátéknak gyerekeknek és felnőtteknek egyaránt +Comment[nl]=Een eenvoudig aannemerspel geschikt voor zowel kinderen als volwassenen +Comment[pl]=Prosta gra twórcza kierowana dla dzieci i dorosłych +Comment[pt]=Um jogo de construção simples, adequado tanto para crianças como adultos +Comment[pt_BR]=Um jogo de construção simples, adequado para crianças e adultos +Comment[sk]=Jednoduchá výstavbová hra vhodná pre deti a dospelých +Comment[sl]=Preprosta igra sestavljanja primerna za mlajše in starejše otroke +Comment[sr]=Једноставна игра конструисања погодна и за децу и за одрасле +Comment[sr@ijekavian]=Једноставна игра конструисања погодна и за децу и за одрасле +Comment[sr@ijekavianlatin]=Jednostavna igra konstruisanja pogodna i za decu i za odrasle +Comment[sr@latin]=Jednostavna igra konstruisanja pogodna i za decu i za odrasle +Comment[sv]=Ett enkelt byggspel lika lämpligt för barn som vuxna +Comment[tr]=Çocukların ve yetişkinlerin hoşlanacağı basit bir inşaat oyunu +Comment[uk]=Проста гра-складанка для дітей та дорослих. +Comment[x-test]=xxA simple constructor game suitable for children and adults alikexx +Type=Application +X-DocPath=ktuberling/index.html +Terminal=false +Icon=ktuberling +MimeType=application/x-tuberling; +StartupNotify=true +X-DBUS-StartupType=Multi +Categories=Qt;KDE;Game;KidsGame; +X-DBUS-ServiceName=org.kde.ktuberling diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/pics/CMakeLists.txt new/ktuberling-15.12.0/pics/CMakeLists.txt --- old/ktuberling-15.08.3/pics/CMakeLists.txt 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/pics/CMakeLists.txt 2015-12-09 13:00:01.000000000 +0100 @@ -14,6 +14,6 @@ christmas.desktop christmas.svgz christmas.theme robin-tux.desktop robin-tux.svgz robin-tux.theme butterflies.desktop butterflies.svgz butterflies.theme robot_workshop.desktop robot_workshop.svgz robot_workshop.theme -DESTINATION ${DATA_INSTALL_DIR}/ktuberling/pics ) +DESTINATION ${KDE_INSTALL_DATADIR}/ktuberling/pics ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/playground.cpp new/ktuberling-15.12.0/playground.cpp --- old/ktuberling-15.08.3/playground.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/playground.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -12,26 +12,27 @@ #include "playground.h" -#include <klocale.h> -#include <kstandarddirs.h> +#include <KLocalizedString> +#include <kconfig.h> #include <kconfiggroup.h> -#include <kdebug.h> +#include <qdebug.h> +#include <QAction> #include <QCursor> #include <QDataStream> +#include <QDir> #include <QDomDocument> #include <QFile> +#include <QFileInfo> #include <QGraphicsSvgItem> #include <QMouseEvent> #include <QPainter> #include <QPrinter> -#include <QFileInfo> +#include <QStandardPaths> #include <kstandardaction.h> #include <kactioncollection.h> #include <kstandardshortcut.h> -#include <kicon.h> -#include <QAction> #include "action.h" #include "toplevel.h" @@ -121,14 +122,14 @@ void PlayGround::connectRedoAction(QAction *action) { - connect(action, SIGNAL(triggered()), &m_undoGroup, SLOT(redo())); - connect(&m_undoGroup, SIGNAL(canRedoChanged(bool)), action, SLOT(setEnabled(bool))); + connect(action, &QAction::triggered, &m_undoGroup, &QUndoGroup::redo); + connect(&m_undoGroup, &QUndoGroup::canRedoChanged, action, &QAction::setEnabled); } void PlayGround::connectUndoAction(QAction *action) { - connect(action, SIGNAL(triggered()), &m_undoGroup, SLOT(undo())); - connect(&m_undoGroup, SIGNAL(canUndoChanged(bool)), action, SLOT(setEnabled(bool))); + connect(action, &QAction::triggered, &m_undoGroup, &QUndoGroup::undo); + connect(&m_undoGroup, &QUndoGroup::canUndoChanged, action, &QAction::setEnabled); } // Mouse pressed event @@ -235,7 +236,7 @@ QRectF PlayGround::backgroundRect() const { - return m_SvgRenderer.boundsOnElement(QLatin1String( "background" )); + return m_SvgRenderer.boundsOnElement(QStringLiteral( "background" )); } void PlayGround::placeDraggedItem(const QPoint &pos) @@ -252,7 +253,7 @@ } else { - undoStack()->push(new ActionRemove(m_dragItem, scene())); + undoStack()->push(new ActionRemove(m_dragItem, m_itemDraggedPos, scene())); } setCursor(QCursor()); @@ -315,7 +316,16 @@ // Register the various playgrounds void PlayGround::registerPlayGrounds() { - const QStringList list = KGlobal::dirs()->findAllResources("appdata", QLatin1String( "pics/*.theme" )); + QSet<QString> list; + const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("pics"), QStandardPaths::LocateDirectory); + Q_FOREACH (const QString &dir, dirs) + { + const QStringList fileNames = QDir(dir).entryList(QStringList() << QStringLiteral("*.theme")); + Q_FOREACH (const QString &file, fileNames) + { + list << dir + '/' + file; + } + } foreach(const QString &theme, list) { @@ -325,10 +335,10 @@ QDomDocument layoutDocument; if (layoutDocument.setContent(&layoutFile)) { - QString desktop = layoutDocument.documentElement().attribute(QLatin1String( "desktop" )); - KConfig c( KStandardDirs::locate("appdata", QLatin1String( "pics/" ) ) + desktop); + QString desktop = layoutDocument.documentElement().attribute(QStringLiteral( "desktop" )); + KConfig c( QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "pics/" ) + desktop ) ); KConfigGroup cg = c.group("KTuberlingTheme"); - QString gameboard = layoutDocument.documentElement().attribute(QLatin1String( "gameboard" )); + QString gameboard = layoutDocument.documentElement().attribute(QStringLiteral( "gameboard" )); QPixmap pixmap(200,100); pixmap.fill(Qt::transparent); playGroundPixmap(gameboard,pixmap); @@ -340,9 +350,9 @@ void PlayGround::playGroundPixmap(const QString &playgroundName, QPixmap &pixmap) { - m_SvgRenderer.load(KStandardDirs::locate("appdata", QLatin1String( "pics/" ) + playgroundName)); + m_SvgRenderer.load(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "pics/" ) + playgroundName )); QPainter painter(&pixmap); - m_SvgRenderer.render(&painter,QLatin1String( "background" )); + m_SvgRenderer.render(&painter,QStringLiteral( "background" )); } // Load background and draggable objects masks @@ -366,16 +376,16 @@ playGroundElement = layoutDocument.documentElement(); - QString gameboardName = playGroundElement.attribute(QLatin1String( "gameboard" )); + QString gameboardName = playGroundElement.attribute(QStringLiteral( "gameboard" )); - QColor bgColor = QColor(playGroundElement.attribute(QLatin1String( "bgcolor" ), QLatin1String( "#fff" ) ) ); + QColor bgColor = QColor(playGroundElement.attribute(QStringLiteral( "bgcolor" ), QStringLiteral( "#fff" ) ) ); if (!bgColor.isValid()) bgColor = Qt::white; - if (!m_SvgRenderer.load(KStandardDirs::locate("appdata", QLatin1String( "pics/" ) + gameboardName))) + if (!m_SvgRenderer.load(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "pics/" ) + gameboardName ))) return false; - objectsList = playGroundElement.elementsByTagName(QLatin1String( "object" )); + objectsList = playGroundElement.elementsByTagName(QStringLiteral( "object" )); if (objectsList.count() < 1) return false; @@ -401,15 +411,15 @@ { objectElement = (const QDomElement &) objectsList.item(decoration).toElement(); - const QString &objectName = objectElement.attribute(QLatin1String( "name" )); + const QString &objectName = objectElement.attribute(QStringLiteral( "name" )); if (m_SvgRenderer.elementExists(objectName)) { - m_objectsNameSound.insert(objectName, objectElement.attribute(QLatin1String( "sound" ))); - m_objectsNameRatio.insert(objectName, objectElement.attribute(QLatin1String( "scale" ), QLatin1String( "1" )).toDouble()); + m_objectsNameSound.insert(objectName, objectElement.attribute(QStringLiteral( "sound" ))); + m_objectsNameRatio.insert(objectName, objectElement.attribute(QStringLiteral( "scale" ), QStringLiteral( "1" )).toDouble()); } else { - kWarning() << objectName << "does not exist. Check" << gameboardFile; + qWarning() << objectName << "does not exist. Check" << gameboardFile; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/playground.h new/ktuberling-15.12.0/playground.h --- old/ktuberling-15.08.3/playground.h 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/playground.h 2015-12-09 13:00:01.000000000 +0100 @@ -24,7 +24,7 @@ class Action; class ToDraw; class TopLevel; - +class QPrinter; class QGraphicsSvgItem; class PlayGround : public QGraphicsView diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/playgrounddelegate.h new/ktuberling-15.12.0/playgrounddelegate.h --- old/ktuberling-15.08.3/playgrounddelegate.h 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/playgrounddelegate.h 2015-12-09 13:00:01.000000000 +0100 @@ -19,7 +19,7 @@ #ifndef PLAYGROUNDDELEGATE_H #define PLAYGROUNDDELEGATE_H -#include <QtGui/QAbstractItemDelegate> +#include <QtWidgets/QAbstractItemDelegate> #include <QAbstractItemView> class PlaygroundDelegate : public QAbstractItemDelegate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/soundfactory.cpp new/ktuberling-15.12.0/soundfactory.cpp --- old/ktuberling-15.08.3/soundfactory.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/soundfactory.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -15,14 +15,14 @@ #include <stdlib.h> #include <kmessagebox.h> -#include <klocale.h> -#include <kstandarddirs.h> -#include <kdebug.h> +#include <KLocalizedString> #include <phonon/MediaObject> +#include <QDir> #include <QDomDocument> #include <QFile> +#include <QStandardPaths> #include "toplevel.h" @@ -51,7 +51,7 @@ if (!namesList[sound].compare(soundRef)) break; if (sound == sounds) return; - soundFile = KStandardDirs::locate("appdata", QLatin1String( "sounds/" ) + filesList[sound]); + soundFile = QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "sounds/" ) + filesList[sound]); if (soundFile.isEmpty()) return; //printf("%s\n", (const char *) soundFile); @@ -62,7 +62,16 @@ // Register the various languages void SoundFactory::registerLanguages() { - const QStringList list = KGlobal::dirs()->findAllResources("appdata", QLatin1String( "sounds/*.soundtheme" )); + QSet<QString> list; + const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("sounds"), QStandardPaths::LocateDirectory); + Q_FOREACH (const QString &dir, dirs) + { + const QStringList fileNames = QDir(dir).entryList(QStringList() << QStringLiteral("*.soundtheme")); + Q_FOREACH (const QString &file, fileNames) + { + list <<dir + '/' + file; + } + } foreach(const QString &soundTheme, list) { @@ -72,8 +81,8 @@ QDomDocument document; if (document.setContent(&file)) { - QString code = document.documentElement().attribute(QLatin1String( "code" )); - bool enabled = !(KStandardDirs::locate("appdata", QLatin1String( "sounds/" ) + code + QLatin1Char( '/' )).isEmpty()); + QString code = document.documentElement().attribute(QStringLiteral( "code" )); + bool enabled = !(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "sounds/" ) + code + QLatin1Char( '/' ), QStandardPaths::LocateDirectory).isEmpty()); topLevel->registerLanguage(code, soundTheme, enabled); } } @@ -97,7 +106,7 @@ languageElement = document.documentElement(); - soundNamesList = languageElement.elementsByTagName(QLatin1String( "sound" )); + soundNamesList = languageElement.elementsByTagName(QStringLiteral( "sound" )); sounds = soundNamesList.count(); if (sounds < 1) return false; @@ -109,9 +118,9 @@ { soundNameElement = (const QDomElement &) soundNamesList.item(sound).toElement(); - nameAttribute = soundNameElement.attributeNode(QLatin1String( "name" )); + nameAttribute = soundNameElement.attributeNode(QStringLiteral( "name" )); namesList << nameAttribute.value(); - fileAttribute = soundNameElement.attributeNode(QLatin1String( "file" )); + fileAttribute = soundNameElement.attributeNode(QStringLiteral( "file" )); filesList << fileAttribute.value(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/sounds/CMakeLists.txt new/ktuberling-15.12.0/sounds/CMakeLists.txt --- old/ktuberling-15.08.3/sounds/CMakeLists.txt 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/sounds/CMakeLists.txt 2015-12-09 13:00:01.000000000 +0100 @@ -2,6 +2,6 @@ FILE( GLOB oggfiles *.ogg ) -INSTALL( FILES ${oggfiles} DESTINATION ${DATA_INSTALL_DIR}/ktuberling/sounds/en ) +INSTALL( FILES ${oggfiles} DESTINATION ${KDE_INSTALL_DATADIR}/ktuberling/sounds/en ) -INSTALL( FILES en.soundtheme DESTINATION ${DATA_INSTALL_DIR}/ktuberling/sounds/ ) +INSTALL( FILES en.soundtheme DESTINATION ${KDE_INSTALL_DATADIR}/ktuberling/sounds/ ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/todraw.cpp new/ktuberling-15.12.0/todraw.cpp --- old/ktuberling-15.08.3/todraw.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/todraw.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -16,8 +16,6 @@ #include <QPainter> #include <QSvgRenderer> -#include <kdeversion.h> - static QImage toImage(const QString &element, int width, int height, QSvgRenderer *renderer) { QImage img(width, height, QImage::Format_ARGB32_Premultiplied); @@ -73,7 +71,7 @@ if (m_beingDragged) return unclippedRect(); - QRectF backgroundRect = renderer()->boundsOnElement(QLatin1String( "background" )); + QRectF backgroundRect = renderer()->boundsOnElement(QStringLiteral( "background" )); backgroundRect.translate(-somePos); backgroundRect = transform().inverted().map(backgroundRect).boundingRect(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/toplevel.cpp new/ktuberling-15.12.0/toplevel.cpp --- old/ktuberling-15.08.3/toplevel.cpp 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/toplevel.cpp 2015-12-09 13:00:01.000000000 +0100 @@ -12,13 +12,11 @@ #include "toplevel.h" -#include <kapplication.h> #include <kmessagebox.h> #include <kfiledialog.h> #include <klocale.h> -#include <kstandarddirs.h> +#include <KLocalizedString> #include <kio/netaccess.h> -#include <kaction.h> #include <kstandardaction.h> #include <kstandardshortcut.h> #include <kstandardgameaction.h> @@ -28,13 +26,15 @@ #include <kimageio.h> #include <kmimetype.h> #include <kconfiggroup.h> -#include <ktemporaryfile.h> -#include <kdeprintdialog.h> #include <kcombobox.h> +#include <QApplication> #include <QClipboard> +#include <QFileInfo> #include <QPrintDialog> #include <QPrinter> +#include <QTemporaryFile> +#include <QWidgetAction> #include "playground.h" #include "soundfactory.h" @@ -49,7 +49,7 @@ QString board, language; playGround = new PlayGround(this); - playGround->setObjectName( QLatin1String( "playGround" ) ); + playGround->setObjectName( QStringLiteral( "playGround" ) ); soundFactory = new SoundFactory(this); @@ -92,8 +92,8 @@ playgroundsGroup->addAction(t); QList<QAction*> actionList = playgroundsGroup->actions(); qSort(actionList.begin(), actionList.end(), actionSorterByName); - unplugActionList( QLatin1String( "playgroundList" ) ); - plugActionList( QLatin1String( "playgroundList" ), actionList ); + unplugActionList( QStringLiteral( "playgroundList" ) ); + plugActionList( QStringLiteral( "playgroundList" ), actionList ); playgroundCombo->addItem(menuText,QVariant(pixmap)); playgroundCombo->setItemData(playgroundCombo->count()-1,QVariant(board),BOARD_THEME); @@ -102,7 +102,7 @@ // Register an available language void TopLevel::registerLanguage(const QString &code, const QString &soundFile, bool enabled) { - KToggleAction *t = new KToggleAction(KGlobal::locale()->languageCodeToName(code), this); + KToggleAction *t = new KToggleAction(KLocale::global()->languageCodeToName(code), this); t->setEnabled(enabled); actionCollection()->addAction(soundFile, t); t->setData(soundFile); @@ -110,10 +110,10 @@ connect(t, SIGNAL(toggled(bool)), SLOT(changeLanguage())); languagesGroup->addAction(t); QList<QAction*> actionList = languagesGroup->actions(); - actionList.removeAll(actionCollection()->action(QLatin1String( "speech_no_sound" ))); + actionList.removeAll(actionCollection()->action(QStringLiteral( "speech_no_sound" ))); qSort(actionList.begin(), actionList.end(), actionSorterByName); - unplugActionList( QLatin1String( "languagesList" ) ); - plugActionList( QLatin1String( "languagesList" ), actionList ); + unplugActionList( QStringLiteral( "languagesList" ) ); + plugActionList( QStringLiteral( "languagesList" ), actionList ); } // Switch to another gameboard @@ -142,8 +142,7 @@ QFileInfo fi(newGameBoard); if (fi.isRelative()) { - QStringList list = KGlobal::dirs()->findAllResources("appdata", QLatin1String( "pics/" ) + newGameBoard); - if (!list.isEmpty()) fileToLoad = list.first(); + fileToLoad = QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "pics/" ) + newGameBoard); } else { @@ -190,8 +189,7 @@ QFileInfo fi(soundFile); if (fi.isRelative()) { - const QStringList list = KGlobal::dirs()->findAllResources("appdata", QLatin1String( "sounds/" ) + soundFile); - if (!list.isEmpty()) fileToLoad = list.first(); + fileToLoad = QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "sounds/" ) + soundFile); } else { @@ -223,7 +221,7 @@ // Read options from preferences file void TopLevel::readOptions(QString &board, QString &language) { - KConfigGroup config(KGlobal::config(), "General"); + KConfigGroup config(KSharedConfig::openConfig(), "General"); QString option = config.readEntry("Sound", "on" ); bool soundEnabled = option.indexOf(QLatin1String( "on" )) == 0; @@ -235,7 +233,7 @@ { if (language.isEmpty()) { - language = sounds.value(KGlobal::locale()->language(), QLatin1String( "en.soundtheme" )); + language = sounds.value(KLocale::global()->language(), QStringLiteral( "en.soundtheme" )); } } else @@ -250,8 +248,8 @@ // Write options to preferences file void TopLevel::writeOptions() { - KConfigGroup config(KGlobal::config(), "General"); - config.writeEntry("Sound", actionCollection()->action(QLatin1String( "speech_no_sound" ))->isChecked() ? "off": "on"); + KConfigGroup config(KSharedConfig::openConfig(), "General"); + config.writeEntry("Sound", actionCollection()->action(QStringLiteral( "speech_no_sound" ))->isChecked() ? "off": "on"); config.writeEntry("Gameboard", playGround->currentGameboard()); @@ -270,11 +268,11 @@ KStandardGameAction::load(this, SLOT(fileOpen()), actionCollection()); KStandardGameAction::save(this, SLOT(fileSave()), actionCollection()); KStandardGameAction::print(this, SLOT(filePrint()), actionCollection()); - KStandardGameAction::quit(kapp, SLOT(quit()), actionCollection()); + KStandardGameAction::quit(qApp, SLOT(quit()), actionCollection()); - action = actionCollection()->addAction( QLatin1String( "game_save_picture" )); + action = actionCollection()->addAction( QStringLiteral( "game_save_picture" )); action->setText(i18n("Save &as Picture...")); - connect(action, SIGNAL(triggered(bool)), SLOT(filePicture())); + connect(action, &QAction::triggered, this, &TopLevel::filePicture); //Edit action = KStandardAction::copy(this, SLOT(editCopy()), actionCollection()); @@ -287,15 +285,15 @@ //Speech KToggleAction *t = new KToggleAction(i18n("&No Sound"), this); - actionCollection()->addAction( QLatin1String( "speech_no_sound" ), t); - connect(t, SIGNAL(triggered(bool)), SLOT(soundOff())); + actionCollection()->addAction( QStringLiteral( "speech_no_sound" ), t); + connect(t, &QAction::triggered, this, &TopLevel::soundOff); languagesGroup->addAction(t); KStandardAction::fullScreen(this, SLOT(toggleFullScreen()), this, actionCollection()); t = new KToggleAction(i18n("&Lock Aspect Ratio"), this); - actionCollection()->addAction( QLatin1String( "lock_aspect_ratio" ), t); - connect(t, SIGNAL(triggered(bool)), this, SLOT(lockAspectRatio(bool))); + actionCollection()->addAction( QStringLiteral( "lock_aspect_ratio" ), t); + connect(t, &QAction::triggered, this, &TopLevel::lockAspectRatio); playgroundCombo = new KComboBox(this); playgroundCombo->setMinimumWidth(200); @@ -308,9 +306,9 @@ connect(playgroundCombo, SIGNAL(currentIndexChanged(int)),this,SLOT(changeGameboardFromCombo(int))); - KAction *widgetAction = new KAction(this); + QWidgetAction *widgetAction = new QWidgetAction(this); widgetAction->setDefaultWidget(playgroundCombo); - actionCollection()->addAction( QLatin1String( "playgroundSelection" ),widgetAction); + actionCollection()->addAction( QStringLiteral( "playgroundSelection" ),widgetAction); setupGUI(ToolBar | Keys | Save | Create); } @@ -320,8 +318,8 @@ // this destroys our actions lists ... KXmlGuiWindow::saveNewToolbarConfig(); // ... so plug them again - plugActionList( QLatin1String( "playgroundList" ), playgroundsGroup->actions() ); - plugActionList( QLatin1String( "languagesList" ), languagesGroup->actions() ); + plugActionList( QStringLiteral( "playgroundList" ), playgroundsGroup->actions() ); + plugActionList( QStringLiteral( "languagesList" ), languagesGroup->actions() ); } // Reset gameboard @@ -333,13 +331,13 @@ // Load gameboard void TopLevel::fileOpen() { - KUrl url = KFileDialog::getOpenUrl(KUrl("kfiledialog:///<ktuberling>"), - QString::fromLatin1("*.tuberling|%1\n*|%2").arg(i18n("KTuberling files"), i18n("All files"))); + QUrl url = KFileDialog::getOpenUrl(QUrl(QStringLiteral("kfiledialog:///<ktuberling>")), + QStringLiteral("*.tuberling|%1\n*|%2").arg(i18n("KTuberling files"), i18n("All files"))); open(url); } -void TopLevel::open(const KUrl &url) +void TopLevel::open(const QUrl &url) { if (url.isEmpty()) return; @@ -372,12 +370,12 @@ { KUrl url = KFileDialog::getSaveUrl ( KUrl("kfiledialog:///<ktuberling>"), - QString::fromLatin1("*.tuberling|%1").arg(i18n("KTuberling files")), this, QString(), KFileDialog::ConfirmOverwrite); + QStringLiteral("*.tuberling|%1").arg(i18n("KTuberling files")), this, QString(), KFileDialog::ConfirmOverwrite); if (url.isEmpty()) return; - KTemporaryFile tempFile; // for network saving + QTemporaryFile tempFile; // for network saving QString name; if( !url.isLocalFile() ) { @@ -410,23 +408,23 @@ void TopLevel::filePicture() { const QString patternsString = KImageIO::pattern(KImageIO::Writing); - QStringList patterns = patternsString.split("\n"); + QStringList patterns = patternsString.split(QStringLiteral("\n")); // Favor png if (!patterns.isEmpty()) { QString firstLine = patterns[0]; patterns.removeAt(0); - if (firstLine.contains(" *.png")) { - firstLine.remove(" *.png"); + if (firstLine.contains(QStringLiteral(" *.png"))) { + firstLine.remove(QStringLiteral(" *.png")); firstLine.prepend("*.png "); } patterns.prepend(firstLine); } - const KUrl url = KFileDialog::getSaveUrl(KUrl(QString("kfiledialog:///<ktuberling>")), patterns.join("\n"), this, QString(), KFileDialog::ConfirmOverwrite); + const KUrl url = KFileDialog::getSaveUrl(KUrl(QStringLiteral("kfiledialog:///<ktuberling>")), patterns.join(QStringLiteral("\n")), this, QString(), KFileDialog::ConfirmOverwrite); if( url.isEmpty() ) return; - KTemporaryFile tempFile; // for network saving + QTemporaryFile tempFile; // for network saving QString name; if( !url.isLocalFile() ) { @@ -471,7 +469,7 @@ QPrinter printer; bool ok; - QPrintDialog *printDialog = KdePrint::createPrintDialog(&printer, this); + QPrintDialog *printDialog = new QPrintDialog(&printer, this); printDialog->setWindowTitle(i18n("Print %1", actionCollection()->action(playGround->currentGameboard())->iconText())); ok = printDialog->exec(); delete printDialog; @@ -497,23 +495,23 @@ // Toggle sound off void TopLevel::soundOff() { - actionCollection()->action(QLatin1String( "speech_no_sound" ))->setChecked(true); + actionCollection()->action(QStringLiteral( "speech_no_sound" ))->setChecked(true); writeOptions(); } bool TopLevel::isSoundEnabled() const { - return !actionCollection()->action(QLatin1String( "speech_no_sound" ))->isChecked(); + return !actionCollection()->action(QStringLiteral( "speech_no_sound" ))->isChecked(); } void TopLevel::toggleFullScreen() { - KToggleFullScreenAction::setFullScreen( this, actionCollection()->action(QLatin1String( "fullscreen" ))->isChecked()); + KToggleFullScreenAction::setFullScreen( this, actionCollection()->action(QStringLiteral( "fullscreen" ))->isChecked()); } void TopLevel::lockAspectRatio(bool lock) { - actionCollection()->action(QLatin1String( "lock_aspect_ratio" ))->setChecked(lock); + actionCollection()->action(QStringLiteral( "lock_aspect_ratio" ))->setChecked(lock); playGround->lockAspectRatio(lock); writeOptions(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ktuberling-15.08.3/toplevel.h new/ktuberling-15.12.0/toplevel.h --- old/ktuberling-15.08.3/toplevel.h 2014-10-26 23:52:14.000000000 +0100 +++ new/ktuberling-15.12.0/toplevel.h 2015-12-09 13:00:01.000000000 +0100 @@ -28,7 +28,7 @@ TopLevel(); ~TopLevel(); - void open(const KUrl &url); + void open(const QUrl &url); void registerGameboard(const QString& menuText, const QString& boardFile, const QPixmap& pixmap); void registerLanguage(const QString &code, const QString &soundFile, bool enabled); void changeLanguage(const QString &langCode);
