Hello community, here is the log from the commit of package knetwalk for openSUSE:Factory checked in at 2015-05-11 18:14:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/knetwalk (Old) and /work/SRC/openSUSE:Factory/.knetwalk.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knetwalk" Changes: -------- --- /work/SRC/openSUSE:Factory/knetwalk/knetwalk.changes 2015-03-11 09:50:42.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.knetwalk.new/knetwalk.changes 2015-05-11 18:14:27.000000000 +0200 @@ -1,0 +2,22 @@ +Sat Apr 11 13:18:28 UTC 2015 - tittiatc...@gmail.com + +- 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:13:09 UTC 2015 - tittiatc...@gmail.com + +- Update to KDE Applications 15.03.95 + * KDE Applications 15.04 RC + + +------------------------------------------------------------------- +Sun Mar 8 12:46:59 UTC 2015 - tittiatc...@gmail.com + +- Update to KDE Applications 15.03.80 + * KDE Applications 15.04 Beta + + +------------------------------------------------------------------- Old: ---- knetwalk-14.12.3.tar.xz New: ---- knetwalk-15.04.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knetwalk.spec ++++++ --- /var/tmp/diff_new_pack.62GztW/_old 2015-05-11 18:14:28.000000000 +0200 +++ /var/tmp/diff_new_pack.62GztW/_new 2015-05-11 18:14:28.000000000 +0200 @@ -18,16 +18,52 @@ Name: knetwalk BuildRequires: libkdegames-devel -BuildRequires: xz +BuildRequires: update-desktop-files +BuildRequires: extra-cmake-modules +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Qml) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5QuickWidgets) +BuildRequires: pkgconfig(Qt5Svg) +BuildRequires: pkgconfig(Qt5Test) +BuildRequires: pkgconfig(Qt5Declarative) +BuildRequires: kcoreaddons-devel +BuildRequires: kconfig-devel +BuildRequires: kitemmodels-devel +BuildRequires: kwidgetsaddons-devel +BuildRequires: kcodecs-devel +BuildRequires: kwindowsystem-devel +BuildRequires: karchive-devel +BuildRequires: kdbusaddons-devel +BuildRequires: kdnssd-framework-devel +BuildRequires: kdeclarative-devel +BuildRequires: ki18n-devel +BuildRequires: kguiaddons-devel +BuildRequireS: kservice-devel +BuildRequires: kconfigwidgets-devel +BuildRequires: kitemviews-devel +BuildRequires: kiconthemes-devel +BuildRequires: kcompletion-devel +BuildRequires: kjobwidgets-devel +BuildRequires: ktextwidgets-devel +BuildRequires: kglobalaccel-devel +BuildRequires: kxmlgui-devel +BuildRequires: kcrash-devel +BuildRequires: kbookmarks-devel +BuildRequires: kio-devel +BuildRequires: knotifyconfig-devel +BuildRequires: knewstuff-devel +BuildRequires: kdelibs4support-devel Summary: Puzzle game License: GPL-2.0+ Group: Amusements/Games/Board/Puzzle Url: http://www.kde.org -Version: 14.12.3 +Version: 15.04.0 Release: 0 Source0: knetwalk-%{version}.tar.xz +Obsoletes: %{name}5 < %{version} +Provides: %{name}5 = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -%kde4_runtime_requires %description Turn the board pieces to get all computers connected. @@ -37,22 +73,21 @@ %setup -q -n knetwalk-%{version} %build - %cmake_kde4 -d build + %cmake_kf5 -d build %make_jobs %install - cd build - %kde4_makeinstall - %suse_update_desktop_file -r knetwalk KNetwalk "Tactical Game" Game LogicGame - %kde_post_install + %kf5_makeinstall -C build + %suse_update_desktop_file -r org.kde.knetwalk KNetwalk "Tactical Game" Game LogicGame %files %defattr(-,root,root) %doc COPYING COPYING.DOC -%{_kde4_bindir}/knetwalk -%{_kde4_htmldir}/en/knetwalk/ -%{_kde4_applicationsdir}/knetwalk.desktop -%{_kde4_iconsdir}/hicolor/*/apps/knetwalk.* -%{_kde4_appsdir}/knetwalk/ +%{_kf5_bindir}/knetwalk +%{_kf5_htmldir}/en/knetwalk/ +%{_kf5_applicationsdir}/org.kde.knetwalk.desktop +%{_kf5_iconsdir}/hicolor/*/*/knetwalk.* +%{_datadir}/knetwalk/ +%{_kf5_kxmlguidir}/knetwalk/ %changelog ++++++ knetwalk-14.12.3.tar.xz -> knetwalk-15.04.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/.gitignore new/knetwalk-15.04.0/.gitignore --- old/knetwalk-14.12.3/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/knetwalk-15.04.0/.gitignore 2015-03-29 18:40:03.000000000 +0200 @@ -0,0 +1 @@ +build \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/CMakeLists.txt new/knetwalk-15.04.0/CMakeLists.txt --- old/knetwalk-14.12.3/CMakeLists.txt 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/CMakeLists.txt 2015-03-29 18:40:03.000000000 +0200 @@ -1,20 +1,42 @@ project(knetwalk) +cmake_minimum_required(VERSION 2.8.12) + +find_package(ECM 1.3.0 REQUIRED NO_MODULE) +set(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 + WidgetsAddons + DBusAddons + I18n + GuiAddons + ConfigWidgets + ItemViews + IconThemes + XmlGui + KIO + NotifyConfig + ) +find_package(KF5KDEGames 4.9.0 REQUIRED) + +include(FeatureSummary) +include(ECMInstallIcons) +include(KDEInstallDirs) +include(KDECompilerSettings) +include(KDECMakeSettings) +include(ECMAddTests) + +add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) +add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") -if(NOT COMPILING_KDEGAMES) - find_package(KDE4 REQUIRED) - include(KDE4Defaults) - include(MacroLibrary) - find_package(KDEGames 4.9.0 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) add_subdirectory(src) add_subdirectory(themes) add_subdirectory(doc) -if(KDE4_BUILD_TESTS) - add_subdirectory(tests) -endif(KDE4_BUILD_TESTS) +if(BUILD_TESTING) + add_subdirectory(autotests) +endif() +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/README.PACKAGERS new/knetwalk-15.04.0/README.PACKAGERS --- old/knetwalk-14.12.3/README.PACKAGERS 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-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/knetwalk-14.12.3/autotests/CMakeLists.txt new/knetwalk-15.04.0/autotests/CMakeLists.txt --- old/knetwalk-14.12.3/autotests/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/knetwalk-15.04.0/autotests/CMakeLists.txt 2015-03-29 18:40:03.000000000 +0200 @@ -0,0 +1,6 @@ +set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) + +add_executable( abstractgridtest abstractgridtest.cpp ../src/abstractgrid.cpp ) +add_test(abstractgridtest abstractgridtest) +ecm_mark_as_test(abstractgridtest) +target_link_libraries( abstractgridtest Qt5::Gui Qt5::Test KF5::XmlGui) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/autotests/abstractgridtest.cpp new/knetwalk-15.04.0/autotests/abstractgridtest.cpp --- old/knetwalk-14.12.3/autotests/abstractgridtest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/knetwalk-15.04.0/autotests/abstractgridtest.cpp 2015-03-29 18:40:03.000000000 +0200 @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2013 by Albert Astals Cid <aa...@kde.org> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include <qtest.h> +#include <qdir.h> + +#include "../src/abstractgrid.h" +#include "../src/mainwindow.h" + +class AbstractGridTester : public AbstractGrid +{ + public: + void initializeGrid(uint width, uint height, Wrapping w=NotWrapped) + { + AbstractGrid::initializeGrid(width, height, w); + } +}; + +class AbstractGridTest : public QObject +{ + Q_OBJECT + + private slots: + void testCreateGrid(); +}; + +void AbstractGridTest::testCreateGrid() +{ + srand(1370714025); + for (int i = 0; i < 25; ++i) { + qDebug() << "Iteration" << i; + AbstractGridTester t; + t.initializeGrid(5, 5, NotWrapped); + AbstractGridTester t2; + t2.initializeGrid(5, 5, Wrapped); + AbstractGridTester t3; + t3.initializeGrid(7, 7, NotWrapped); + AbstractGridTester t4; + t4.initializeGrid(7, 7, Wrapped); + AbstractGridTester t5; + t5.initializeGrid(9, 9, NotWrapped); + AbstractGridTester t6; + t6.initializeGrid(9, 9, Wrapped); + } +} + +QTEST_GUILESS_MAIN( AbstractGridTest ) + +#include "abstractgridtest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/doc/CMakeLists.txt new/knetwalk-15.04.0/doc/CMakeLists.txt --- old/knetwalk-14.12.3/doc/CMakeLists.txt 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/doc/CMakeLists.txt 2015-03-29 18:40:03.000000000 +0200 @@ -1,4 +1,4 @@ ########### install files ############### # # -kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR knetwalk) +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR knetwalk) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/doc/index.docbook new/knetwalk-15.04.0/doc/index.docbook --- old/knetwalk-14.12.3/doc/index.docbook 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/doc/index.docbook 2015-03-29 18:40:03.000000000 +0200 @@ -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 "&knetwalk;"> <!ENTITY package "kdegames"> <!ENTITY % English "INCLUDE"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/CMakeLists.txt new/knetwalk-15.04.0/src/CMakeLists.txt --- old/knetwalk-14.12.3/src/CMakeLists.txt 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/CMakeLists.txt 2015-03-29 18:40:03.000000000 +0200 @@ -1,7 +1,6 @@ add_subdirectory( pics ) add_subdirectory( sounds ) -include_directories( ${CMAKE_SOURCE_DIR}/libkdegames/highscore ) ########### next target ############### @@ -11,23 +10,23 @@ mainwindow.cpp abstractgrid.cpp) -kde4_add_ui_files( knetwalk_SRCS general.ui customgame.ui ) +ki18n_wrap_ui( knetwalk_SRCS general.ui customgame.ui ) -kde4_add_kcfg_files(knetwalk_SRCS settings.kcfgc ) +kconfig_add_kcfg_files(knetwalk_SRCS settings.kcfgc ) -kde4_add_app_icon(knetwalk_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hi*-app-knetwalk.png") -kde4_add_executable(knetwalk ${knetwalk_SRCS}) +#kde4_add_app_icon(knetwalk_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hi*-app-knetwalk.png") +add_executable(knetwalk ${knetwalk_SRCS}) -target_link_libraries(knetwalk ${KDE4_KDEUI_LIBS} ${QT_QTDECLARATIVE_LIBRARY} ${KDECLARATIVE_LIBRARIES} kdegames) +target_link_libraries(knetwalk KF5::XmlGui KF5::TextWidgets KF5KDEGames KF5::DBusAddons) install(TARGETS knetwalk ${INSTALL_TARGETS_DEFAULT_ARGS} ) ########### install files ############### -install( FILES knetwalkui.rc DESTINATION ${DATA_INSTALL_DIR}/knetwalk ) +install( FILES knetwalkui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/knetwalk ) install( DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/knetwalk) -install( PROGRAMS knetwalk.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( PROGRAMS org.kde.knetwalk.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/abstractgrid.cpp new/knetwalk-15.04.0/src/abstractgrid.cpp --- old/knetwalk-14.12.3/src/abstractgrid.cpp 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/abstractgrid.cpp 2015-03-29 18:40:03.000000000 +0200 @@ -21,7 +21,7 @@ #include <cstdlib> // rand() #include <QMap> #include <QString> -#include <KDebug> +#include <QDebug> AbstractCell::AbstractCell(int index) : m_index(index) @@ -218,8 +218,8 @@ } ++index; } - kDebug() << str1 << " " << str2; - kDebug() << QLatin1String( " " ); + qDebug() << str1 << " " << str2; + qDebug() << QLatin1String( " " ); str1 = str2 = QLatin1String( "" ); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/customgame.ui new/knetwalk-15.04.0/src/customgame.ui --- old/knetwalk-14.12.3/src/customgame.ui 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/customgame.ui 2015-03-29 18:40:03.000000000 +0200 @@ -48,7 +48,7 @@ </spacer> </item> <item row="0" column="1"> - <widget class="KIntSpinBox" name="kcfg_Width"/> + <widget class="KPluralHandlingSpinBox" name="kcfg_Width"/> </item> <item row="2" column="0" colspan="2"> <widget class="QCheckBox" name="kcfg_Wrapping"> @@ -71,15 +71,15 @@ </widget> </item> <item row="1" column="1"> - <widget class="KIntSpinBox" name="kcfg_Height"/> + <widget class="KPluralHandlingSpinBox" name="kcfg_Height"/> </item> </layout> </widget> <customwidgets> <customwidget> - <class>KIntSpinBox</class> + <class>KPluralHandlingSpinBox</class> <extends>QSpinBox</extends> - <header>knuminput.h</header> + <header>kpluralhandlingspinbox.h</header> </customwidget> </customwidgets> <resources/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/gameview.cpp new/knetwalk-15.04.0/src/gameview.cpp --- old/knetwalk-14.12.3/src/gameview.cpp 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/gameview.cpp 2015-03-29 18:40:03.000000000 +0200 @@ -18,11 +18,11 @@ #include "gameview.h" #include <KgSound> -#include <KStandardDirs> #include <QGraphicsObject> #include <KMessageBox> #include <KgThemeProvider> -#include <KLocale> +#include <QQuickItem> +#include <KLocalizedString> #include "globals.h" #include "settings.h" @@ -33,11 +33,12 @@ m_provider(new KgThemeProvider) { m_provider->discoverThemes("appdata", QLatin1String("themes")); - m_provider->setDeclarativeEngine("themeProvider", engine()); - m_soundTurn = new KgSound(KStandardDirs::locate("appdata", "sounds/turn.wav"), this); - m_soundClick = new KgSound(KStandardDirs::locate("appdata", "sounds/click.wav"), this); - m_soundConnect = new KgSound(KStandardDirs::locate("appdata", "sounds/connect.wav"), this); - QString path = KStandardDirs::locate("appdata", "qml/main.qml"); + m_provider->setDeclarativeEngine(QLatin1Literal("themeProvider"), engine()); + m_soundTurn = new KgSound(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("sounds/turn.wav")), this); + m_soundClick = new KgSound(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("sounds/click.wav")), this); + m_soundConnect = new KgSound(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("sounds/connect.wav")), this); + QString path = QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("qml/main.qml")); + setSource(QUrl::fromLocalFile(path)); setRotateDuration(); @@ -67,15 +68,15 @@ for(int i = 0; i < grid->cellCount(); i++) { QString code = getCableCode(grid->cellAt(i)->cables()); - QString type = "none"; + QString type = QLatin1Literal("none"); if(grid->cellAt(i)->isConnected()){ - code = QString("con") + code; + code = QLatin1String("con") + code; } if(grid->cellAt(i)->isServer()){ - type = "server"; + type = QLatin1Literal("server"); } else if(grid->cellAt(i)->isTerminal()) { - type = (grid->cellAt(i)->isConnected())? "computer2": "computer1"; + type = (grid->cellAt(i)->isConnected())? QLatin1Literal("computer2"): QLatin1Literal("computer1"); } newCell(code, type); } @@ -135,14 +136,14 @@ void GameView::updateSprite(int index) { - QString type = "none"; + QString type = QLatin1Literal("none"); if(grid->cellAt(index)->isTerminal()){ - type = (grid->cellAt(index)->isConnected())? "computer2": "computer1"; + type = (grid->cellAt(index)->isConnected())? QLatin1Literal("computer2"): QLatin1Literal("computer1"); } QString code = getCableCode(grid->cellAt(index)->cables()); if(grid->cellAt(index)->isConnected()) { - code.insert(0, "con"); + code.insert(0, QLatin1Literal("con")); } if (!rotatingCells.contains(index)) { @@ -155,7 +156,7 @@ if (!grid->allTerminalsConnected()) { return; } - for(int i = 0; i < grid->cellCount(); i++) { + for(int i = 0; i < grid->cellCount(); ++i) { if (grid->cellAt(i)->cables() != None && !grid->cellAt(i)->isConnected()) { KMessageBox::information(this, i18n("Note: to win the game all terminals " @@ -166,7 +167,7 @@ return; } } - emit gameOver("won"); + emit gameOver(QLatin1Literal("won")); } void GameView::solve() @@ -176,15 +177,15 @@ } for(int i = 0; i < grid->cellCount(); i++) { grid->cellAt(i)->reset(); - QString code = "con" + getCableCode(grid->cellAt(i)->cables()); + QString code = QLatin1String("con") + getCableCode(grid->cellAt(i)->cables()); if (grid->cellAt(i)->isTerminal()){ - setSprite(i, code, "computer2"); + setSprite(i, code, QLatin1Literal("computer2")); } else { - setSprite(i, code, "none"); + setSprite(i, code, QLatin1Literal("none")); } } - emit gameOver("solved"); + emit gameOver(QLatin1Literal("solved")); } void GameView::setRotateDuration() @@ -195,19 +196,19 @@ QString GameView::getCableCode(int cables) { QHash<int, QString> directionNames; - directionNames[Left] = "0001"; - directionNames[Down] = "0010"; - directionNames[Down|Left] = "0011"; - directionNames[Right] = "0100"; - directionNames[Right|Left] = "0101"; - directionNames[Right|Down] = "0110"; - directionNames[Right|Down|Left] = "0111"; - directionNames[Up] = "1000"; - directionNames[Up|Left] = "1001"; - directionNames[Up|Down] = "1010"; - directionNames[Up|Down|Left] = "1011"; - directionNames[Up|Right] = "1100"; - directionNames[Up|Right|Left] = "1101"; - directionNames[Up|Right|Down] = "1110"; + directionNames[Left] = QLatin1Literal("0001"); + directionNames[Down] = QLatin1Literal("0010"); + directionNames[Down|Left] = QLatin1Literal("0011"); + directionNames[Right] = QLatin1Literal("0100"); + directionNames[Right|Left] = QLatin1Literal("0101"); + directionNames[Right|Down] = QLatin1Literal("0110"); + directionNames[Right|Down|Left] = QLatin1Literal("0111"); + directionNames[Up] = QLatin1Literal("1000"); + directionNames[Up|Left] = QLatin1Literal("1001"); + directionNames[Up|Down] = QLatin1Literal("1010"); + directionNames[Up|Down|Left] = QLatin1Literal("1011"); + directionNames[Up|Right] = QLatin1Literal("1100"); + directionNames[Up|Right|Left] = QLatin1Literal("1101"); + directionNames[Up|Right|Down] = QLatin1Literal("1110"); return directionNames[cables]; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/gameview.h new/knetwalk-15.04.0/src/gameview.h --- old/knetwalk-14.12.3/src/gameview.h 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/gameview.h 2015-03-29 18:40:03.000000000 +0200 @@ -20,6 +20,8 @@ #include <KgDeclarativeView> #include <QVariant> +#include <KgThemeProvider> +#include <QQuickItem> #include "abstractgrid.h" @@ -35,6 +37,11 @@ int minimumMoves() {return grid->minimumMoves();} int cellCount() {return grid->cellCount();} KgThemeProvider* getProvider() {return m_provider;} + + + +public slots: + void setRotateDuration(); signals: void newCell(QVariant cable, QVariant type); @@ -48,7 +55,6 @@ void solve(); void clicked(int index); void rotated(int index, int angle); - void setRotateDuration(); private: QString getCableCode(int cables); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/general.ui new/knetwalk-15.04.0/src/general.ui --- old/knetwalk-14.12.3/src/general.ui 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/general.ui 2015-03-29 18:40:03.000000000 +0200 @@ -68,13 +68,10 @@ </widget> </item> <item row="2" column="2"> - <widget class="KIntSpinBox" name="kcfg_RotateDuration"> + <widget class="KPluralHandlingSpinBox" name="kcfg_RotateDuration"> <property name="specialValueText"> <string/> </property> - <property name="suffix"> - <string> ms</string> - </property> <property name="singleStep"> <number>100</number> </property> @@ -84,9 +81,9 @@ </widget> <customwidgets> <customwidget> - <class>KIntSpinBox</class> + <class>KPluralHandlingSpinBox</class> <extends>QSpinBox</extends> - <header>knuminput.h</header> + <header>kpluralhandlingspinbox.h</header> </customwidget> </customwidgets> <resources/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/knetwalk.desktop new/knetwalk-15.04.0/src/knetwalk.desktop --- old/knetwalk-14.12.3/src/knetwalk.desktop 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/knetwalk.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,114 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=knetwalk -caption %c -X-DocPath=knetwalk/index.html -Name=KNetWalk -Name[ast]=KNetWalk -Name[bs]=KNetWalk -Name[ca]=KNetWalk -Name[ca@valencia]=KNetWalk -Name[cs]=KNetWalk -Name[da]=KNetWalk -Name[de]=KNetWalk -Name[el]=KNetWalk -Name[en_GB]=KNetWalk -Name[es]=KNetWalk -Name[et]=KNetWalk -Name[eu]=KNetWalk -Name[fa]=گشت شبکه -Name[fi]=KNetWalk -Name[fr]=KNetWalk -Name[ga]=KNetWalk -Name[gl]=KNetWalk -Name[hne]=के-नेट-वाक -Name[hu]=KNetWalk -Name[is]=KNetWalk -Name[it]=KNetWalk -Name[ja]=KNetWalk -Name[kk]=KNetWalk -Name[km]=KNetWalk -Name[ko]=KNetWalk -Name[lt]=KNetWalk -Name[lv]=KNetWalk -Name[mr]=के-नेट-वॉक -Name[nb]=KNetWalk -Name[nds]=KNetWalk -Name[nl]=KNetWalk -Name[nn]=KNettvandrar -Name[pl]=KNetWalk -Name[pt]=KNetWalk -Name[pt_BR]=KNetWalk -Name[ro]=KNetWalk -Name[ru]=KNetWalk -Name[sk]=KNetWalk -Name[sl]=KNetWalk -Name[sq]=KNetWalk -Name[sr]=К‑мрежоход -Name[sr@ijekavian]=К‑мрежоход -Name[sr@ijekavianlatin]=K‑mrežohod -Name[sr@latin]=K‑mrežohod -Name[sv]=Knetwalk -Name[te]=కెనెట్ వాక్ -Name[tr]=KNetWalk -Name[ug]=KNetWalk -Name[uk]=KNetWalk -Name[wa]=KNetWalk -Name[x-test]=xxKNetWalkxx -Name[zh_CN]=kNetwalk -Name[zh_TW]=KNetWalk -GenericName=Network Construction Game -GenericName[ast]=Xuegu de construcción en rede -GenericName[bs]=Igra gradnje mreže -GenericName[ca]=Joc de construcció de xarxes -GenericName[ca@valencia]=Joc de construcció de xarxes -GenericName[cs]=Hra s vytvářením sítě -GenericName[da]=Spil om netværksopbygning -GenericName[de]=Netzwerke aufbauen -GenericName[el]=Παιχνίδι δημιουργίας δικτύου -GenericName[en_GB]=Network Construction Game -GenericName[es]=Juego de construcción de redes -GenericName[et]=Võrgu loomise mäng -GenericName[eu]=Sarea eraikitzeko jokoa -GenericName[fa]=بازی ساخت شبکه -GenericName[fi]=Verkonrakennuspeli -GenericName[fr]=Jeu de construction de réseau -GenericName[ga]=Cluiche Tógála Líonra -GenericName[gl]=Xogo de construción de redes -GenericName[hne]=नेटवर्क कंस्ट्रक्सन वाले खेल -GenericName[hu]=Hálózatépítő játék -GenericName[it]=Gioco di costruzione di reti -GenericName[ja]=ネットワーク構築ゲーム -GenericName[kk]=Желі торын құру ойыны -GenericName[km]=ល្បែងតភ្ជាប់បណ្ដាញ -GenericName[ko]=네트워크 건설 게임 -GenericName[lt]=Tinklo konstravimo žaidimas -GenericName[lv]=Tīkla būvēšanas spēle -GenericName[mr]=संजाळ बांधण्याचा खेळ -GenericName[nb]=Bygg opp nettverk -GenericName[nds]=Nettwark-Buuspeel -GenericName[nl]=Netwerkconstructiespel -GenericName[nn]=Bygg opp nettverk -GenericName[pl]=Gra w konstrukcję sieci -GenericName[pt]=Jogo de Construção de Redes -GenericName[pt_BR]=Jogo de construção de uma rede de computadores -GenericName[ro]=Joc de construire a rețelei -GenericName[ru]=Игра в создание сетей -GenericName[sk]=Hra s budovaním siete -GenericName[sl]=Igra gradnje omrežja -GenericName[sq]=Lojë Për Ndërtimin e Rrjetit -GenericName[sr]=Игра конструисања мреже -GenericName[sr@ijekavian]=Игра конструисања мреже -GenericName[sr@ijekavianlatin]=Igra konstruisanja mreže -GenericName[sr@latin]=Igra konstruisanja mreže -GenericName[sv]=Nätverkskonstruktion -GenericName[tr]=Ağ Yapılandırma Oyunu -GenericName[ug]=تور قۇرۇلۇشى ئويۇنى -GenericName[uk]=Гра з побудови мереж -GenericName[wa]=Djeu d' costrujhaedje del rantoele -GenericName[x-test]=xxNetwork Construction Gamexx -GenericName[zh_CN]=网络建设游戏 -GenericName[zh_TW]=網路建構遊戲 -Terminal=false -Icon=knetwalk -X-KDE-StartupNotify=true -Categories=Qt;KDE;Game;StrategyGame; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/main.cpp new/knetwalk-15.04.0/src/main.cpp --- old/knetwalk-14.12.3/src/main.cpp 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/main.cpp 2015-03-29 18:40:03.000000000 +0200 @@ -16,58 +16,71 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <KApplication> #include <KAboutData> -#include <KCmdLineArgs> -#include <KLocale> -#include <KDebug> -#include <KGlobal> +#include <QApplication> +#include <KLocalizedString> +#include <kdelibs4configmigrator.h> #include "mainwindow.h" - +#include <KDBusService> static const char description[] = I18N_NOOP("KNetWalk, a game for system administrators."); -static const char version[] = "3.2.0"; +static const char copyleft[] = +I18N_NOOP("(C) 2004-2005 Andi Peredri, ported to KDE by Thomas Nagy\n" + "(C) 2007-2008 Fela Winkelmolen\n" + "(C) 2013 Ashwin Rajeev"); + +static const char version[] = "3.3.0"; int main(int argc, char ** argv) { - KAboutData about("knetwalk", 0, ki18n("KNetWalk"), version, - ki18n(description), KAboutData::License_GPL, - ki18n("(C) 2004-2005 Andi Peredri, ported to KDE by Thomas Nagy\n" - "(C) 2007-2008 Fela Winkelmolen\n" - "(C) 2013 Ashwin Rajeev"), KLocalizedString(), "http://games.kde.org/knetwalk" ); + Kdelibs4ConfigMigrator migrate(QStringLiteral("knetwalk")); + migrate.setConfigFiles(QStringList() << QStringLiteral("knetwalkrc")); + migrate.setUiFiles(QStringList() << QStringLiteral("knetwalkui.rc")); + migrate.migrate(); + QApplication app(argc, argv); + + KAboutData about(QStringLiteral("knetwalk"), i18n("KNetWalk"), + QLatin1Literal(version), i18n(description), + KAboutLicense::GPL, i18n(copyleft), QString(), + QStringLiteral("http://games.kde.org/knetwalk")); + about.addAuthor(i18n("Andi Peredri"), + i18n("original author"), + QLatin1Literal("a...@ukr.net")); - about.addAuthor(ki18n("Andi Peredri"), - ki18n("original author"), - "a...@ukr.net"); - - about.addAuthor(ki18n("Thomas Nagy"), - ki18n("KDE port"), - "tnagy2^8...@yahoo.fr"); - - about.addAuthor(ki18n("Ashwin Rajeev"), - ki18n("Port to QtQuick"), - "ashwin_raj...@hotmail.com"); + about.addAuthor(i18n("Thomas Nagy"), + i18n("KDE port"), + QLatin1Literal("tnagy2^8...@yahoo.fr")); + + about.addAuthor(i18n("Ashwin Rajeev"), + i18n("Port to QtQuick"), + QLatin1Literal("ashwin_raj...@hotmail.com")); - about.addCredit(ki18n("Eugene Trounev"), - ki18n("icon design"), - "eugene.trou...@gmail.com"); - - about.addCredit(ki18n("Brian Croom"), - ki18n("Port to use the QGraphicsView framework"), - "brian.s.cr...@gmail.com"); + about.addCredit(i18n("Eugene Trounev"), + i18n("icon design"), + QLatin1Literal("eugene.trou...@gmail.com")); + + about.addCredit(i18n("Brian Croom"), + i18n("Port to use the QGraphicsView framework"), + QLatin1Literal("brian.s.cr...@gmail.com")); - - KCmdLineArgs::init(argc, argv, &about); - - KApplication application; - KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" )); + about.setOrganizationDomain(QByteArray("kde.org")); + + about.setProductName(QByteArray("knetwalk")); + + KAboutData::setApplicationData(about); + KDBusService service; + + app.setApplicationDisplayName(about.displayName()); + app.setOrganizationDomain(about.organizationDomain()); + app.setApplicationVersion(about.version()); + app.setWindowIcon(QIcon::fromTheme(QLatin1Literal("knetwalk"))); MainWindow* window = new MainWindow; window->show(); - return application.exec(); + return app.exec(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/mainwindow.cpp new/knetwalk-15.04.0/src/mainwindow.cpp --- old/knetwalk-14.12.3/src/mainwindow.cpp 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/mainwindow.cpp 2015-03-29 18:40:03.000000000 +0200 @@ -21,15 +21,14 @@ #include "mainwindow.h" #include <KConfigDialog> -#include <KLocale> +#include <KLocalizedString> #include <KStandardAction> -#include <KAction> +#include <QAction> #include <KToggleAction> #include <KActionCollection> #include <KStandardGameAction> -#include <KStandardDirs> #include <KMessageBox> -#include <KStatusBar> +#include <QStatusBar> #include <KgDifficulty> #include <KgThemeSelector> @@ -77,12 +76,13 @@ : KXmlGuiWindow(parent), m_clickCount(0), m_view(new GameView(this)) { - connect(m_view, SIGNAL(gameOver(QVariant)), this, SLOT(gameOver(QVariant))); - connect(m_view, SIGNAL(rotationStarted()), this, SLOT(rotationStarted())); + connect(m_view, &GameView::gameOver, this, &MainWindow::gameOver); + connect(m_view, &GameView::rotationStarted, this, &MainWindow::rotationStarted); connect(this, SIGNAL(pause(QVariant)), m_view->rootObject(), SLOT(pause(QVariant))); - statusBar()->insertItem(QLatin1String( "" ), StatusBarIndexMoves, 1); - statusBar()->insertItem(QLatin1String( "" ), StatusBarIndexTime, 1); + label->setText(QString()); + statusBar()->insertPermanentWidget(0, label, 1); + statusBar()->insertPermanentWidget(1, label, 1); // Difficulty Kg::difficulty()->addStandardLevelRange( @@ -106,10 +106,11 @@ srand(time(0)); m_gameClock = new KGameClock(this, KGameClock::MinSecOnly); - connect(m_gameClock, SIGNAL(timeChanged(QString)), SLOT(updateStatusBar())); + connect(m_gameClock, &KGameClock::timeChanged, this, &MainWindow::updateStatusBar); + + m_soundStart = new KgSound(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("sounds/start.wav")), this); + m_soundWin = new KgSound(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1Literal("sounds/win.wav")), this); - m_soundStart = new KgSound(KStandardDirs::locate("appdata", "sounds/start.wav"), this); - m_soundWin = new KgSound(KStandardDirs::locate("appdata", "sounds/win.wav"), this); startNewGame(); } @@ -125,7 +126,7 @@ connect(Kg::difficulty(), SIGNAL(gameRunningChanged(bool)), m_pauseAction, SLOT(setEnabled(bool))); - KAction *action = KStandardGameAction::solve(m_view, SLOT(solve()), actionCollection()); + QAction *action = KStandardGameAction::solve(m_view, SLOT(solve()), actionCollection()); connect(Kg::difficulty(), SIGNAL(gameRunningChanged(bool)), action, SLOT(setEnabled(bool))); KStandardGameAction::highscores(this, SLOT(showHighscores()), @@ -136,43 +137,43 @@ // Settings KStandardAction::preferences(this, SLOT(configureSettings()), actionCollection()); - action = new KAction(i18n("&Unlock All"), this); + action = new QAction(i18n("&Unlock All"), this); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(unlockAll())); connect(Kg::difficulty(), SIGNAL(gameRunningChanged(bool)), action, SLOT(setEnabled(bool))); actionCollection()->addAction( QLatin1String( "unlock_all" ), action); - action = new KAction(i18n("Keyboard: Field right"), this); - action->setShortcut(Qt::Key_Right); + action = new QAction(i18n("Keyboard: Field right"), this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Right); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(kbGoRight())); actionCollection()->addAction( QLatin1String( "kb_go_right" ), action); - action = new KAction(i18n("Keyboard: Field left"),this); - action->setShortcut(Qt::Key_Left); + action = new QAction(i18n("Keyboard: Field left"),this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Left); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(kbGoLeft())); actionCollection()->addAction( QLatin1String( "kb_go_left" ), action); - action = new KAction(i18n("Keyboard: Field up"),this); - action->setShortcut(Qt::Key_Up); + action = new QAction(i18n("Keyboard: Field up"),this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Up); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(kbGoUp())); actionCollection()->addAction( QLatin1String( "kb_go_up" ), action); - action = new KAction(i18n("Keyboard: Field down"),this); - action->setShortcut(Qt::Key_Down); + action = new QAction(i18n("Keyboard: Field down"),this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Down); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(kbGoDown())); actionCollection()->addAction( QLatin1String( "kb_go_down" ), action); - action = new KAction(i18n("Keyboard: Turn clockwise"),this); - action->setShortcut(Qt::Key_Return); + action = new QAction(i18n("Keyboard: Turn clockwise"),this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Return); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(rotateClockwise())); actionCollection()->addAction( QLatin1String( "kb_turn_clockwise" ), action); - action = new KAction(i18n("Keyboard: Turn counterclockwise"),this); - action->setShortcut(Qt::CTRL + Qt::Key_Return); + action = new QAction(i18n("Keyboard: Turn counterclockwise"),this); + actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::Key_Return); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(rotateCounterclockwise())); actionCollection()->addAction( QLatin1String( "kb_turn_counterclockwise" ), action); - action = new KAction(i18n("Keyboard: Toggle lock"),this); - action->setShortcut(Qt::Key_Space); + action = new QAction(i18n("Keyboard: Toggle lock"),this); + actionCollection()->setDefaultShortcut(action, Qt::Key_Space); connect(action, SIGNAL(triggered()), m_view->rootObject(), SLOT(toggleLock())); actionCollection()->addAction( QLatin1String( "kb_lock" ), action); } @@ -185,8 +186,8 @@ dialog->addPage(new GeneralConfig(dialog), i18n("General"), QLatin1String("games-config-options")); dialog->addPage(new KgThemeSelector(m_view->getProvider()), i18n("Theme"), QLatin1String("games-config-theme")); dialog->addPage(new CustomGameConfig(dialog), i18n("Custom Game"), QLatin1String("games-config-custom")); - connect(dialog, SIGNAL(settingsChanged(QString)), m_view, SLOT(setRotateDuration())); - dialog->setHelp(QString(),QLatin1String("knetwalk")); + connect(dialog, &KConfigDialog::settingsChanged, m_view, &GameView::setRotateDuration); +// dialog->setHelp(QString(),QLatin1String("knetwalk")); dialog->show(); } @@ -227,7 +228,7 @@ m_gameClock->pause(); Kg::difficulty()->setGameRunning(false); - if (msg.toString() != "won") + if (msg.toString() != QLatin1String("won")) return; if(Settings::playSounds()) @@ -281,8 +282,8 @@ { QString moves = i18nc("Number of mouse clicks", "Moves: %1", m_clickCount); QString time = i18nc("Time elapsed", "Time: %1", m_gameClock->timeString()); - statusBar()->changeItem(moves, StatusBarIndexMoves); - statusBar()->changeItem(time, StatusBarIndexTime); + label->setText(moves); + label->setText(time); } QSize MainWindow::boardSize() @@ -296,4 +297,3 @@ } } -#include "mainwindow.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/mainwindow.h new/knetwalk-15.04.0/src/mainwindow.h --- old/knetwalk-14.12.3/src/mainwindow.h 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/mainwindow.h 2015-03-29 18:40:03.000000000 +0200 @@ -25,12 +25,13 @@ #include <KXmlGuiWindow> #include <QList> +#include <QPointer> +#include <QLabel> class KgSound; class KGameClock; class KgThemeProvider; class KToggleAction; -class KAction; class GameView; class MainWindow : public KXmlGuiWindow @@ -66,6 +67,7 @@ GameView *m_view; KgSound *m_soundStart; KgSound *m_soundWin; + QPointer<QLabel> label = new QLabel; }; #endif // MAINWINDOW_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/org.kde.knetwalk.desktop new/knetwalk-15.04.0/src/org.kde.knetwalk.desktop --- old/knetwalk-14.12.3/src/org.kde.knetwalk.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/knetwalk-15.04.0/src/org.kde.knetwalk.desktop 2015-03-29 18:40:03.000000000 +0200 @@ -0,0 +1,115 @@ +[Desktop Entry] +Type=Application +Exec=knetwalk -qwindowtitle %c +X-DocPath=knetwalk/index.html +Name=KNetWalk +Name[ast]=KNetWalk +Name[bs]=KNetWalk +Name[ca]=KNetWalk +Name[ca@valencia]=KNetWalk +Name[cs]=KNetWalk +Name[da]=KNetWalk +Name[de]=KNetWalk +Name[el]=KNetWalk +Name[en_GB]=KNetWalk +Name[es]=KNetWalk +Name[et]=KNetWalk +Name[eu]=KNetWalk +Name[fa]=گشت شبکه +Name[fi]=KNetWalk +Name[fr]=KNetWalk +Name[ga]=KNetWalk +Name[gl]=KNetWalk +Name[hne]=के-नेट-वाक +Name[hu]=KNetWalk +Name[is]=KNetWalk +Name[it]=KNetWalk +Name[ja]=KNetWalk +Name[kk]=KNetWalk +Name[km]=KNetWalk +Name[ko]=KNetWalk +Name[lt]=KNetWalk +Name[lv]=KNetWalk +Name[mr]=के-नेट-वॉक +Name[nb]=KNetWalk +Name[nds]=KNetWalk +Name[nl]=KNetWalk +Name[nn]=KNettvandrar +Name[pl]=KNetWalk +Name[pt]=KNetWalk +Name[pt_BR]=KNetWalk +Name[ro]=KNetWalk +Name[ru]=KNetWalk +Name[sk]=KNetWalk +Name[sl]=KNetWalk +Name[sq]=KNetWalk +Name[sr]=К‑мрежоход +Name[sr@ijekavian]=К‑мрежоход +Name[sr@ijekavianlatin]=K‑mrežohod +Name[sr@latin]=K‑mrežohod +Name[sv]=Knetwalk +Name[te]=కెనెట్ వాక్ +Name[tr]=KNetWalk +Name[ug]=KNetWalk +Name[uk]=KNetWalk +Name[wa]=KNetWalk +Name[x-test]=xxKNetWalkxx +Name[zh_CN]=kNetwalk +Name[zh_TW]=KNetWalk +GenericName=Network Construction Game +GenericName[ast]=Xuegu de construcción en rede +GenericName[bs]=Igra gradnje mreže +GenericName[ca]=Joc de construcció de xarxes +GenericName[ca@valencia]=Joc de construcció de xarxes +GenericName[cs]=Hra s vytvářením sítě +GenericName[da]=Spil om netværksopbygning +GenericName[de]=Netzwerke aufbauen +GenericName[el]=Παιχνίδι δημιουργίας δικτύου +GenericName[en_GB]=Network Construction Game +GenericName[es]=Juego de construcción de redes +GenericName[et]=Võrgu loomise mäng +GenericName[eu]=Sarea eraikitzeko jokoa +GenericName[fa]=بازی ساخت شبکه +GenericName[fi]=Verkonrakennuspeli +GenericName[fr]=Jeu de construction de réseau +GenericName[ga]=Cluiche Tógála Líonra +GenericName[gl]=Xogo de construción de redes +GenericName[hne]=नेटवर्क कंस्ट्रक्सन वाले खेल +GenericName[hu]=Hálózatépítő játék +GenericName[it]=Gioco di costruzione di reti +GenericName[ja]=ネットワーク構築ゲーム +GenericName[kk]=Желі торын құру ойыны +GenericName[km]=ល្បែងតភ្ជាប់បណ្ដាញ +GenericName[ko]=네트워크 건설 게임 +GenericName[lt]=Tinklo konstravimo žaidimas +GenericName[lv]=Tīkla būvēšanas spēle +GenericName[mr]=संजाळ बांधण्याचा खेळ +GenericName[nb]=Bygg opp nettverk +GenericName[nds]=Nettwark-Buuspeel +GenericName[nl]=Netwerkconstructiespel +GenericName[nn]=Bygg opp nettverk +GenericName[pl]=Gra w konstrukcję sieci +GenericName[pt]=Jogo de Construção de Redes +GenericName[pt_BR]=Jogo de construção de uma rede de computadores +GenericName[ro]=Joc de construire a rețelei +GenericName[ru]=Игра в создание сетей +GenericName[sk]=Hra s budovaním siete +GenericName[sl]=Igra gradnje omrežja +GenericName[sq]=Lojë Për Ndërtimin e Rrjetit +GenericName[sr]=Игра конструисања мреже +GenericName[sr@ijekavian]=Игра конструисања мреже +GenericName[sr@ijekavianlatin]=Igra konstruisanja mreže +GenericName[sr@latin]=Igra konstruisanja mreže +GenericName[sv]=Nätverkskonstruktion +GenericName[tr]=Ağ Yapılandırma Oyunu +GenericName[ug]=تور قۇرۇلۇشى ئويۇنى +GenericName[uk]=Гра з побудови мереж +GenericName[wa]=Djeu d' costrujhaedje del rantoele +GenericName[x-test]=xxNetwork Construction Gamexx +GenericName[zh_CN]=网络建设游戏 +GenericName[zh_TW]=網路建構遊戲 +Terminal=false +Icon=knetwalk +StartupNotify=true +Categories=Qt;KDE;Game;StrategyGame; +X-DBUS-ServiceName=org.kde.knetwalk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/pics/CMakeLists.txt new/knetwalk-15.04.0/src/pics/CMakeLists.txt --- old/knetwalk-14.12.3/src/pics/CMakeLists.txt 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/pics/CMakeLists.txt 2015-03-29 18:40:03.000000000 +0200 @@ -1,6 +1,6 @@ ########### install files ############### -kde4_install_icons( ${ICON_INSTALL_DIR} ) +ecm_install_icons( ${ICON_INSTALL_DIR} ) # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/qml/Cable.qml new/knetwalk-15.04.0/src/qml/Cable.qml --- old/knetwalk-14.12.3/src/qml/Cable.qml 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/qml/Cable.qml 2015-03-29 18:40:03.000000000 +0200 @@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -import QtQuick 1.1 +import QtQuick 2.3 CanvasItem { spriteKey: "cable" + parent.sprite diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/qml/CanvasItem.qml new/knetwalk-15.04.0/src/qml/CanvasItem.qml --- old/knetwalk-14.12.3/src/qml/CanvasItem.qml 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/qml/CanvasItem.qml 2015-03-29 18:40:03.000000000 +0200 @@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -import QtQuick 1.1 +import QtQuick 2.3 import org.kde.games.core 0.1 as KgCore KgCore.KgItem { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/qml/Cell.qml new/knetwalk-15.04.0/src/qml/Cell.qml --- old/knetwalk-14.12.3/src/qml/Cell.qml 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/qml/Cell.qml 2015-03-29 18:40:03.000000000 +0200 @@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -import QtQuick 1.1 +import QtQuick 2.3 Item{ property string sprite @@ -51,6 +51,6 @@ } } onEntered: main.selected = index - onMousePositionChanged: main.selected = index + onPositionChanged: main.selected = index } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/qml/logic.js new/knetwalk-15.04.0/src/qml/logic.js --- old/knetwalk-14.12.3/src/qml/logic.js 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/qml/logic.js 2015-03-29 18:40:03.000000000 +0200 @@ -22,7 +22,7 @@ var cells = [] function overlaySize() { - size = (width > height)? height - border : width - border; + var size = (width > height)? height - border : width - border; return (size > 0)? size : 0; } @@ -55,9 +55,9 @@ function createNode(type, cell) { if(type != "none") { var node = canvasComponent.createObject(cell); - node.spriteKey = function() { return cell.type }; + node.spriteKey = cell.type; node.anchors.fill = cell; - node.anchors.margins = function() { return cell.width / 10 }; + node.anchors.margins = cell.width / 10; } } @@ -95,4 +95,4 @@ for(var i = 0; i < cells.length; i++) { cells[i].locked = false; } -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/src/qml/main.qml new/knetwalk-15.04.0/src/qml/main.qml --- old/knetwalk-14.12.3/src/qml/main.qml 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/src/qml/main.qml 2015-03-29 18:40:03.000000000 +0200 @@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -import QtQuick 1.1 +import QtQuick 2.3 import "logic.js" as Logic Item { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/tests/CMakeLists.txt new/knetwalk-15.04.0/tests/CMakeLists.txt --- old/knetwalk-14.12.3/tests/CMakeLists.txt 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/tests/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) - -kde4_add_unit_test( abstractgridtest abstractgridtest.cpp ../src/abstractgrid.cpp ) -target_link_libraries( abstractgridtest ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knetwalk-14.12.3/tests/abstractgridtest.cpp new/knetwalk-15.04.0/tests/abstractgridtest.cpp --- old/knetwalk-14.12.3/tests/abstractgridtest.cpp 2014-12-30 09:54:20.000000000 +0100 +++ new/knetwalk-15.04.0/tests/abstractgridtest.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Albert Astals Cid <aa...@kde.org> * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include <qtest_kde.h> -#include <qdir.h> - -#include "../src/abstractgrid.h" -#include "../src/mainwindow.h" - -class AbstractGridTester : public AbstractGrid -{ - public: - void initializeGrid(uint width, uint height, Wrapping w=NotWrapped) - { - AbstractGrid::initializeGrid(width, height, w); - } -}; - -class AbstractGridTest : public QObject -{ - Q_OBJECT - - private slots: - void testCreateGrid(); -}; - -void AbstractGridTest::testCreateGrid() -{ - srand(1370714025); - for (int i = 0; i < 25; ++i) { - qDebug() << "Iteration" << i; - AbstractGridTester t; - t.initializeGrid(5, 5, NotWrapped); - AbstractGridTester t2; - t2.initializeGrid(5, 5, Wrapped); - AbstractGridTester t3; - t3.initializeGrid(7, 7, NotWrapped); - AbstractGridTester t4; - t4.initializeGrid(7, 7, Wrapped); - AbstractGridTester t5; - t5.initializeGrid(9, 9, NotWrapped); - AbstractGridTester t6; - t6.initializeGrid(9, 9, Wrapped); - } -} - -QTEST_KDEMAIN_CORE( AbstractGridTest ) - -#include "abstractgridtest.moc"