Hello community, here is the log from the commit of package kfourinline for openSUSE:Factory checked in at 2016-05-29 03:09:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kfourinline (Old) and /work/SRC/openSUSE:Factory/.kfourinline.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kfourinline" Changes: -------- --- /work/SRC/openSUSE:Factory/kfourinline/kfourinline.changes 2016-03-29 09:58:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kfourinline.new/kfourinline.changes 2016-05-29 03:09:13.000000000 +0200 @@ -1,0 +2,24 @@ +Sat May 7 10:26:24 UTC 2016 - [email protected] + +- Update to KDE Applications 16.04.1 + * KDE Applications 16.04.1 + * https://www.kde.org/announcements/announce-applications-16.04.1.php + + +------------------------------------------------------------------- +Sun Apr 17 06:03:31 UTC 2016 - [email protected] + +- Update to KDE Applications 16.04.0 + * KDE Applications 16.04.0 + * https://www.kde.org/announcements/announce-applications-16.04.0.php + + +------------------------------------------------------------------- +Mon Apr 11 06:39:48 UTC 2016 - [email protected] + +- Update to KDE Applications 16.03.90 + * KDE Applications 16.04.0 RC + * https://www.kde.org/announcements/announce-applications-16.04-rc.php + + +------------------------------------------------------------------- Old: ---- kfourinline-15.12.3.tar.xz New: ---- kfourinline-16.04.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kfourinline.spec ++++++ --- /var/tmp/diff_new_pack.o96YaY/_old 2016-05-29 03:09:14.000000000 +0200 +++ /var/tmp/diff_new_pack.o96YaY/_new 2016-05-29 03:09:14.000000000 +0200 @@ -45,7 +45,7 @@ License: LGPL-2.0+ Group: Amusements/Toys/Other Url: http://www.kde.org -Version: 15.12.3 +Version: 16.04.1 Release: 0 Source0: kfourinline-%{version}.tar.xz Obsoletes: %{name}5 < %{version} ++++++ kfourinline-15.12.3.tar.xz -> kfourinline-16.04.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/CMakeLists.txt new/kfourinline-16.04.1/CMakeLists.txt --- old/kfourinline-15.12.3/CMakeLists.txt 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/CMakeLists.txt 2016-03-20 12:01:05.000000000 +0100 @@ -2,26 +2,21 @@ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) set (QT_MIN_VERSION "5.3.0") +set (KF5_MIN_VERSION "5.15.0") find_package(ECM 1.7.0 REQUIRED CONFIG) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test) -find_package(KF5 REQUIRED COMPONENTS - CoreAddons - Config - ItemModels - DBusAddons - Declarative - I18n - ConfigWidgets - ItemViews - IconThemes - Completion +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg) +find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS + CoreAddons + Config + Crash + I18n + ConfigWidgets + Completion XmlGui DNSSD - KIO - NotifyConfig KDELibs4Support DocTools ) @@ -38,18 +33,24 @@ add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) -add_subdirectory( src ) -add_subdirectory( grafix ) -add_subdirectory( doc ) - +add_subdirectory(src) +add_subdirectory(grafix) +add_subdirectory(doc) ########### install files ############### -install( PROGRAMS org.kde.kfourinline.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) - -ecm_install_icons( ICONS 128-apps-kfourinline.png 16-apps-kfourinline.png 22-apps-kfourinline.png 32-apps-kfourinline.png 48-apps-kfourinline.png 64-apps-kfourinline.png DESTINATION ${KDE_INSTALL_ICONDIR} ) +install(PROGRAMS org.kde.kfourinline.desktop DESTINATION ${KDE_INSTALL_APPDIR}) +ecm_install_icons(ICONS + 128-apps-kfourinline.png + 16-apps-kfourinline.png + 22-apps-kfourinline.png + 32-apps-kfourinline.png + 48-apps-kfourinline.png + 64-apps-kfourinline.png + DESTINATION ${KDE_INSTALL_ICONDIR} +) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/CMakeLists.txt new/kfourinline-16.04.1/src/CMakeLists.txt --- old/kfourinline-15.12.3/src/CMakeLists.txt 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/CMakeLists.txt 2016-03-20 12:01:05.000000000 +0100 @@ -26,7 +26,8 @@ kgameconnectdialog.cpp kchatdialog.cpp pixmapsprite.cpp - kfontutils.cpp) + kfontutils.cpp +) configure_file(config-src.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-src.h) @@ -39,13 +40,14 @@ add_executable(kfourinline ${kwin4_SRCS}) -target_link_libraries(kfourinline - KF5::KIOCore +target_link_libraries(kfourinline + KF5::Crash KF5::DNSSD KF5::KDELibs4Support KF5KDEGames KF5KDEGamesPrivate - Qt5::Svg) + Qt5::Svg +) install(TARGETS kfourinline ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) @@ -55,7 +57,8 @@ set(kwin4proc_SRCS aiboard.cpp kgameprocess.cpp - kwin4proc.cpp ) + kwin4proc.cpp +) add_executable(kfourinlineproc ${kwin4proc_SRCS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/aiboard.cpp new/kfourinline-16.04.1/src/aiboard.cpp --- old/kfourinline-15.12.3/src/aiboard.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/aiboard.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -62,7 +62,7 @@ for (int y=0;y<=5;y++) { ushort tmp = 0; - // Loop coloums + // Loop columns for (int x=0; x<=6; x++) { tmp = tmp << 2; @@ -96,7 +96,7 @@ { ushort tmp = mBoard[y]; ushort ntmp = 0; - // Loop coloums + // Loop columns for (int x=0; x<=6; x++) { ntmp = ntmp << 2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/buttonsprite.cpp new/kfourinline-16.04.1/src/buttonsprite.cpp --- old/kfourinline-15.12.3/src/buttonsprite.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/buttonsprite.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -167,7 +167,7 @@ } -// Hover enter event recevied +// Hover enter event received void ButtonSprite::hoverEnterEvent(QMouseEvent* /*event*/) { mHover = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/config-src.h.cmake new/kfourinline-16.04.1/src/config-src.h.cmake --- old/kfourinline-15.12.3/src/config-src.h.cmake 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/config-src.h.cmake 2016-03-20 12:01:05.000000000 +0100 @@ -1 +1,2 @@ -#define SRC_DIR "@PROJECT_SOURCE_DIR@" \ No newline at end of file +#define SRC_DIR "@PROJECT_SOURCE_DIR@" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kfontutils.h new/kfourinline-16.04.1/src/kfontutils.h --- old/kfourinline-15.12.3/src/kfontutils.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kfontutils.h 2016-03-20 12:01:05.000000000 +0100 @@ -20,8 +20,8 @@ * * *********************************************************************************/ -#ifndef KFONTMETRICS_H -#define KFONTMETRICS_H +#ifndef KFONTUTILS_H +#define KFONTUTILS_H #include <QGraphicsTextItem> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kgamedebugdialog.cpp new/kfourinline-16.04.1/src/kgamedebugdialog.cpp --- old/kfourinline-15.12.3/src/kgamedebugdialog.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kgamedebugdialog.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -19,6 +19,7 @@ */ #include "kgamedebugdialog.h" +#include "kfourinline_debug.h" #define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API #include <libkdegamesprivate/kgame/kgamemessage.h> @@ -26,13 +27,11 @@ #include <libkdegamesprivate/kgame/kplayer.h> #include <libkdegamesprivate/kgame/kgamepropertyhandler.h> -#include <QListWidget> #include <KLocalizedString> -#include "kfourinline_debug.h" -#include <qpushbutton.h> #include <KStandardGuiItem> - +#include <QPushButton> +#include <QListWidget> #include <QTreeWidget> #include <QGridLayout> #include <QTime> @@ -40,7 +39,6 @@ #include <QVBoxLayout> #include <QFrame> #include <QHBoxLayout> -#include <QGridLayout> #include <typeinfo> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kgamedialogconfig.h new/kfourinline-16.04.1/src/kgamedialogconfig.h --- old/kfourinline-15.12.3/src/kgamedialogconfig.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kgamedialogconfig.h 2016-03-20 12:01:05.000000000 +0100 @@ -51,7 +51,7 @@ { Q_OBJECT public: - KGameDialogConfig(QWidget* parent = 0); + explicit KGameDialogConfig(QWidget* parent = 0); virtual ~KGameDialogConfig(); /** @@ -139,7 +139,7 @@ { Q_OBJECT public: - KGameDialogNetworkConfig(QWidget* parent = 0); + explicit KGameDialogNetworkConfig(QWidget* parent = 0); virtual ~KGameDialogNetworkConfig(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kgameprocess.cpp new/kfourinline-16.04.1/src/kgameprocess.cpp --- old/kfourinline-15.12.3/src/kgameprocess.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kgameprocess.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -20,11 +20,11 @@ #include "kgameprocess.h" -#include <krandomsequence.h> +#include <KRandomSequence> -#include <qbuffer.h> +#include <QBuffer> #include <QDataStream> -#include <QtCore/QFile> +#include <QFile> #include <assert.h> #include <stdio.h> @@ -75,10 +75,8 @@ } -bool KGameProcess::exec(int argc, char *argv[]) +bool KGameProcess::exec() { - // Get id and cookie, ... from command line - processArgs(argc,argv); do { mMessageIO->exec(); @@ -112,23 +110,6 @@ sendSystemMessage(stream,msgid+KGameMessage::IdUser,receiver); } -void KGameProcess::processArgs(int argc, char *argv[]) -{ - int v=0; - if (argc>2) - { - v=atoi(argv[2]); - //qCDebug(KFOURINLINE_LOG) << "cookie (unused) " << v; - } - if (argc>1) - { - v=atoi(argv[1]); - //qCDebug(KFOURINLINE_LOG) << "id (unused) " << v; - } - fprintf(stderr,"KGameProcess::processArgs \n"); - fflush(stderr); -} - void KGameProcess::receivedMessage(const QByteArray& receiveBuffer) { QDataStream stream(receiveBuffer); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kgameprocess.h new/kfourinline-16.04.1/src/kgameprocess.h --- old/kfourinline-15.12.3/src/kgameprocess.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kgameprocess.h 2016-03-20 12:01:05.000000000 +0100 @@ -21,12 +21,13 @@ #ifndef __KGAMEPROCESS_H_ #define __KGAMEPROCESS_H_ -#include <QtCore/QObject> -#include <QFile> #define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API #include <libkdegamesprivate/kgame/kgamemessage.h> #include <libkdegamesprivate/kgame/kmessageio.h> +#include <QObject> +#include <QFile> + class KRandomSequence; class KPlayer; @@ -112,7 +113,7 @@ * Enters the event loop of the computer process. Does only * return on setTerminate(true)! */ - bool exec(int argc, char *argv[]); + bool exec(); /** * Should the computer process leave its exec function? @@ -173,13 +174,6 @@ */ KRandomSequence *random(); - protected: - /** - * processes the command line argumens to set up the computer player - * Pass the argumens exactely as given by main() - */ - void processArgs(int argc, char *argv[]); - protected Q_SLOTS: /** * A message is received via the interprocess connection. The diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kgamepropertyarray.h new/kfourinline-16.04.1/src/kgamepropertyarray.h --- old/kfourinline-15.12.3/src/kgamepropertyarray.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kgamepropertyarray.h 2016-03-20 12:01:05.000000000 +0100 @@ -21,9 +21,6 @@ #ifndef __KGAMEPROPERTYARRAY_H_ #define __KGAMEPROPERTYARRAY_H_ -#include <QtCore/QDataStream> -//Added by qt3to4: -#include <QtCore/QVector> #include "kfourinline_debug.h" #define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API @@ -31,6 +28,9 @@ #include <libkdegamesprivate/kgame/kgameproperty.h> #include <libkdegamesprivate/kgame/kgamepropertyhandler.h> +#include <QDataStream> +#include <QVector> + /** * \class KGamePropertyArray kgamepropertyarray.h <KGamePropertyArray> */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4.cpp new/kfourinline-16.04.1/src/kwin4.cpp --- old/kfourinline-15.12.3/src/kwin4.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -75,18 +75,20 @@ // Construct the main application window KWin4App::KWin4App(QWidget *parent) - : KXmlGuiWindow(parent), mView(0), mDoc(0), mMyChatDlg(0), mStatusMsg(nullptr), mStatusMover(nullptr) + : KXmlGuiWindow(parent), + mTheme(nullptr), + mView(nullptr), + mDoc(nullptr), + mScene(nullptr), + mColorGroup(nullptr), + mMyChatDlg(nullptr), + mStatusMsg(nullptr), + mStatusMover(nullptr) { // default names for players (void)I18N_NOOP2("default name of first player", "Player 1"); (void)I18N_NOOP2("default name of second player", "Player 2"); - mDoc = 0; - mView = 0; - mScene = 0; - mTheme = 0; - mMyChatDlg = 0; - // Add resource type to grafix KGlobal::dirs()->addResourceType("kwin4theme", "appdata", "grafix/"); @@ -606,9 +608,9 @@ // Show statistics dialog void KWin4App::showStatistics() { - QDialog dlg(this); + QPointer<QDialog> dlg = new QDialog(this); Ui::Statistics ui; - ui.setupUi(&dlg); + ui.setupUi(dlg); ui.p1_name->setText(mDoc->getName(Yellow)); ui.p1_won->display(mDoc->getStatistic(Yellow, TWin)); @@ -624,10 +626,11 @@ ui.p2_aborted->display(mDoc->getStatistic(Red, TBrk)); ui.p2_sum->display(mDoc->getStatistic(Red, TSum)); - if(dlg.exec() == QDialog::Rejected) + if(dlg->exec() == QDialog::Rejected) { mDoc->resetStatistic(); } + delete dlg; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4.h new/kfourinline-16.04.1/src/kwin4.h --- old/kfourinline-15.12.3/src/kwin4.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4.h 2016-03-20 12:01:05.000000000 +0100 @@ -53,7 +53,7 @@ /** Construct the application. * @param parent The parent */ - KWin4App(QWidget *parent=0); + explicit KWin4App(QWidget *parent=0); /** Destruct the application. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4.kcfg new/kfourinline-16.04.1/src/kwin4.kcfg --- old/kfourinline-15.12.3/src/kwin4.kcfg 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4.kcfg 2016-03-20 12:01:05.000000000 +0100 @@ -2,9 +2,9 @@ <kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 - http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - <kcfgfile name="kwin4rc"/> + http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"> <include>KLocalizedString</include> + <kcfgfile name="kwin4rc"/> <group name="Parameter"> <entry name="port" type="Int"> <label>Network connection port</label> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4doc.cpp new/kfourinline-16.04.1/src/kwin4doc.cpp --- old/kfourinline-15.12.3/src/kwin4doc.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4doc.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -185,9 +185,9 @@ void KWin4Doc::resetGame(bool initview) { // Reset field - for (int x=0;x<FIELD_SIZE_X;x++) + for (int x=0;x<FIELD_SIZE_X;++x) { - for (int y=FIELD_SIZE_Y-1;y>=0;y--) + for (int y=FIELD_SIZE_Y-1;y>=0;--y) { setColour(x,y,Nobody); } @@ -489,19 +489,19 @@ // Check vertical up int flag=0; - for (i=0;i<4;i++) + for (i=0;i<4;++i) { y=mFieldFilled.at(x)-1-i; if (y>=0) { c=getColour(x,y); - if (c==col) flag++; + if (c==col) ++flag; } } if (flag>=4 ) { // Store win fields - for (i=0;i<4;i++) + for (i=0;i<4;++i) { y=mFieldFilled.at(x)-1-i; pView->displayStar(x,y,star++); @@ -515,13 +515,13 @@ // Check horizontal to the right y=mFieldFilled.at(x)-1; flag=0; - for (i=-3;i<=3 && flag<4;i++) + for (i=-3;i<=3 && flag<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) { c=getColour(xx,y); - if (c==col) flag++; + if (c==col) ++flag; else flag=0; } } @@ -531,25 +531,25 @@ y=mFieldFilled.at(x)-1; winc=getColour(x,y); int cnt=0; - for (i=0;i<4;i++) + for (i=0;i<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) { if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } - for (i=-1;i>-4 && cnt<4;i--) + for (i=-1;i>-4 && cnt<4;--i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) { if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } @@ -560,7 +560,7 @@ // Check dy+ flag=0; - for (i=-3;i<=3 && flag<4;i++) + for (i=-3;i<=3 && flag<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -569,7 +569,7 @@ if (y>=0 && y<FIELD_SIZE_Y) { c=getColour(xx,y); - if (c==col) flag++; + if (c==col) ++flag; else flag=0; } } @@ -580,7 +580,7 @@ y=mFieldFilled.at(x)-1; winc=getColour(x,y); int cnt=0; - for (i=0;i<4;i++) + for (i=0;i<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -589,11 +589,11 @@ if (y<0) break; if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } - for (i=-1;i>-4 && cnt<4;i--) + for (i=-1;i>-4 && cnt<4;--i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -602,7 +602,7 @@ if (y>=FIELD_SIZE_Y) break; if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } @@ -613,7 +613,7 @@ // Check dy- flag=0; - for (i=-3;i<=3 && flag<4;i++) + for (i=-3;i<=3 && flag<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -622,7 +622,7 @@ if (y>=0 && y<FIELD_SIZE_Y) { c=getColour(xx,y); - if (c==col) flag++; + if (c==col) ++flag; else flag=0; } } @@ -633,7 +633,7 @@ y=mFieldFilled.at(x)-1; winc=getColour(x,y); int cnt=0; - for (i=0;i<4;i++) + for (i=0;i<4;++i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -642,11 +642,11 @@ if (y>=FIELD_SIZE_Y) break; if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } - for (i=-1;i>-4 && cnt<4;i--) + for (i=-1;i>-4 && cnt<4;--i) { xx=x+i; if (xx>=0 && xx<FIELD_SIZE_X) @@ -655,7 +655,7 @@ if (y<0) break; if (getColour(xx,y)!=winc) break; pView->displayStar(xx,y,star++); - cnt++; + ++cnt; } else break; } @@ -728,9 +728,6 @@ setPlayedBy(Red, mode); qCDebug(KFOURINLINE_LOG) << "Played by Red="<<mode; - COLOUR col = Red; - if (Prefs::startcolouryellow()) col = Yellow; - if (Prefs::startcolourred()) mStartPlayer.setValue(Red); else if (Prefs::startcolouryellow()) mStartPlayer.setValue(Yellow); else qCCritical(KFOURINLINE_LOG) << "Unknown start color"; @@ -1059,9 +1056,9 @@ stream << learnPath; int i,j; - for (i=0;i<FIELD_SIZE_Y;i++) + for (i=0;i<FIELD_SIZE_Y;++i) { - for (j=0;j<FIELD_SIZE_X;j++) + for (j=0;j<FIELD_SIZE_X;++j) { qint8 col; col=getColour(j,i); @@ -1178,7 +1175,7 @@ // users id's KWin4Player* KWin4Doc::getPlayer(COLOUR col) { - for (KGamePlayerList::const_iterator it = playerList()->constBegin(); it!= playerList()->constEnd(); it++ ) + for (KGamePlayerList::const_iterator it = playerList()->constBegin(); it!= playerList()->constEnd(); ++it ) { if ((*it)->userId()==col) return (KWin4Player *)(*it); @@ -1349,14 +1346,14 @@ int cnt=0; while(undoMove()) { - cnt++; + ++cnt; if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "Undoing move "<<cnt; } if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "amzug ="<<mAmzug.value(); while(cnt>0) { redoMove(); - cnt--; + --cnt; if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "Redoing move "<<cnt; } if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "amzug ="<<mAmzug.value(); @@ -1393,7 +1390,7 @@ if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "ADMIN keeps yellow and kicks red=" << red->id()<<" userId/col="<<red->userId(); // loop all client players and deactivate the one which have the color // yellow - for ( KGamePlayerList::const_iterator it = newList->constBegin(); it != newList->constEnd(); it++ ) + for ( KGamePlayerList::const_iterator it = newList->constBegin(); it != newList->constEnd(); ++it ) { KPlayer *player = *it; if (player->userId()==yellow->userId()) @@ -1410,7 +1407,7 @@ if (global_debug>1) qCDebug(KFOURINLINE_LOG) << "ADMIN keeps red and kicks yellow=" << yellow->id()<<" userId/col="<<yellow->userId(); // loop all client players and deactivate the one which have the color // red - for ( KGamePlayerList::const_iterator it = newList->constBegin(); it != newList->constEnd(); it++ ) + for ( KGamePlayerList::const_iterator it = newList->constBegin(); it != newList->constEnd(); ++it ) { KPlayer *player = *it; if (player->userId()==red->userId()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4doc.h new/kfourinline-16.04.1/src/kwin4doc.h --- old/kfourinline-15.12.3/src/kwin4doc.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4doc.h 2016-03-20 12:01:05.000000000 +0100 @@ -53,7 +53,7 @@ /** Constructor. * @param parent The parent widget */ - KWin4Doc(QWidget *parent); + explicit KWin4Doc(QWidget *parent); /** The dstructor. */ @@ -316,8 +316,7 @@ protected slots: /** Initiate a repeate of the move. This happens if somehow the player - * input created an invalid move. The the same player has to input - * again. + * input created an invalid move. The same player has to input again. */ void repeatMove(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4proc.cpp new/kfourinline-16.04.1/src/kwin4proc.cpp --- old/kfourinline-15.12.3/src/kwin4proc.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4proc.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -74,9 +74,9 @@ unsigned int i; // Init variables - for (i=0;i<strlen(s1);i++) + for (i=0;i<strlen(s1);++i) mRowLengths[i]=s1[i]-'0'; - for (i=0;i<strlen(s2);i++) + for (i=0;i<strlen(s2);++i) mStartOfRows[i]=s2[i]-'0'; // Unknown yet how fast AI calculates @@ -93,7 +93,7 @@ } -// Recevied init command (unused) +// Received init command (unused) void KComputer::slotInit(QDataStream & /*in */,int /*id*/) { /* @@ -171,7 +171,7 @@ bool erase = false; if (noOfItems >MAX_LEARNED_POSITIONS) erase = true; - for (int cnt=0; cnt<noOfItems; cnt++) + for (int cnt=0; cnt<noOfItems; ++cnt) { AIBoard board; AIValue value; @@ -357,14 +357,14 @@ // Amount of pieces on the game board char numberMatrix[SIZE_Y_ALL+1]; - for (int y=0;y<=SIZE_Y_ALL;y++) + for (int y=0;y<=SIZE_Y_ALL;++y) { numberMatrix[y]=0; } - for (int y=0;y<=SIZE_Y;y++) + for (int y=0;y<=SIZE_Y;++y) { - for (int x=0;x<=SIZE_X;x++) + for (int x=0;x<=SIZE_X;++x) { fieldMatrix[y][x] = (FARBE)(y+FIELD_OFFSET); fieldMatrix[6+x][y] = (FARBE)(y+FIELD_OFFSET); @@ -375,9 +375,9 @@ // Field comes as 42 qint8's representing moves int i,j; - for (i=0;i<=SIZE_Y;i++) + for (i=0;i<=SIZE_Y;++i) { - for (j=0;j<=SIZE_X;j++) + for (j=0;j<=SIZE_X;++j) { qint8 col; in >> col; @@ -396,7 +396,7 @@ // Estimated number of positions to evaluate (MAX) int estimated = 0; - for (int i=1; i<= mLevel+1; i++) + for (int i=1; i<= mLevel+1; ++i) { estimated += int(pow(7.,i)); } @@ -470,7 +470,7 @@ result.move = -1; // No move found result.value = LOWERT; - for (int x=0; x<=SIZE_X; x++) + for (int x=0; x<=SIZE_X; ++x) { long wert; if (numbers[6+x]>=MAX_PIECES_COL) continue; @@ -587,16 +587,16 @@ long yellow_value = random(EVAL_RANDOM); long red_value = random(EVAL_RANDOM); - for (int y=0; y<=SIZE_Y_ALL; y++) + for (int y=0; y<=SIZE_Y_ALL; ++y) { if (mRowLengths[y]<WIN4) continue; - for (int i=0;i<=(mRowLengths[y]-WIN4);i++) + for (int i=0;i<=(mRowLengths[y]-WIN4);++i) { COLOUR color = Nobody; long value = 0; int cntcol = 0; int cnt = 0; - for (int j=0; j<WIN4; j++) + for (int j=0; j<WIN4; ++j) { FARBE checkField = field[y][i+j+mStartOfRows[y]]; if ((COLOUR)checkField==Red) @@ -632,17 +632,17 @@ // Check for game over COLOUR KComputer::isGameOver(FARBE field[][SIZE_X+1],char numbers[]) { - for (int y=0; y<=SIZE_Y_ALL; y++) + for (int y=0; y<=SIZE_Y_ALL; ++y) { if (numbers[y] < WIN4) continue; if (mRowLengths[y] < WIN4) continue; int cnt = 0; COLOUR thiscolor = Nobody; - for (int x=0; x<mRowLengths[y]; x++) + for (int x=0; x<mRowLengths[y]; ++x) { COLOUR checkField = (COLOUR)field[y][x+mStartOfRows[y]]; - if (checkField == thiscolor) cnt++; + if (checkField == thiscolor) ++cnt; else {cnt=1; thiscolor=checkField;} if ( (cnt>=WIN4) &&( (thiscolor==Yellow)||(thiscolor==Red) ) ) return thiscolor; }// next x @@ -666,7 +666,7 @@ numbers[6+x]++; numbers[13+x+y]++; numbers[30+x-y]++; - for (int i=y+1; i<=SIZE_Y; i++) + for (int i=y+1; i<=SIZE_Y; ++i) { field[i][x]--; field[6+x][i]--; @@ -684,7 +684,7 @@ } // Main startup -int main(int argc ,char * argv[]) +int main() { // This is the computer player...it should do the calculation // It doesn't do much here @@ -692,7 +692,7 @@ fflush(stderr); KComputer comp; // And start the event loop - comp.proc.exec(argc,argv); + comp.proc.exec(); fprintf(stderr,"AI process exists.\n"); fflush(stderr); return 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/kwin4view.h new/kfourinline-16.04.1/src/kwin4view.h --- old/kfourinline-15.12.3/src/kwin4view.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/kwin4view.h 2016-03-20 12:01:05.000000000 +0100 @@ -118,16 +118,16 @@ /** Enable reflections on the given position. If width or height is zero * the reflections are disabled. - * @param x The The x position of the reflection [screen coord] - * @param y The The y position of the reflection [screen coord] - * @param width The The width of the reflection [screen coord] - * @param height The The height of the reflection [screen coord] + * @param x The x position of the reflection [screen coord] + * @param y The y position of the reflection [screen coord] + * @param width The width of the reflection [screen coord] + * @param height The height of the reflection [screen coord] */ void setReflection(int x, int y, int width, int height); signals: /** Emit this signal if a sprite animation move is finished. - * @param mode A user defined parameter. + * @param mode A user-defined parameter. */ void signalMoveDone(int mode); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/main.cpp new/kfourinline-16.04.1/src/main.cpp --- old/kfourinline-15.12.3/src/main.cpp 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/main.cpp 2016-03-20 12:01:05.000000000 +0100 @@ -37,7 +37,7 @@ */ #include <KAboutData> - +#include <KCrash> #include "kfourinline_debug.h" #include <KLocalizedString> @@ -82,6 +82,7 @@ aboutData.setHomepage(QStringLiteral("http://games.kde.org/kfourinline")); QCommandLineParser parser; KAboutData::setApplicationData(aboutData); + KCrash::initialize(); parser.addVersionOption(); parser.addHelpOption(); parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("d") << QStringLiteral("debug"), i18n("Enter debug level"), QStringLiteral("level"))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/score.h new/kfourinline-16.04.1/src/score.h --- old/kfourinline-15.12.3/src/score.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/score.h 2016-03-20 12:01:05.000000000 +0100 @@ -39,7 +39,7 @@ /** Construct a score object. * @param parent The parent object */ - Score(QObject* parent = 0); + explicit Score(QObject* parent = 0); /** Set and update the level of the AI. * @param level The new level diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/spritenotify.h new/kfourinline-16.04.1/src/spritenotify.h --- old/kfourinline-15.12.3/src/spritenotify.h 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/spritenotify.h 2016-03-20 12:01:05.000000000 +0100 @@ -37,7 +37,7 @@ /** Create the object. * @param parent The parent graphics item. */ - SpriteNotify(QGraphicsItem* parent); + explicit SpriteNotify(QGraphicsItem* parent); /** Emit the notification signal. * @param mode A user defined parameter. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfourinline-15.12.3/src/statuswidget.ui new/kfourinline-16.04.1/src/statuswidget.ui --- old/kfourinline-15.12.3/src/statuswidget.ui 2015-12-22 20:30:42.000000000 +0100 +++ new/kfourinline-16.04.1/src/statuswidget.ui 2016-03-20 12:01:05.000000000 +0100 @@ -119,7 +119,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -129,7 +129,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -139,7 +139,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -149,7 +149,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -159,7 +159,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -169,7 +169,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -179,7 +179,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -189,7 +189,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -199,7 +199,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget> @@ -209,7 +209,7 @@ <property name="lineWidth" > <number>0</number> </property> - <property name="numDigits" > + <property name="digitCount" > <number>2</number> </property> </widget>
