Hello community, here is the log from the commit of package kshisen for openSUSE:Factory checked in at 2015-05-11 18:23:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kshisen (Old) and /work/SRC/openSUSE:Factory/.kshisen.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kshisen" Changes: -------- --- /work/SRC/openSUSE:Factory/kshisen/kshisen.changes 2015-03-11 09:52:16.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kshisen.new/kshisen.changes 2015-05-11 18:23:30.000000000 +0200 @@ -1,0 +2,22 @@ +Sat Apr 11 13:20:46 UTC 2015 - [email protected] + +- Update to KDE Applications 15.04.0 + * KDE Applications 15.04.0 + * https://www.kde.org/announcements/announce-applications-15.04.0.php + + +------------------------------------------------------------------- +Sat Mar 21 18:16:50 UTC 2015 - [email protected] + +- Update to KDE Applications 15.03.95 + * KDE Applications 15.04 RC + + +------------------------------------------------------------------- +Sun Mar 8 12:48:34 UTC 2015 - [email protected] + +- Update to KDE Applications 15.03.80 + * KDE Applications 15.04 Beta + + +------------------------------------------------------------------- Old: ---- kshisen-14.12.3.tar.xz New: ---- kshisen-15.04.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kshisen.spec ++++++ --- /var/tmp/diff_new_pack.YJPYiY/_old 2015-05-11 18:23:30.000000000 +0200 +++ /var/tmp/diff_new_pack.YJPYiY/_new 2015-05-11 18:23:30.000000000 +0200 @@ -19,16 +19,34 @@ Name: kshisen BuildRequires: libkdegames-devel BuildRequires: libkmahjongg-devel +BuildRequires: extra-cmake-modules +BuildRequires: kconfig-devel +BuildRequires: kcoreaddons-devel +BuildRequires: kdeclarative-devel +BuildRequires: kdelibs4support-devel +BuildRequires: kdnssd-framework-devel +BuildRequires: knewstuff-devel +BuildRequires: kxmlgui-devel +BuildRequires: phonon4qt5-devel +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(Qt5Concurrent) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Qml) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5QuickWidgets) +BuildRequires: pkgconfig(Qt5Svg) +BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: xz Summary: Shisen-Sho Mahjongg-like game License: GPL-2.0+ Group: Amusements/Games/Board/Other Url: http://www.kde.org -Version: 14.12.3 +Version: 15.04.0 Release: 0 Source0: kshisen-%{version}.tar.xz +Obsoletes: %{name}5 < %{version} +Provides: %{name}5 = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -%kde4_runtime_requires %description Shisen-Sho (KShishen) is a game similar to Mahjongg. The object of the @@ -41,24 +59,22 @@ %setup -q -n kshisen-%{version} %build - %cmake_kde4 -d build + %cmake_kf5 -d build %make_jobs %install - cd build - %kde4_makeinstall - %suse_update_desktop_file -r kshisen Game BoardGame - %kde_post_install + %kf5_makeinstall -C build + %suse_update_desktop_file -r org.kde.kshisen Game BoardGame %files %defattr(-,root,root) %doc COPYING COPYING.DOC -%{_kde4_bindir}/kshisen -%{_kde4_htmldir}/en/kshisen/ -%{_kde4_applicationsdir}/kshisen.desktop -%{_kde4_iconsdir}/hicolor/*/apps/kshisen.* -%{_kde4_appsdir}/kshisen/ -%{_kde4_configkcfgdir}/kshisen.kcfg -%{_datadir}/sounds/kshisen/ +%{_kf5_bindir}/kshisen +%{_kf5_htmldir}/en/kshisen/ +%{_kf5_applicationsdir}/org.kde.kshisen.desktop +%{_kf5_iconsdir}/hicolor/*/apps/kshisen.* +%{_kf5_configkcfgdir}/ +%{_kf5_sharedir}/sounds/kshisen/ +%{_kf5_kxmlguidir}/ %changelog ++++++ kshisen-14.12.3.tar.xz -> kshisen-15.04.0.tar.xz ++++++ Files old/kshisen-14.12.3/128-apps-kshisen.png and new/kshisen-15.04.0/128-apps-kshisen.png differ Files old/kshisen-14.12.3/16-apps-kshisen.png and new/kshisen-15.04.0/16-apps-kshisen.png differ Files old/kshisen-14.12.3/22-apps-kshisen.png and new/kshisen-15.04.0/22-apps-kshisen.png differ Files old/kshisen-14.12.3/32-apps-kshisen.png and new/kshisen-15.04.0/32-apps-kshisen.png differ Files old/kshisen-14.12.3/48-apps-kshisen.png and new/kshisen-15.04.0/48-apps-kshisen.png differ Files old/kshisen-14.12.3/64-apps-kshisen.png and new/kshisen-15.04.0/64-apps-kshisen.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/CMakeLists.txt new/kshisen-15.04.0/CMakeLists.txt --- old/kshisen-14.12.3/CMakeLists.txt 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/CMakeLists.txt 2015-03-18 07:45:13.000000000 +0100 @@ -1,25 +1,53 @@ project( kshisen ) -if(NOT COMPILING_KDEGAMES) - find_package(KDE4 REQUIRED) - include(KDE4Defaults) - include(MacroLibrary) - find_package(KDEGames 4.9.0 REQUIRED) - - set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules) - find_package(LibKMahjongg REQUIRED) - - add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) - add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - include_directories(${LIBKMAHJONGG_INCLUDE_DIR} ${KDEGAMES_INCLUDE_DIRS} ${KDE4_INCLUDES} ${QDBUS_INCLUDE_DIRS}) -else(NOT COMPILING_KDEGAMES) - set(LIBKMAHJONGG_LIBRARY kmahjongglib) -endif(NOT COMPILING_KDEGAMES) +cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) + +set (QT_MIN_VERSION "5.2.0") + +find_package(ECM 1.3.0 REQUIRED NO_MODULE) + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Gui ) +find_package(KF5 REQUIRED COMPONENTS CoreAddons XmlGui Config KIO DNSSD NewStuff Declarative DocTools ) + +include(FeatureSummary) +include(GenerateExportHeader) +include(ECMPackageConfigHelpers) +include(ECMSetupVersion) +include(ECMGenerateHeaders) +include(ECMMarkNonGuiExecutable) +include(KDEInstallDirs) +include(ECMInstallIcons) +include(KDECompilerSettings) +include(KDECMakeSettings) + +find_package(KF5KMahjongglib REQUIRED) +find_package(KF5KDEGames 4.9.0 REQUIRED) +find_package(Phonon4Qt5 REQUIRED) + +add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) +add_definitions(-DTRANSLATION_DOMAIN="kshisen") +add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") add_subdirectory( src ) add_subdirectory( sounds ) add_subdirectory( doc ) -install( PROGRAMS kshisen.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( PROGRAMS org.kde.kshisen.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) + +ecm_install_icons( ICONS + 128-apps-kshisen.png + 64-apps-kshisen.png + 48-apps-kshisen.png + 32-apps-kshisen.png + 22-apps-kshisen.png + 16-apps-kshisen.png + DESTINATION ${ICON_INSTALL_DIR} + THEME hicolor ) + +########### Display Summary ############### +feature_summary(WHAT ALL + INCLUDE_QUIET_PACKAGES + FATAL_ON_MISSING_REQUIRED_PACKAGES) -kde4_install_icons( ${ICON_INSTALL_DIR} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/README.PACKAGERS new/kshisen-15.04.0/README.PACKAGERS --- old/kshisen-14.12.3/README.PACKAGERS 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/README.PACKAGERS 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -EXTENDED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/cmake-modules/FindLibKMahjongg.cmake new/kshisen-15.04.0/cmake-modules/FindLibKMahjongg.cmake --- old/kshisen-14.12.3/cmake-modules/FindLibKMahjongg.cmake 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/cmake-modules/FindLibKMahjongg.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -# - Try to find the libkmahjongg library -# Once done this will define -# -# LIBKMAHJONGG_FOUND - system has the libkmahjongg library -# LIBKMAHJONGG_INCLUDE_DIR - the libkmahjongg include directory -# LIBKMAHJONGG_LIBRARY - Link this to use the libkmahjongg library -# -include(CheckLibraryExists) - -if (LIBKMAHJONGG_INCLUDE_DIR AND LIBKMAHJONGG_LIBRARY) - # in cache already - set(LIBKMAHJONGG_FOUND TRUE) - -else (LIBKMAHJONGG_INCLUDE_DIR AND LIBKMAHJONGG_LIBRARY) - # reset vars - set(LIBKMAHJONGG_INCLUDE_DIR) - set(LIBKMAHJONGG_LIBRARY) - - find_path(LIBKMAHJONGG_INCLUDE_DIR kmahjonggtileset.h - ${INCLUDE_INSTALL_DIR} ${KDE4_INCLUDE_DIR} ${GNUWIN32_DIR}/include) - set(LIBKMAHJONGG_INCLUDE_DIR ${LIBKMAHJONGG_INCLUDE_DIR}) - - set(CMAKE_LIBRARY_PATH ${LIB_INSTALL_DIR}) - find_library(LIBKMAHJONGG_LIBRARY NAMES kmahjongglib - PATHS ${LIB_INSTALL_DIR} ${KDE4_LIB_DIR} ${GNUWIN32_DIR}/lib) - set(LIBKMAHJONGG_LIBRARY ${LIBKMAHJONGG_LIBRARY}) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBKMAHJONGG DEFAULT_MSG LIBKMAHJONGG_INCLUDE_DIR LIBKMAHJONGG_LIBRARY) - - mark_as_advanced(LIBKMAHJONGG_INCLUDE_DIR LIBKMAHJONGG_LIBRARY) -endif(LIBKMAHJONGG_INCLUDE_DIR AND LIBKMAHJONGG_LIBRARY) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/doc/CMakeLists.txt new/kshisen-15.04.0/doc/CMakeLists.txt --- old/kshisen-14.12.3/doc/CMakeLists.txt 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/doc/CMakeLists.txt 2015-03-18 07:45:13.000000000 +0100 @@ -1,4 +1,4 @@ ########### install files ############### # # -kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kshisen) +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kshisen) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/doc/index.docbook new/kshisen-15.04.0/doc/index.docbook --- old/kshisen-14.12.3/doc/index.docbook 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/doc/index.docbook 2015-03-18 07:45:13.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 "&kshisen;"> <!ENTITY kappversion "1.8.4"> <!--Application version. Use this variable everywhere it's needed.--> <!ENTITY package "kdegames"> <!-- do not change this! --> Files old/kshisen-14.12.3/hi128-app-kshisen.png and new/kshisen-15.04.0/hi128-app-kshisen.png differ Files old/kshisen-14.12.3/hi16-app-kshisen.png and new/kshisen-15.04.0/hi16-app-kshisen.png differ Files old/kshisen-14.12.3/hi22-app-kshisen.png and new/kshisen-15.04.0/hi22-app-kshisen.png differ Files old/kshisen-14.12.3/hi32-app-kshisen.png and new/kshisen-15.04.0/hi32-app-kshisen.png differ Files old/kshisen-14.12.3/hi48-app-kshisen.png and new/kshisen-15.04.0/hi48-app-kshisen.png differ Files old/kshisen-14.12.3/hi64-app-kshisen.png and new/kshisen-15.04.0/hi64-app-kshisen.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/kshisen.desktop new/kshisen-15.04.0/kshisen.desktop --- old/kshisen-14.12.3/kshisen.desktop 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/kshisen.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,137 +0,0 @@ -[Desktop Entry] -Exec=kshisen -caption %c -Type=Application -X-DocPath=kshisen/index.html -Name=Shisen-Sho -Name[af]=Shisen-sho -Name[ast]=Shisen-Sho -Name[be]=Ші-сен-сёе -Name[bn]=শিসেন-শো -Name[br]=Shisen-Sho -Name[bs]=Shisen-Sho -Name[ca]=Shisen-Sho -Name[ca@valencia]=Shisen-Sho -Name[cs]=Šisen-Šo -Name[cy]=Shisen-Sho -Name[da]=Shisen-Sho -Name[de]=Shisen-Sho -Name[el]=Shisen-Sho -Name[en_GB]=Shisen-Sho -Name[eo]=Ŝisen-Ŝo -Name[es]=Shisen-Sho -Name[et]=Shisen-Sho -Name[eu]=Shisen-Sho -Name[fi]=Shisen-Sho -Name[fr]=Shisen-sho -Name[ga]=Shisen-Sho -Name[gl]=Shisen-Sho -Name[he]=שישן־שו -Name[hne]=साईसेन-सो -Name[hr]=Shisen-Sho -Name[hu]=Shisen-Sho -Name[is]=Shisen-Sho -Name[it]=Shisen-Sho -Name[ja]=Shisen-Sho -Name[kk]=Сисен-сё -Name[km]=Shisen-Sho -Name[ko]=Shisen-Sho -Name[lt]=Shisen-Sho -Name[lv]=Shisen-Sho -Name[mk]=Shisen-Sho -Name[mr]=शाईसेन-शो -Name[nb]=Shisen-Sho -Name[nds]=Shisen-Sho -Name[ne]=सिसेन शो -Name[nl]=Shisen-Sho -Name[nn]=Shisen-Sho -Name[pa]=ਸ਼ਿਸੀਨ-ਸ਼ੋ -Name[pl]=Shisen-Sho -Name[pt]=Shisen-Sho -Name[pt_BR]=Shisen-Sho -Name[ro]=Shisen-Sho -Name[ru]=Shisen-Sho -Name[se]=Shisen-Sho -Name[sk]=Šisen-Šo -Name[sl]=Shisen-Sho -Name[sr]=Шисен‑шо -Name[sr@ijekavian]=Шисен‑шо -Name[sr@ijekavianlatin]=Šisen‑šo -Name[sr@latin]=Šisen‑šo -Name[sv]=Shisen-Sho -Name[ta]=ஷிசென்-ஷோ -Name[tg]=Шисен-Шо -Name[tr]=Shisen-Sho -Name[ug]=Shisen-Sho -Name[uk]=Шісен-шо -Name[vi]=Shisen-Sho -Name[wa]=Shisen-Sho -Name[xh]=Shisen-Sho -Name[x-test]=xxShisen-Shoxx -Name[zh_CN]=连连看 -Name[zh_TW]=Shisen-Sho -GenericName=Shisen-Sho Mahjongg-like Tile Game -GenericName[ast]=Xuegu de fiches asemeyáu al Shisen-Sho Mahjongg -GenericName[be]=Варыянт маджонга Шысен-сё -GenericName[bn]=শিসেন-শো মাহজং-জাতীয় টালির খেলা -GenericName[br]=Ur c'hoari teol a seurt gant Shisen*Sho Mahjongg -GenericName[bs]=Shisen-Sho Mahjongg igra pločica -GenericName[ca]=Joc de mosaics Shisen-Sho a l'estil Mahjongg -GenericName[ca@valencia]=Joc de mosaics Shisen-Sho a l'estil Mahjongg -GenericName[cs]=Hra s dlaždicemi Šisen-Šo -GenericName[cy]=Gêm Deiliau Shisen-Sho sy'n debyg i Mahjongg -GenericName[da]=Shisen-Sho Mahjongg-lignende brikspil -GenericName[de]=Spiel mit Mahjongg-Spielsteinen -GenericName[el]=Παιχνίδι παρόμοιο με το Shisen-Sho Mahjongg -GenericName[en_GB]=Shisen-Sho Mahjongg-like Tile Game -GenericName[eo]=Ŝisen-Ŝo Mahjongg-simila kahel-ludo -GenericName[es]=Juego de fichas similar al Shisen-Sho Mahjongg -GenericName[et]=Mahjonggi moodi klotsimäng -GenericName[eu]=Shisen-Sho Mahjongg-en antzeko fitxa-jokoa -GenericName[fa]=بازی کاشی شبیه Shisen-Sho Mahjongg -GenericName[fi]=Shisen-Sho Mahjongg-tyylinen laattapeli -GenericName[fr]=Jeu de tuiles Shisen-Sho dans le style du Mahjongg -GenericName[ga]=Cluiche Tíleanna Shisen-Sho, cosúil le Mahjongg -GenericName[gl]=Xogo de fichas Shisen-so ao estilo do Mahjongg -GenericName[he]=Shisen Sho, חיקוי מה ג'ונג, משחק קלפים -GenericName[hne]=साइसेन-सो महजोंग जइसन टाइल वाले खेल -GenericName[hr]=Shisen-Sho igra s pločicama poput Mahjongga -GenericName[hu]=Shisen-Sho Mahjongg-szerű kockajáték -GenericName[is]=Shisen-Sho kubbaleikur líkur Mahjongg -GenericName[it]=Shisen-Sho, gioco di tessere simile a Mahjongg -GenericName[ja]=四川省マージャン牌ゲーム -GenericName[kk]=Маджонг секілді жапон ойны -GenericName[km]=ល្បែងក្បឿងដូច Shisen-Sho Mahjongg -GenericName[ko]=시센-쇼 마작과 같은 타일 게임 -GenericName[lv]=Shisen-Sho Mahjongg līdzīga spēle -GenericName[mk]=Игра со плочки слична на Shisen-Sho Mahjongg -GenericName[mr]=शाईसेन-शो माहजोन्ग सारखा टाइल खेळ -GenericName[nb]=Shisen-Sho Mahjongg-lignende brikkespill -GenericName[nds]=Mahjongg-liek Speel -GenericName[ne]=सिसेन शो माहाजोङ्ग जस्तै टायल खेल -GenericName[nl]=Shisen-Sho Mahjongg-achtig stenenspel -GenericName[nn]=Shisen-Sho Mahjongg-liknande brikkespel -GenericName[pa]=ਸ਼ਿਸੀਨ-ਸ਼ੋ ਮਹਿਜ਼ੋਗ ਵਰਗੀ ਖੇਡ -GenericName[pl]=Gra typu Shisen-Sho Mahjongg -GenericName[pt]=Jogo de Peças Shisen-Sho, semelhante ao Mahjongg -GenericName[pt_BR]=Jogo de peças parecido com Shisen-Sho Mahjongg -GenericName[ru]=Вариант маджонга: Ши-сен-сё -GenericName[se]=Shisen-Sho Mahjongg-lágan bihttáspeallu -GenericName[sk]=Hra typu Shisen-Sho Mahjongg -GenericName[sl]=Igra s ploščicami Shisen-Sho, podobna Mahjonggu -GenericName[sr]=Игра с плочицама попут маџонга -GenericName[sr@ijekavian]=Игра с плочицама попут маџонга -GenericName[sr@ijekavianlatin]=Igra s pločicama poput madžonga -GenericName[sr@latin]=Igra s pločicama poput madžonga -GenericName[sv]=Shisen-Sho Mahjongg-liknande brickspel -GenericName[ta]=ஷிசெந்ஷோ மாஹ்ஜோங் போன்ற ஓடு விளையாட்டு -GenericName[tr]=Shisen-Sho Mahjongg Benzeri Döşeme Oyunu -GenericName[ug]=Shisen-Sho Mahjongg غا ئوخشاپ قالىدىغان كاھىش ئويۇنى -GenericName[uk]=Шісен-шо, схожа на маджонґ гра з плитками -GenericName[wa]=Djeu d' pîce do djinre di Mahjongg -GenericName[x-test]=xxShisen-Sho Mahjongg-like Tile Gamexx -GenericName[zh_CN]=类似连连看的麻将游戏 -GenericName[zh_TW]=四川省麻將牌遊戲 -Icon=kshisen -X-KDE-StartupNotify=true -X-DBUS-StartupType=Multi -Categories=Qt;KDE;Game;BoardGame; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/org.kde.kshisen.desktop new/kshisen-15.04.0/org.kde.kshisen.desktop --- old/kshisen-14.12.3/org.kde.kshisen.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/kshisen-15.04.0/org.kde.kshisen.desktop 2015-03-18 07:45:13.000000000 +0100 @@ -0,0 +1,137 @@ +[Desktop Entry] +Exec=kshisen -qwindowtitle %c +Type=Application +X-DocPath=kshisen/index.html +Name=Shisen-Sho +Name[af]=Shisen-sho +Name[ast]=Shisen-Sho +Name[be]=Ші-сен-сёе +Name[bn]=শিসেন-শো +Name[br]=Shisen-Sho +Name[bs]=Shisen-Sho +Name[ca]=Shisen-Sho +Name[ca@valencia]=Shisen-Sho +Name[cs]=Šisen-Šo +Name[cy]=Shisen-Sho +Name[da]=Shisen-Sho +Name[de]=Shisen-Sho +Name[el]=Shisen-Sho +Name[en_GB]=Shisen-Sho +Name[eo]=Ŝisen-Ŝo +Name[es]=Shisen-Sho +Name[et]=Shisen-Sho +Name[eu]=Shisen-Sho +Name[fi]=Shisen-Sho +Name[fr]=Shisen-sho +Name[ga]=Shisen-Sho +Name[gl]=Shisen-Sho +Name[he]=שישן־שו +Name[hne]=साईसेन-सो +Name[hr]=Shisen-Sho +Name[hu]=Shisen-Sho +Name[is]=Shisen-Sho +Name[it]=Shisen-Sho +Name[ja]=Shisen-Sho +Name[kk]=Сисен-сё +Name[km]=Shisen-Sho +Name[ko]=Shisen-Sho +Name[lt]=Shisen-Sho +Name[lv]=Shisen-Sho +Name[mk]=Shisen-Sho +Name[mr]=शाईसेन-शो +Name[nb]=Shisen-Sho +Name[nds]=Shisen-Sho +Name[ne]=सिसेन शो +Name[nl]=Shisen-Sho +Name[nn]=Shisen-Sho +Name[pa]=ਸ਼ਿਸੀਨ-ਸ਼ੋ +Name[pl]=Shisen-Sho +Name[pt]=Shisen-Sho +Name[pt_BR]=Shisen-Sho +Name[ro]=Shisen-Sho +Name[ru]=Shisen-Sho +Name[se]=Shisen-Sho +Name[sk]=Šisen-Šo +Name[sl]=Shisen-Sho +Name[sr]=Шисен‑шо +Name[sr@ijekavian]=Шисен‑шо +Name[sr@ijekavianlatin]=Šisen‑šo +Name[sr@latin]=Šisen‑šo +Name[sv]=Shisen-Sho +Name[ta]=ஷிசென்-ஷோ +Name[tg]=Шисен-Шо +Name[tr]=Shisen-Sho +Name[ug]=Shisen-Sho +Name[uk]=Шісен-шо +Name[vi]=Shisen-Sho +Name[wa]=Shisen-Sho +Name[xh]=Shisen-Sho +Name[x-test]=xxShisen-Shoxx +Name[zh_CN]=连连看 +Name[zh_TW]=Shisen-Sho +GenericName=Shisen-Sho Mahjongg-like Tile Game +GenericName[ast]=Xuegu de fiches asemeyáu al Shisen-Sho Mahjongg +GenericName[be]=Варыянт маджонга Шысен-сё +GenericName[bn]=শিসেন-শো মাহজং-জাতীয় টালির খেলা +GenericName[br]=Ur c'hoari teol a seurt gant Shisen*Sho Mahjongg +GenericName[bs]=Shisen-Sho Mahjongg igra pločica +GenericName[ca]=Joc de mosaics Shisen-Sho a l'estil Mahjongg +GenericName[ca@valencia]=Joc de mosaics Shisen-Sho a l'estil Mahjongg +GenericName[cs]=Hra s dlaždicemi Šisen-Šo +GenericName[cy]=Gêm Deiliau Shisen-Sho sy'n debyg i Mahjongg +GenericName[da]=Shisen-Sho Mahjongg-lignende brikspil +GenericName[de]=Spiel mit Mahjongg-Spielsteinen +GenericName[el]=Παιχνίδι παρόμοιο με το Shisen-Sho Mahjongg +GenericName[en_GB]=Shisen-Sho Mahjongg-like Tile Game +GenericName[eo]=Ŝisen-Ŝo Mahjongg-simila kahel-ludo +GenericName[es]=Juego de fichas similar al Shisen-Sho Mahjongg +GenericName[et]=Mahjonggi moodi klotsimäng +GenericName[eu]=Shisen-Sho Mahjongg-en antzeko fitxa-jokoa +GenericName[fa]=بازی کاشی شبیه Shisen-Sho Mahjongg +GenericName[fi]=Shisen-Sho Mahjongg-tyylinen laattapeli +GenericName[fr]=Jeu de tuiles Shisen-Sho dans le style du Mahjongg +GenericName[ga]=Cluiche Tíleanna Shisen-Sho, cosúil le Mahjongg +GenericName[gl]=Xogo de fichas Shisen-so ao estilo do Mahjongg +GenericName[he]=Shisen Sho, חיקוי מה ג'ונג, משחק קלפים +GenericName[hne]=साइसेन-सो महजोंग जइसन टाइल वाले खेल +GenericName[hr]=Shisen-Sho igra s pločicama poput Mahjongga +GenericName[hu]=Shisen-Sho Mahjongg-szerű kockajáték +GenericName[is]=Shisen-Sho kubbaleikur líkur Mahjongg +GenericName[it]=Shisen-Sho, gioco di tessere simile a Mahjongg +GenericName[ja]=四川省マージャン牌ゲーム +GenericName[kk]=Маджонг секілді жапон ойны +GenericName[km]=ល្បែងក្បឿងដូច Shisen-Sho Mahjongg +GenericName[ko]=시센-쇼 마작과 같은 타일 게임 +GenericName[lv]=Shisen-Sho Mahjongg līdzīga spēle +GenericName[mk]=Игра со плочки слична на Shisen-Sho Mahjongg +GenericName[mr]=शाईसेन-शो माहजोन्ग सारखा टाइल खेळ +GenericName[nb]=Shisen-Sho Mahjongg-lignende brikkespill +GenericName[nds]=Mahjongg-liek Speel +GenericName[ne]=सिसेन शो माहाजोङ्ग जस्तै टायल खेल +GenericName[nl]=Shisen-Sho Mahjongg-achtig stenenspel +GenericName[nn]=Shisen-Sho Mahjongg-liknande brikkespel +GenericName[pa]=ਸ਼ਿਸੀਨ-ਸ਼ੋ ਮਹਿਜ਼ੋਗ ਵਰਗੀ ਖੇਡ +GenericName[pl]=Gra typu Shisen-Sho Mahjongg +GenericName[pt]=Jogo de Peças Shisen-Sho, semelhante ao Mahjongg +GenericName[pt_BR]=Jogo de peças parecido com Shisen-Sho Mahjongg +GenericName[ru]=Вариант маджонга: Ши-сен-сё +GenericName[se]=Shisen-Sho Mahjongg-lágan bihttáspeallu +GenericName[sk]=Hra typu Shisen-Sho Mahjongg +GenericName[sl]=Igra s ploščicami Shisen-Sho, podobna Mahjonggu +GenericName[sr]=Игра с плочицама попут маџонга +GenericName[sr@ijekavian]=Игра с плочицама попут маџонга +GenericName[sr@ijekavianlatin]=Igra s pločicama poput madžonga +GenericName[sr@latin]=Igra s pločicama poput madžonga +GenericName[sv]=Shisen-Sho Mahjongg-liknande brickspel +GenericName[ta]=ஷிசெந்ஷோ மாஹ்ஜோங் போன்ற ஓடு விளையாட்டு +GenericName[tr]=Shisen-Sho Mahjongg Benzeri Döşeme Oyunu +GenericName[ug]=Shisen-Sho Mahjongg غا ئوخشاپ قالىدىغان كاھىش ئويۇنى +GenericName[uk]=Шісен-шо, схожа на маджонґ гра з плитками +GenericName[wa]=Djeu d' pîce do djinre di Mahjongg +GenericName[x-test]=xxShisen-Sho Mahjongg-like Tile Gamexx +GenericName[zh_CN]=类似连连看的麻将游戏 +GenericName[zh_TW]=四川省麻將牌遊戲 +Icon=kshisen +X-KDE-StartupNotify=true +X-DBUS-StartupType=Multi +Categories=Qt;KDE;Game;BoardGame; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/CMakeLists.txt new/kshisen-15.04.0/src/CMakeLists.txt --- old/kshisen-14.12.3/src/CMakeLists.txt 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/CMakeLists.txt 2015-03-18 07:45:13.000000000 +0100 @@ -1,27 +1,27 @@ project( kshisen ) -include_directories( ${CMAKE_SOURCE_DIR}/libkmahjongg ${CMAKE_SOURCE_DIR}/libkdegames/highscore ) - set( kshisen_SRCS main.cpp board.cpp app.cpp + kshisen_debug.cpp ) -kde4_add_ui_files( kshisen_SRCS +ki18n_wrap_ui( kshisen_SRCS settings.ui ) -kde4_add_kcfg_files( kshisen_SRCS prefs.kcfgc ) +kconfig_add_kcfg_files( kshisen_SRCS prefs.kcfgc ) -kde4_add_app_icon( kshisen_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../hi*-app-kshisen.png" ) +add_executable( kshisen ${kshisen_SRCS} ) -kde4_add_executable( kshisen ${kshisen_SRCS} ) +include_directories(${PHONON_INCLUDES}) -target_link_libraries( kshisen ${KDE4_KDEUI_LIBS} kdegames ${LIBKMAHJONGG_LIBRARY} ) +target_link_libraries(kshisen Qt5::Gui KF5::CoreAddons KF5::KIOWidgets KF5::DNSSD Phonon::phonon4qt5 + KF5::XmlGui KF5::I18n KF5KDEGames KF5KDEGamesPrivate KF5KMahjongglib KF5::DBusAddons) install( TARGETS kshisen ${INSTALL_TARGETS_DEFAULT_ARGS} ) install( FILES kshisen.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) -install( FILES kshisenui.rc DESTINATION ${DATA_INSTALL_DIR}/kshisen ) +install( FILES kshisenui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kshisen ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/app.cpp new/kshisen-15.04.0/src/app.cpp --- old/kshisen-14.12.3/src/app.cpp 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/app.cpp 2015-03-18 07:45:13.000000000 +0100 @@ -28,26 +28,21 @@ #include <highscore/kscoredialog.h> #include <kstandardgameaction.h> -#include <kaction.h> #include <kactioncollection.h> #include <kconfig.h> #include <kconfigdialog.h> -#include <kdebug.h> -#include <kglobal.h> -#include <kicon.h> +#include <QIcon> #include <klineedit.h> -#include <klocale.h> -#include <kmenu.h> +#include <KLocalizedString> #include <kmessagebox.h> -#include <kpushbutton.h> #include <kseparator.h> #include <kshortcutsdialog.h> #include <kstandardaction.h> -#include <kstandarddirs.h> #include <kstandardguiitem.h> -#include <kstatusbar.h> +#include <qstatusbar.h> #include <ktoggleaction.h> +#include "kshisen_debug.h" #include <QTimer> #include <cmath> @@ -116,31 +111,31 @@ KStandardGameAction::redo(this, SLOT(redo()), actionCollection()); KStandardGameAction::hint(this, SLOT(hint()), actionCollection()); - KToggleAction *soundAction = new KToggleAction(KIcon(QLatin1String("speaker")), i18n("Play Sounds"), this); + KToggleAction *soundAction = new KToggleAction(QIcon::fromTheme(QLatin1String("speaker")), i18n("Play Sounds"), this); soundAction->setChecked(Prefs::sounds()); actionCollection()->addAction(QLatin1String("sounds"), soundAction); - connect(soundAction, SIGNAL(triggered(bool)), m_board, SLOT(setSoundsEnabled(bool))); + connect(soundAction, &KToggleAction::triggered, m_board, &Board::setSoundsEnabled); // Settings KStandardAction::preferences(this, SLOT(showSettingsDialog()), actionCollection()); - connect(m_board, SIGNAL(cheatStatusChanged()), this, SLOT(updateCheatDisplay())); - connect(m_board, SIGNAL(changed()), this, SLOT(updateItems())); - connect(m_board, SIGNAL(tilesDoNotMatch()), this, SLOT(notifyTilesDoNotMatch())); - connect(m_board, SIGNAL(invalidMove()), this, SLOT(notifyInvalidMove())); - connect(m_board, SIGNAL(selectATile()), this, SLOT(notifySelectATile())); - connect(m_board, SIGNAL(selectAMatchingTile()), this, SLOT(notifySelectAMatchingTile())); - connect(m_board, SIGNAL(selectAMove()), this, SLOT(notifySelectAMove())); + connect(m_board, &Board::cheatStatusChanged, this, &App::updateCheatDisplay); + connect(m_board, &Board::changed, this, &App::updateItems); + connect(m_board, &Board::tilesDoNotMatch, this, &App::notifyTilesDoNotMatch); + connect(m_board, &Board::invalidMove, this, &App::notifyInvalidMove); + connect(m_board, &Board::selectATile, this, &App::notifySelectATile); + connect(m_board, &Board::selectAMatchingTile, this, &App::notifySelectAMatchingTile); + connect(m_board, &Board::selectAMove, this, &App::notifySelectAMove); QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeDisplay())); + connect(timer, &QTimer::timeout, this, &App::updateTimeDisplay); timer->start(1000); - connect(m_board, SIGNAL(changed()), this, SLOT(updateTileDisplay())); - connect(m_board, SIGNAL(endOfGame()), this, SLOT(slotEndOfGame())); + connect(m_board, &Board::changed, this, &App::updateTileDisplay); + connect(m_board, &Board::endOfGame, this, &App::slotEndOfGame); - connect(this, SIGNAL(invokeNewGame()), m_board, SLOT(newGame())); - connect(m_board, SIGNAL(newGameStarted()), this, SLOT(newGame())); + connect(this, &App::invokeNewGame, m_board, &Board::newGame); + connect(m_board, &Board::newGameStarted, this, &App::newGame); } void App::newGame() @@ -214,26 +209,26 @@ void App::updateItems() { if (m_board->isOver()) { - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Undo))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Redo))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Pause))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Hint))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Undo)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Redo)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Pause)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Hint)))->setEnabled(false); } else if (m_board->isPaused()) { - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Undo))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Redo))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Restart))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Pause))->setChecked(true); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Hint))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Undo)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Redo)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Restart)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Pause)))->setChecked(true); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Hint)))->setEnabled(false); } else if (m_board->isStuck()) { - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Pause))->setEnabled(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Hint))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Pause)))->setEnabled(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Hint)))->setEnabled(false); } else { - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Undo))->setEnabled(m_board->canUndo()); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Redo))->setEnabled(m_board->canRedo()); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Restart))->setEnabled(m_board->canUndo()); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Pause))->setEnabled(true); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Pause))->setChecked(false); - actionCollection()->action(KStandardGameAction::name(KStandardGameAction::Hint))->setEnabled(true); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Undo)))->setEnabled(m_board->canUndo()); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Redo)))->setEnabled(m_board->canRedo()); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Restart)))->setEnabled(m_board->canUndo()); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Pause)))->setEnabled(true); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Pause)))->setChecked(false); + actionCollection()->action(QLatin1Literal(KStandardGameAction::name(KStandardGameAction::Hint)))->setEnabled(true); } } @@ -252,14 +247,14 @@ scoreInfo[KScoreDialog::Time] = timeString; KScoreDialog scoreDialog(KScoreDialog::Name | KScoreDialog::Time | KScoreDialog::Score, this); - scoreDialog.addField(KScoreDialog::Custom1, i18n("Gravity"), "gravity"); + scoreDialog.addField(KScoreDialog::Custom1, i18n("Gravity"), QLatin1Literal("gravity")); // FIXME: This is bad, because the translated words are stored in the highscores and thus switching the language makes ugly things (schwarzer) if (m_board->gravityFlag()) { scoreInfo[KScoreDialog::Custom1] = i18n("Yes"); } else { scoreInfo[KScoreDialog::Custom1] = i18n("No"); } - scoreDialog.setConfigGroup(QString("%1x%2").arg(sizeX[Prefs::size()]).arg(sizeY[Prefs::size()])); + scoreDialog.setConfigGroup(QString::fromLatin1("%1x%2").arg(sizeX[Prefs::size()]).arg(sizeY[Prefs::size()])); if (m_board->hasCheated()) { QString message = i18n("\nYou could have been in the highscores\nif you did not use Undo or Hint.\nTry without them next time."); @@ -283,7 +278,7 @@ if (m_board->isStuck() || m_board->isOver()) { return; } - //kDebug() << "Time: " << m_board->currentTime(); + //qCDebug(KSHISEN_LOG) << "Time: " << m_board->currentTime(); int currentTime = m_board->currentTime(); QString message = i18n("Your time: %1:%2:%3 %4", QString().sprintf("%02d", currentTime / 3600), @@ -360,7 +355,7 @@ void App::showHighscores() { KScoreDialog scoreDialog(KScoreDialog::Name | KScoreDialog::Time, this); - scoreDialog.addField(KScoreDialog::Custom1, i18n("Gravity"), "gravity"); + scoreDialog.addField(KScoreDialog::Custom1, i18n("Gravity"), QLatin1Literal("gravity")); scoreDialog.exec(); } @@ -371,21 +366,19 @@ void App::showSettingsDialog() { - if (KConfigDialog::showDialog("settings")) { + if (KConfigDialog::showDialog(QLatin1Literal("settings"))) { return; } //Use the classes exposed by LibKmahjongg for our configuration dialog - KMahjonggConfigDialog *dialog = new KMahjonggConfigDialog(this, "settings", Prefs::self()); - dialog->addPage(new Settings(0), i18n("General"), "games-config-options"); + KMahjonggConfigDialog *dialog = new KMahjonggConfigDialog(this, QLatin1Literal("settings"), Prefs::self()); + dialog->addPage(new Settings(0), i18n("General"), QLatin1Literal("games-config-options")); dialog->addTilesetPage(); dialog->addBackgroundPage(); - dialog->setHelp(QString(), "kshisen"); - connect(dialog, SIGNAL(settingsChanged(QString)), m_board, SLOT(loadSettings())); + //dialog->setHelp(QString(), "kshisen"); + connect(dialog, &KMahjonggConfigDialog::settingsChanged, m_board, &Board::loadSettings); dialog->show(); } -#include "app.moc" - // vim: expandtab:tabstop=4:shiftwidth=4 // kate: space-indent on; indent-width 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/board.cpp new/kshisen-15.04.0/src/board.cpp --- old/kshisen-14.12.3/src/board.cpp 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/board.cpp 2015-03-18 07:45:13.000000000 +0100 @@ -22,16 +22,16 @@ #include "board.h" #include "prefs.h" -#include <kdebug.h> -#include <kglobalsettings.h> -#include <klocale.h> -#include <kstandarddirs.h> +#include <KLocalizedString> + +#include "kshisen_debug.h" #include <QMouseEvent> #include <QPainter> #include <QTimer> #include <cstring> +#include <QStandardPaths> #define EMPTY 0 @@ -45,7 +45,7 @@ if (x == m_path.last().x && y == m_path.last().y) { return false; } - kDebug() << "isInPath:" << x << "," << y; + qCDebug(KSHISEN_LOG) << "isInPath:" << x << "," << y; Debug(); QList<Position>::const_iterator iter; // a path has at least 2 positions @@ -57,7 +57,7 @@ // to fix if ((x == iter->x && ((y > pathY && y <= iter->y) || (y < pathY && y >= iter->y))) || (y == iter->y && ((x > pathX && x <= iter->x) || (x < pathX && x >= iter->x)))) { - kDebug() << "isInPath:" << x << "," << y << "found in path" << pathX << "," << pathY << " => " << iter->x << "," << iter->y; + qCDebug(KSHISEN_LOG) << "isInPath:" << x << "," << y << "found in path" << pathX << "," << pathY << " => " << iter->x << "," << iter->y; return true; } pathX = iter->x; @@ -76,8 +76,8 @@ m_gravityFlag(true), m_solvableFlag(false), m_chineseStyleFlag(false), m_tilesCanSlideFlag(false), m_highlightedTile(-1), m_paintConnection(false), m_paintPossibleMoves(false), m_paintInProgress(false), - m_soundPick(KStandardDirs::locate("sound", "kshisen/tile-touch.ogg")), - m_soundFall(KStandardDirs::locate("sound", "kshisen/tile-fall-tile.ogg")) + m_soundPick(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("sounds/kshisen/tile-touch.ogg"))), + m_soundFall(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("sounds/kshisen/tile-fall-tile.ogg"))) { m_tileRemove1.first = -1; @@ -99,12 +99,12 @@ void Board::loadSettings() { if (!loadTileset(Prefs::tileSet())) { - kDebug() << "An error occurred when loading the tileset" << Prefs::tileSet() << "KShisen will continue with the default tileset."; + qCDebug(KSHISEN_LOG) << "An error occurred when loading the tileset" << Prefs::tileSet() << "KShisen will continue with the default tileset."; } // Load background if (!loadBackground(Prefs::background())) { - kDebug() << "An error occurred when loading the background" << Prefs::background() << "KShisen will continue with the default background."; + qCDebug(KSHISEN_LOG) << "An error occurred when loading the background" << Prefs::background() << "KShisen will continue with the default background."; } // There are tile sets, that have only one tile for e.g. the flowers group. @@ -139,7 +139,7 @@ if (m_tiles.loadTileset(pathToTileset)) { if (m_tiles.loadGraphics()) { Prefs::setTileSet(pathToTileset); - Prefs::self()->writeConfig(); + Prefs::self()->save(); resizeBoard(); } return true; @@ -148,7 +148,7 @@ if (m_tiles.loadDefault()) { if (m_tiles.loadGraphics()) { Prefs::setTileSet(m_tiles.path()); - Prefs::self()->writeConfig(); + Prefs::self()->save(); resizeBoard(); } } @@ -160,7 +160,7 @@ if (m_background.load(pathToBackground, width(), height())) { if (m_background.loadGraphics()) { Prefs::setBackground(pathToBackground); - Prefs::self()->writeConfig(); + Prefs::self()->save(); resizeBoard(); return true; } @@ -169,7 +169,7 @@ if (m_background.loadDefault()) { if (m_background.loadGraphics()) { Prefs::setBackground(m_background.path()); - Prefs::self()->writeConfig(); + Prefs::self()->save(); resizeBoard(); } } @@ -189,8 +189,7 @@ void Board::setField(int x, int y, int value) { if (x < 0 || y < 0 || x >= xTiles() || y >= yTiles()) { - kFatal() << "Attempted write to invalid field position " - "(" << x << "," << y << ")"; + qFatal("Attempted write to invalid field position (%u,%u)", x, y); } m_field[y * xTiles() + x] = value; @@ -201,8 +200,7 @@ { #ifdef DEBUGGING if (x < -1 || y < -1 || x > xTiles() || y > yTiles()) { - kFatal() << "Attempted read from invalid field position " - "(" << x << "," << y << ")"; + qFatal("Attempted read from invalid field position (%u,%u)", x, y); } #endif @@ -411,9 +409,9 @@ void Board::resizeEvent(QResizeEvent *e) { - kDebug() << "[resizeEvent]"; + qCDebug(KSHISEN_LOG) << "[resizeEvent]"; if (e->spontaneous()) { - kDebug() << "[resizeEvent] spontaneous"; + qCDebug(KSHISEN_LOG) << "[resizeEvent] spontaneous"; } resizeBoard(); emit resized(); @@ -557,7 +555,7 @@ } // debug, tell if make solvable failed if (maxAttempts == 0) { - kDebug() << "NewGame make solvable failed"; + qCDebug(KSHISEN_LOG) << "NewGame make solvable failed"; } @@ -880,7 +878,7 @@ // DEBUG undo, compare to saved board state for (int i = 0; i < xTiles() * yTiles(); ++i) { if (saved1[i] != m_field[i]) { - kDebug() << "[DEBUG Undo 1], tile (" << i << ") was" << saved1[i] << "before more, it is" << m_field[i] << "after undo."; + qCDebug(KSHISEN_LOG) << "[DEBUG Undo 1], tile (" << i << ") was" << saved1[i] << "before more, it is" << m_field[i] << "after undo."; errorFound = true; } } @@ -893,7 +891,7 @@ // DEBUG undo, compare to saved board2 state for (int i = 0; i < xTiles() * yTiles(); ++i) { if (saved2[i] != m_field[i]) { - kDebug() << "[DEBUG Undo 2], tile (" << i << ") was" << saved2[i] << "after more, it is" << m_field[i] << "after redo."; + qCDebug(KSHISEN_LOG) << "[DEBUG Undo 2], tile (" << i << ") was" << saved2[i] << "after more, it is" << m_field[i] << "after redo."; errorFound = true; } } @@ -903,13 +901,13 @@ } // dumpBoard on error if (errorFound) { - kDebug() << "[DEBUG] Before move"; + qCDebug(KSHISEN_LOG) << "[DEBUG] Before move"; dumpBoard(saved1); - kDebug() << "[DEBUG] After move"; + qCDebug(KSHISEN_LOG) << "[DEBUG] After move"; dumpBoard(saved2); - kDebug() << "[DEBUG] Undo"; + qCDebug(KSHISEN_LOG) << "[DEBUG] Undo"; dumpBoard(saved3); - kDebug() << "[DEBUG] Redo"; + qCDebug(KSHISEN_LOG) << "[DEBUG] Redo"; dumpBoard(saved4); } @@ -1485,7 +1483,7 @@ // if there is no slide, keep previous implementation: move both column up if (!move->m_hasSlide) { #ifdef DEBUGGING - kDebug() << "[undo] gravity from a no slide move"; + qCDebug(KSHISEN_LOG) << "[undo] gravity from a no slide move"; #endif // move tiles from the first column up for (y = 0; y < move->m_y1; ++y) { @@ -1500,7 +1498,7 @@ } } else { // else check all tiles from the slide that may have fallen down #ifdef DEBUGGING - kDebug() << "[undo] gravity from slide s1(" << move->m_slideX1 << "," << move->m_slideY1 << ")=>s2(" << move->m_slideX2 << "," << move->m_slideY2 << ") matching (" << move->m_x1 << "," << move->m_y1 << ")=>(" << move->m_x2 << "," << move->m_y2 << ")"; + qCDebug(KSHISEN_LOG) << "[undo] gravity from slide s1(" << move->m_slideX1 << "," << move->m_slideY1 << ")=>s2(" << move->m_slideX2 << "," << move->m_slideY2 << ") matching (" << move->m_x1 << "," << move->m_y1 << ")=>(" << move->m_x2 << "," << move->m_y2 << ")"; #endif // horizontal slide // because tiles that slides horizontaly may fall down @@ -1508,7 +1506,7 @@ // we need to take them back up then undo the slide if (move->m_slideY1 == move->m_slideY2) { #ifdef DEBUGGING - kDebug() << "[undo] gravity from horizontal slide"; + qCDebug(KSHISEN_LOG) << "[undo] gravity from horizontal slide"; #endif // last slide tile went from slide_x1 -> slide_x2 // the number of slided tiles is n = abs(x1 - slide_x1) @@ -1522,14 +1520,14 @@ dx = -dx; } #ifdef DEBUGGING - kDebug() << "[undo] n =" << n; + qCDebug(KSHISEN_LOG) << "[undo] n =" << n; #endif // slided tiles may fall down after the slide // so any tiles on top of the columns between // slide_x2 -> slide_x2 +/- n (excluded) should go up to slide_y1 if (move->m_slideX2 > move->m_slideX1) { // slide to the right #ifdef DEBUGGING - kDebug() << "[undo] slide right"; + qCDebug(KSHISEN_LOG) << "[undo] slide right"; #endif for (int i = move->m_slideX2; i > move->m_slideX2 - n; --i) { // find top tile @@ -1545,7 +1543,7 @@ continue; } #ifdef DEBUGGING - kDebug() << "[undo] moving (" << i << "," << j << ") up to (" << i << "," << move->m_slideY1 << ")"; + qCDebug(KSHISEN_LOG) << "[undo] moving (" << i << "," << j << ") up to (" << i << "," << move->m_slideY1 << ")"; #endif // put it back up setField(i, move->m_slideY1, field(i, j)); @@ -1555,7 +1553,7 @@ } } else { // slide to the left #ifdef DEBUGGING - kDebug() << "[undo] slide left"; + qCDebug(KSHISEN_LOG) << "[undo] slide left"; #endif for (int i = move->m_slideX2; i < move->m_slideX2 + n; ++i) { // find top tile @@ -1571,7 +1569,7 @@ continue; } #ifdef DEBUGGING - kDebug() << "[undo] moving (" << i << "," << j << ") up to (" << i << "," << move->m_slideY1 << ")"; + qCDebug(KSHISEN_LOG) << "[undo] moving (" << i << "," << j << ") up to (" << i << "," << move->m_slideY1 << ")"; #endif // put it back up setField(i, move->m_slideY1, field(i, j)); @@ -1582,11 +1580,11 @@ } // move tiles from the second column up #ifdef DEBUGGING - kDebug() << "[undo] moving up column x2" << move->m_x2; + qCDebug(KSHISEN_LOG) << "[undo] moving up column x2" << move->m_x2; #endif for (y = 0; y <= move->m_y2; ++y) { #ifdef DEBUGGING - kDebug() << "[undo] moving up tile" << y + 1; + qCDebug(KSHISEN_LOG) << "[undo] moving up tile" << y + 1; #endif setField(move->m_x2, y, field(move->m_x2, y + 1)); updateField(move->m_x2, y); @@ -1600,17 +1598,17 @@ if (move->m_slideY1 > 0) { for (int i = move->m_x1 + dx; i >= move->m_x1; --i) { #ifdef DEBUGGING - kDebug() << "[undo] moving up column" << i << "until" << move->m_slideY1; + qCDebug(KSHISEN_LOG) << "[undo] moving up column" << i << "until" << move->m_slideY1; #endif for (int j = 0; j < move->m_slideY1; ++j) { #ifdef DEBUGGING - kDebug() << "[undo] moving up tile" << j + 1; + qCDebug(KSHISEN_LOG) << "[undo] moving up tile" << j + 1; #endif setField(i, j, field(i, j + 1)); updateField(i, j); } #ifdef DEBUGGING - kDebug() << "[undo] clearing last tile" << move->m_slideY1; + qCDebug(KSHISEN_LOG) << "[undo] clearing last tile" << move->m_slideY1; #endif setField(i, move->m_slideY1, EMPTY); updateField(i, move->m_slideY1); @@ -1620,17 +1618,17 @@ if (move->m_slideY1 > 0) { for (int i = move->m_x1 - dx; i <= move->m_x1; ++i) { #ifdef DEBUGGING - kDebug() << "[undo] moving up column" << i << "until" << move->m_slideY1; + qCDebug(KSHISEN_LOG) << "[undo] moving up column" << i << "until" << move->m_slideY1; #endif for (int j = 0; j < move->m_slideY1; ++j) { #ifdef DEBUGGING - kDebug() << "[undo] moving up tile" << j + 1; + qCDebug(KSHISEN_LOG) << "[undo] moving up tile" << j + 1; #endif setField(i, j, field(i, j + 1)); updateField(i, j); } #ifdef DEBUGGING - kDebug() << "[undo] clearing last tile" << move->m_slideY1; + qCDebug(KSHISEN_LOG) << "[undo] clearing last tile" << move->m_slideY1; #endif setField(i, move->m_slideY1, EMPTY); updateField(i, move->m_slideY1); @@ -1640,7 +1638,7 @@ // then undo the slide to put the tiles back to their original location #ifdef DEBUGGING - kDebug() << "[undo] reversing slide"; + qCDebug(KSHISEN_LOG) << "[undo] reversing slide"; #endif reverseSlide(move->m_x1, move->m_y1, move->m_slideX1, move->m_slideY1, move->m_slideX2, move->m_slideY2); @@ -1649,7 +1647,7 @@ // the default implementation works because it only affects // the two columns were tiles were taken #ifdef DEBUGGING - kDebug() << "[undo] gravity from vertical slide"; + qCDebug(KSHISEN_LOG) << "[undo] gravity from vertical slide"; #endif // move tiles from the first column up @@ -1733,7 +1731,7 @@ void Board::dumpBoard() const { - kDebug() << "Board contents:"; + qCDebug(KSHISEN_LOG) << "Board contents:"; for (int y = 0; y < yTiles(); ++y) { QString row; for (int x = 0; x < xTiles(); ++x) { @@ -1744,13 +1742,13 @@ row += QString("%1").arg(tile, 3); } } - kDebug() << row; + qCDebug(KSHISEN_LOG) << row; } } void Board::dumpBoard(const int *board) const { - kDebug() << "Board contents:"; + qCDebug(KSHISEN_LOG) << "Board contents:"; for (int y = 0; y < yTiles(); ++y) { QString row; for (int x = 0; x < xTiles(); ++x) { @@ -1761,7 +1759,7 @@ row += QString("%1").arg(tile, 3); } } - kDebug() << row; + qCDebug(KSHISEN_LOG) << row; } } #endif @@ -1837,10 +1835,15 @@ PossibleMoves p; while (hint_I(p)) { - kFatal(!tilesMatch(field(p.first().m_path.first().x, p.first().m_path.first().y), field(p.first().m_path.last().x, p.first().m_path.last().y))) - << "Removing unmatched tiles: (" << p.first().m_path.first().x << "," << p.first().m_path.first().y << ") => " - << field(p.first().m_path.first().x, p.first().m_path.first().y) << " (" << p.first().m_path.last().x << "," << p.first().m_path.last().y << ") => " - << field(p.first().m_path.last().x, p.first().m_path.last().y); + if (!tilesMatch(field(p.first().m_path.first().x, p.first().m_path.first().y), field(p.first().m_path.last().x, p.first().m_path.last().y))) { + qFatal("Removing unmatched tiles: (%u,%u) => %u (%u,%u) => %u", + p.first().m_path.first().x, + p.first().m_path.first().y, + field(p.first().m_path.first().x, p.first().m_path.first().y), + p.first().m_path.last().x, + p.first().m_path.last().y, + field(p.first().m_path.last().x, p.first().m_path.last().y)); + } setField(p.first().m_path.first().x, p.first().m_path.first().y, EMPTY); setField(p.first().m_path.last().x, p.first().m_path.last().y, EMPTY); } @@ -2017,10 +2020,9 @@ void Board::setSoundsEnabled(bool enabled) { Prefs::setSounds(enabled); - Prefs::self()->writeConfig(); + Prefs::self()->save(); } -#include "board.moc" // vim: expandtab:tabstop=4:shiftwidth=4 // kate: space-indent on; indent-width 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/board.h new/kshisen-15.04.0/src/board.h --- old/kshisen-14.12.3/src/board.h 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/board.h 2015-03-18 07:45:13.000000000 +0100 @@ -32,9 +32,9 @@ #include <kmahjonggtileset.h> #include <kmahjonggbackground.h> -#include <kdebug.h> #include <krandomsequence.h> +#include "kshisen_debug.h" #include <QList> #include <QSize> #include <QWidget> @@ -79,16 +79,16 @@ bool isInPath(int x, int y) const; void Debug() const { - kDebug() << "PossibleMove"; + qCDebug(KSHISEN_LOG) << "PossibleMove"; QList<Position>::const_iterator iter; for (iter = m_path.constBegin(); iter != m_path.constEnd(); ++iter) { - kDebug() << " Path:" << iter->x << "," << iter->y; + qCDebug(KSHISEN_LOG) << " Path:" << iter->x << "," << iter->y; } if (m_hasSlide) { - kDebug() << " hasSlide"; + qCDebug(KSHISEN_LOG) << " hasSlide"; for (iter = m_slide.constBegin(); iter != m_slide.constEnd(); ++iter) { - kDebug() << " Slide:" << iter->x << "," << iter->y; + qCDebug(KSHISEN_LOG) << " Slide:" << iter->x << "," << iter->y; } } } @@ -238,8 +238,8 @@ public slots: /** Does most of the newGame work. - * This slot is called from the App::invokeNewGame() signal from App and - * should call App::newGame again to do the work that cannot be done + * This slot is called from the KShisen::invokeNewGame() signal from KShisen and + * should call KShisen::newGame again to do the work that cannot be done * from Board. */ void newGame(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/commit.h new/kshisen-15.04.0/src/commit.h --- old/kshisen-14.12.3/src/commit.h 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/commit.h 2015-03-18 07:45:13.000000000 +0100 @@ -18,6 +18,6 @@ // The COMMIT number is only used in trunk and should be increased every few commits, if things changed. #ifndef KSHISEN_COMMIT -#define KSHISEN_COMMIT "13" +#define KSHISEN_COMMIT "14" #endif //KSHISEN_COMMIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/kshisen_debug.cpp new/kshisen-15.04.0/src/kshisen_debug.cpp --- old/kshisen-14.12.3/src/kshisen_debug.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kshisen-15.04.0/src/kshisen_debug.cpp 2015-03-18 07:45:13.000000000 +0100 @@ -0,0 +1,23 @@ +/* This file is part of the KDE project + Copyright (C) 2014 Laurent Montel <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kshisen_debug.h" +Q_LOGGING_CATEGORY(KSHISEN_LOG, "log_kshisen") + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/kshisen_debug.h new/kshisen-15.04.0/src/kshisen_debug.h --- old/kshisen-14.12.3/src/kshisen_debug.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kshisen-15.04.0/src/kshisen_debug.h 2015-03-18 07:45:13.000000000 +0100 @@ -0,0 +1,27 @@ +/* This file is part of the KDE project + Copyright (C) 2014 Laurent Montel <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KSHISEN_DEBUG_H +#define KSHISEN_DEBUG_H + +#include <QLoggingCategory> +Q_DECLARE_LOGGING_CATEGORY(KSHISEN_LOG) + +#endif + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kshisen-14.12.3/src/main.cpp new/kshisen-15.04.0/src/main.cpp --- old/kshisen-14.12.3/src/main.cpp 2014-09-17 16:16:15.000000000 +0200 +++ new/kshisen-15.04.0/src/main.cpp 2015-03-18 07:45:13.000000000 +0100 @@ -22,30 +22,52 @@ #include "commit.h" #include "version.h" -#include <kapplication.h> -#include <kaboutdata.h> -#include <kcmdlineargs.h> -#include <klocale.h> -#include <kglobal.h> +#include <KAboutData> +#include <Kdelibs4ConfigMigrator> + +#include <QCommandLineParser> +#include <QApplication> +#include <KLocalizedString> +#include <KDBusService> +#include <QCommandLineParser> static const char description[] = I18N_NOOP("A KDE game similar to Mahjongg"); int main(int argc, char **argv) { - KAboutData aboutData("kshisen", 0, ki18n("Shisen-Sho"), - KSHISEN_VERSION " #" KSHISEN_COMMIT, ki18n(description), KAboutData::License_GPL, - ki18n("(c) 1997, Mario Weilguni"), KLocalizedString(), "http://games.kde.org/kshisen"); - aboutData.addAuthor(ki18n("Frederik Schwarzer"), ki18n("Current Maintainer"), "[email protected]"); - aboutData.addAuthor(ki18n("Dave Corrie"), ki18n("Former Maintainer"), "[email protected]"); - aboutData.addAuthor(ki18n("Mario Weilguni"), ki18n("Original Author"), "[email protected]"); - aboutData.addCredit(ki18n("Mauricio Piacentini"), ki18n("KMahjonggLib integration for KDE4"), "[email protected]"); - aboutData.addCredit(ki18n("Jason Lane"), ki18n("Added 'tiles removed' counter<br/>Tile smooth-scaling and window resizing"), "[email protected]"); - aboutData.addCredit(ki18n("Thanks also to everyone who should be listed here but is not!")); - KCmdLineArgs::init(argc, argv, &aboutData); - - KApplication a; - KGlobal::locale()->insertCatalog(QLatin1String("libkdegames")); - KGlobal::locale()->insertCatalog(QLatin1String("libkmahjongg")); + // Migrate pre-existing (4.x) configuration + QStringList configFiles; + configFiles.append(QLatin1String("kshisenrc")); + configFiles.append(QLatin1String("kshisen.notifyrc")); + + Kdelibs4ConfigMigrator migrate(QLatin1String("kshisen")); + migrate.setConfigFiles(configFiles); + migrate.setUiFiles(QStringList() << QLatin1String("kshisenui.rc")); + migrate.migrate(); + + QApplication a(argc, argv); + + KAboutData aboutData(QLatin1Literal("kshisen"), i18n("Shisen-Sho"), + QLatin1String(KSHISEN_VERSION " #" KSHISEN_COMMIT), i18n(description), KAboutLicense::GPL, + i18n("(c) 1997, Mario Weilguni")); + aboutData.setHomepage(QLatin1Literal("http://games.kde.org/kshisen")); + aboutData.addAuthor(i18n("Frederik Schwarzer"), i18n("Current Maintainer"), QLatin1Literal("[email protected]")); + aboutData.addAuthor(i18n("Dave Corrie"), i18n("Former Maintainer"), QLatin1Literal("[email protected]")); + aboutData.addAuthor(i18n("Mario Weilguni"), i18n("Original Author"), QLatin1Literal("[email protected]")); + aboutData.addCredit(i18n("Mauricio Piacentini"), i18n("KMahjonggLib integration for KDE4"), QLatin1Literal("[email protected]")); + aboutData.addCredit(i18n("Jason Lane"), i18n("Added 'tiles removed' counter<br/>Tile smooth-scaling and window resizing"), QLatin1Literal("[email protected]")); + aboutData.addCredit(i18n("Thanks also to everyone who should be listed here but is not!")); + QCommandLineParser parser; + KAboutData::setApplicationData(aboutData); + parser.addVersionOption(); + parser.addHelpOption(); + aboutData.setupCommandLine(&parser); + parser.process(a); + aboutData.processCommandLine(&parser); + + a.setWindowIcon(QIcon::fromTheme(QLatin1String("kshisen"))); + + KDBusService service; App *app = new App(); app->show();
