Hello community,

here is the log from the commit of package knavalbattle for openSUSE:Factory 
checked in at 2016-05-29 03:10:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/knavalbattle (Old)
 and      /work/SRC/openSUSE:Factory/.knavalbattle.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "knavalbattle"

Changes:
--------
--- /work/SRC/openSUSE:Factory/knavalbattle/knavalbattle.changes        
2016-03-29 09:58:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.knavalbattle.new/knavalbattle.changes   
2016-05-29 03:10:39.000000000 +0200
@@ -1,0 +2,24 @@
+Sat May  7 10:33:43 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:09:02 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:45:10 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:
----
  knavalbattle-15.12.3.tar.xz

New:
----
  knavalbattle-16.04.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ knavalbattle.spec ++++++
--- /var/tmp/diff_new_pack.sbKrQp/_old  2016-05-29 03:10:40.000000000 +0200
+++ /var/tmp/diff_new_pack.sbKrQp/_new  2016-05-29 03:10:40.000000000 +0200
@@ -46,7 +46,7 @@
 License:        GPL-2.0+
 Group:          Amusements/Games/Board/Other
 Url:            http://www.kde.org
-Version:        15.12.3
+Version:        16.04.1
 Release:        0
 Source0:        knavalbattle-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ knavalbattle-15.12.3.tar.xz -> knavalbattle-16.04.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/CMakeLists.txt 
new/knavalbattle-16.04.1/CMakeLists.txt
--- old/knavalbattle-15.12.3/CMakeLists.txt     2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/CMakeLists.txt     2016-03-29 00:45:23.000000000 
+0200
@@ -2,21 +2,22 @@
 
 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)
-find_package(KF5 REQUIRED COMPONENTS 
-  Config 
-  DBusAddons 
-  DNSSD 
-  I18n 
-  XmlGui 
+find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+  Config
+  Crash
+  DBusAddons
+  DNSSD
   DocTools
+  I18n
   TextWidgets
-  )
-    
+  XmlGui
+)
 
 find_package(KF5KDEGames 4.9.0 REQUIRED)
 
@@ -28,10 +29,10 @@
 include(KDECMakeSettings)
 
 add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-#add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
+#add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
 
 add_subdirectory(src) 
-add_subdirectory(data) 
+add_subdirectory(data)
 add_subdirectory(doc)
 add_subdirectory(kconf_update)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/CMakeLists.txt 
new/knavalbattle-16.04.1/src/CMakeLists.txt
--- old/knavalbattle-15.12.3/src/CMakeLists.txt 2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/CMakeLists.txt 2016-03-29 00:45:23.000000000 
+0200
@@ -38,7 +38,8 @@
     stats.cpp
     statswidget.cpp
     uientity.cpp
-    welcomescreen.cpp)
+    welcomescreen.cpp
+)
 
 
 kconfig_add_kcfg_files(knavalbattle_SRCS settingsbase.kcfgc)
@@ -46,9 +47,20 @@
 ecm_add_app_icon(knavalbattle_SRCS ICONS ${ICONS_SRCS})
 add_executable(knavalbattle ${knavalbattle_SRCS} ${kwelcomescreen_SRCS})
 
-target_link_libraries(knavalbattle Qt5::Xml Qt5::Network KF5::I18n KF5::XmlGui 
KF5::Completion KF5::TextWidgets KF5::DNSSD KF5KDEGames KF5::DBusAddons)
+target_link_libraries(knavalbattle
+    Qt5::Xml
+    Qt5::Network
+    KF5::I18n
+    KF5::XmlGui
+    KF5::Completion
+    KF5::TextWidgets
+    KF5::DNSSD
+    KF5::Crash
+    KF5::DBusAddons
+    KF5KDEGames
+)
 
-install(TARGETS knavalbattle  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
-install( FILES knavalbattleui.rc  DESTINATION  
${KDE_INSTALL_KXMLGUI5DIR}/knavalbattle )
+install(TARGETS knavalbattle  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(FILES knavalbattleui.rc  DESTINATION  
${KDE_INSTALL_KXMLGUI5DIR}/knavalbattle)
 install(PROGRAMS org.kde.knavalbattle.desktop DESTINATION 
${KDE_INSTALL_APPDIR})
-install( FILES knavalbattle.protocol  DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+install(FILES knavalbattle.protocol  DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/ai/ai.cpp 
new/knavalbattle-16.04.1/src/ai/ai.cpp
--- old/knavalbattle-15.12.3/src/ai/ai.cpp      2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/ai/ai.cpp      2016-03-29 00:45:23.000000000 
+0200
@@ -40,8 +40,8 @@
             for (unsigned int j = 1; j <= m_config->numberOfShipsOfSize(size); 
j++) {
                 Ship* ship = 0;
                 while (ship == 0 && canFinish) {
-                    Coord c(rand() % m_sea->size().x, rand() % 
m_sea->size().y);
-                    Ship::Direction dir = rand() % 2 == 0 ? 
Ship::LEFT_TO_RIGHT : Ship::TOP_DOWN;
+                    Coord c(qrand() % m_sea->size().x, qrand() % 
m_sea->size().y);
+                    Ship::Direction dir = qrand() % 2 == 0 ? 
Ship::LEFT_TO_RIGHT : Ship::TOP_DOWN;
                     if (m_sea->canAddShip(m_player, c, size, dir)) {
                         ship = new Ship(size, dir, c);
                         m_sea->add(m_player, ship);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/ai/dummyai.cpp 
new/knavalbattle-16.04.1/src/ai/dummyai.cpp
--- old/knavalbattle-15.12.3/src/ai/dummyai.cpp 2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/ai/dummyai.cpp 2016-03-29 00:45:23.000000000 
+0200
@@ -9,16 +9,12 @@
 
 #include "dummyai.h"
 #include "sea.h"
-
-// for rand
-#include <stdio.h>
 #include <time.h>
-#include <sys/time.h>
 
 DummyAI::DummyAI(Sea::Player player, Sea* sea, const BattleShipsConfiguration* 
config)
 : AI(player, sea, config)
 {
-    srand(time(0));
+    qsrand(time(0));
 }
 
 Coord DummyAI::getMove()
@@ -26,7 +22,7 @@
     if (m_sea->turn() == m_player &&
         m_sea->status() == Sea::PLAYING) {
         for (int i = 0; i < 10000; i++) {
-            Coord c(rand() % m_sea->size().x, rand() % m_sea->size().y);
+            Coord c(qrand() % m_sea->size().x, qrand() % m_sea->size().y);
             if (m_sea->canHit(m_player, c)) {
                 return c;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/ai/smartai.cpp 
new/knavalbattle-16.04.1/src/ai/smartai.cpp
--- old/knavalbattle-15.12.3/src/ai/smartai.cpp 2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/ai/smartai.cpp 2016-03-29 00:45:23.000000000 
+0200
@@ -10,11 +10,7 @@
 #include "smartai.h"
 
 #include <algorithm>
-
-// for rand
-#include <stdio.h>
 #include <time.h>
-#include <sys/time.h>
 
 class Strategy
 {
@@ -118,7 +114,7 @@
         }
     }
 
-    Strategy* notify(const Coord& c, const HitInfo& info)
+    Strategy* notify(const Coord& c, const HitInfo& info) override
     {
         if (info.shipDestroyed) {
             // success!
@@ -152,7 +148,7 @@
     Coord getMove() override
     {
         for (int i = 0; i < 10000; i++) {
-            Coord c(rand() % m_sea->size().x, rand() % m_sea->size().y);
+            Coord c(qrand() % m_sea->size().x, qrand() % m_sea->size().y);
             if (m_sea->canHit(m_player, c)) {
                 return c;
             }
@@ -194,7 +190,7 @@
 
     Coord getMoveHelper()
     {
-        int index = rand() % m_range;
+        int index = qrand() % m_range;
         int current = 0;
         for (int y = m_offset; y < m_sea->size().y; y += m_gap) {
             int diag = m_sea->size().y - y;
@@ -220,14 +216,14 @@
             }
             current += diag;
         }
-        
+
         return Coord::invalid();
     }
 
     void setup()
     {
         do {
-            m_offset = rand() % m_gap;
+            m_offset = qrand() % m_gap;
             qDebug() << "offset =" << m_offset << " / " << m_gap;
         } while (!movesAvailable());
 
@@ -290,7 +286,7 @@
 : AI(player, sea, config)
 , m_state(random, config)
 {
-    srand(time(0));
+    qsrand(time(0));
     m_strategy = std::unique_ptr<Strategy>(m_state.defaultStrategy(player, 
sea));
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/animation.cpp 
new/knavalbattle-16.04.1/src/animation.cpp
--- old/knavalbattle-15.12.3/src/animation.cpp  2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/animation.cpp  2016-03-29 00:45:23.000000000 
+0200
@@ -6,8 +6,8 @@
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 */
-#include <QDebug>
 #include "animation.h"
+#include <QDebug>
 
 Animation::~Animation()
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/audioplayer.h 
new/knavalbattle-16.04.1/src/audioplayer.h
--- old/knavalbattle-15.12.3/src/audioplayer.h  2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/audioplayer.h  2016-03-29 00:45:23.000000000 
+0200
@@ -19,7 +19,7 @@
 Q_OBJECT
 
 public:
-    AudioPlayer(QObject* parent);
+    explicit AudioPlayer(QObject* parent);
 
     void play(Sea::Player player, const HitInfo& info);
     void setActive(bool value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/chatwidget.h 
new/knavalbattle-16.04.1/src/chatwidget.h
--- old/knavalbattle-15.12.3/src/chatwidget.h   2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/chatwidget.h   2016-03-29 00:45:23.000000000 
+0200
@@ -30,7 +30,7 @@
     
     void setHistoryText(int index);
 public:
-    ChatWidget(QWidget* parent = 0);
+    explicit ChatWidget(QWidget* parent = 0);
     
     QSize sizeHint() const override;
     void bindTo(Entity* entity);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/kbsrenderer.cpp 
new/knavalbattle-16.04.1/src/kbsrenderer.cpp
--- old/knavalbattle-15.12.3/src/kbsrenderer.cpp        2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/kbsrenderer.cpp        2016-03-29 
00:45:23.000000000 +0200
@@ -7,8 +7,8 @@
   (at your option) any later version.
 */
 
-#include "coord.h"
 #include "kbsrenderer.h"
+#include "coord.h"
 
 #include <KgThemeProvider>
 #include <KGameRenderedItem>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/knavalbattle.kcfg 
new/knavalbattle-16.04.1/src/knavalbattle.kcfg
--- old/knavalbattle-15.12.3/src/knavalbattle.kcfg      2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/knavalbattle.kcfg      2016-03-29 
00:45:23.000000000 +0200
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE kcfg SYSTEM 
-    "http://www.kde.org/standards/kcfg/1.0/kcfg.xsd";>
-<kcfg>
+<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="knavalbattlerc"/>
   <group name="network">
     <entry name="Hostname" type="String">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/knavalbattleui.rc 
new/knavalbattle-16.04.1/src/knavalbattleui.rc
--- old/knavalbattle-15.12.3/src/knavalbattleui.rc      2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/knavalbattleui.rc      2016-03-29 
00:45:23.000000000 +0200
@@ -7,32 +7,32 @@
                          http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd";>
 
 <MenuBar>
-  <Menu name="game">
-    <Action name="game_server" />
-    <Action name="game_client" />
-    <Action name="game_local" />
-    <Action name="game_create_server" />
-    <Action name="game_create_client" />
-  </Menu>
-  <Menu name="settings">
-    <Action name="options_nickname" />
-    <Action name="options_sounds" />
-    <Action name="options_adjacent" />
-    <Action name="options_multiple_ships" />
-    <Action name="options_show_endgame_message" />
-    <Action name="options_showleftgrid" />
-    <Action name="options_showrightgrid" />
-  </Menu>
+    <Menu name="game">
+        <Action name="game_server"/>
+        <Action name="game_client"/>
+        <Action name="game_local"/>
+        <Action name="game_create_server"/>
+        <Action name="game_create_client"/>
+    </Menu>
+    <Menu name="settings">
+        <Action name="options_nickname"/>
+        <Action name="options_sounds"/>
+        <Action name="options_adjacent"/>
+        <Action name="options_multiple_ships"/>
+        <Action name="options_show_endgame_message"/>
+        <Action name="options_showleftgrid"/>
+        <Action name="options_showrightgrid"/>
+    </Menu>
 </MenuBar>
 
-<ToolBar name="gameToolbar" >
+<ToolBar name="gameToolbar">
     <text>Game Toolbar</text>
-    <Action name="game_new" />
-    <Action name="game_restart" />
-    <Action name="game_local" />
-    <Action name="game_create_server" />
-    <Action name="game_create_client" />
- </ToolBar>
+    <Action name="game_new"/>
+    <Action name="game_restart"/>
+    <Action name="game_local"/>
+    <Action name="game_create_server"/>
+    <Action name="game_create_client"/>
+</ToolBar>
 
 <State name="playing">
     <enable>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/main.cpp 
new/knavalbattle-16.04.1/src/main.cpp
--- old/knavalbattle-15.12.3/src/main.cpp       2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/main.cpp       2016-03-29 00:45:23.000000000 
+0200
@@ -10,6 +10,7 @@
 */
 
 #include <KAboutData>
+#include <KCrash>
 #include <KLocalizedString>
 #include <KDBusService>
 #include <Kdelibs4ConfigMigrator>
@@ -76,6 +77,7 @@
     aboutData.processCommandLine(&parser);
     
     KAboutData::setApplicationData(aboutData);
+    KCrash::initialize();
     KDBusService service; 
     KLocalizedString::setApplicationDomain("knavalbattle");
     
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/message.h 
new/knavalbattle-16.04.1/src/message.h
--- old/knavalbattle-15.12.3/src/message.h      2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/message.h      2016-03-29 00:45:23.000000000 
+0200
@@ -64,7 +64,7 @@
     QString m_nickname;
 public:
     static const int MSGTYPE = 2;
-    NickMessage(const QString& nickname);
+    explicit NickMessage(const QString& nickname);
     void accept(MessageVisitor& visitor) const override;
     
     const QString& nickname() const { return m_nickname; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/playerlabel.cpp 
new/knavalbattle-16.04.1/src/playerlabel.cpp
--- old/knavalbattle-15.12.3/src/playerlabel.cpp        2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/playerlabel.cpp        2016-03-29 
00:45:23.000000000 +0200
@@ -6,10 +6,11 @@
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 */
-#include <QHBoxLayout>
 
 #include "playerlabel.h"
 
+#include <QHBoxLayout>
+
 PlayerLabel::PlayerLabel(const QPixmap &icon, const QString &text, QWidget 
*parent)
 : QWidget(parent)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/playfield.cpp 
new/knavalbattle-16.04.1/src/playfield.cpp
--- old/knavalbattle-15.12.3/src/playfield.cpp  2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/playfield.cpp  2016-03-29 00:45:23.000000000 
+0200
@@ -15,6 +15,7 @@
 #include <QVBoxLayout>
 #include <QDebug>
 #include <QInputDialog>
+#include <QPointer>
 
 #include <KLocalizedString>
 #include <KMessageBox>
@@ -158,7 +159,7 @@
         const Stats* stats = m_menu->player(0)->stats();
        
         if (stats && qobject_cast<const AIEntity*>(m_menu->player(1))) {
-            KScoreDialog* highscoredialog = new KScoreDialog(
+            QPointer<KScoreDialog> highscoredialog = new KScoreDialog(
                     KScoreDialog::Name | KScoreDialog::Score | 
                     KScoreDialog::Custom1 | 
                     KScoreDialog::Custom2 | 
@@ -181,8 +182,10 @@
             //if (highscoredialog->addScore(info, KScoreDialog::AskName)) {
             if (temp != 0) {
                 highscoredialog->exec();
+                delete highscoredialog;
                 return;
             }
+            delete highscoredialog;
         }
         
         m_status_bar->showMessage(i18n("You win!"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/protocol.cpp 
new/knavalbattle-16.04.1/src/protocol.cpp
--- old/knavalbattle-15.12.3/src/protocol.cpp   2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/protocol.cpp   2016-03-29 00:45:23.000000000 
+0200
@@ -35,7 +35,7 @@
     void setType(const Msg&)
     {
         QDomElement element = addField("msgtype", 
QString::number(Msg::MSGTYPE));
-        // only useful for debuging, just add the name of the message type
+        // only useful for debugging, just add the name of the message type
         element.setAttribute(QLatin1String("type"), Msg::messageType());
     }
 public:
@@ -233,7 +233,7 @@
             QDomNodeList nodes = main.childNodes();
             for (int i = 0; i < nodes.count(); i++) {
                 QDomElement element = nodes.item(i).toElement();
-                if (!element.isNull() && element.tagName().startsWith("ship")) 
{
+                if (!element.isNull() && 
element.tagName().startsWith(QLatin1String("ship"))) {
                     int size = element.tagName().mid(4).toInt();
                     QStringList data = element.text().split(' ');
                     if (data.size() != 3) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/seaview.h 
new/knavalbattle-16.04.1/src/seaview.h
--- old/knavalbattle-15.12.3/src/seaview.h      2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/seaview.h      2016-03-29 00:45:23.000000000 
+0200
@@ -47,7 +47,7 @@
     bool updatePreview(const QPoint& pos);
     int fieldAt(const QPoint& p);
 public:
-    SeaView(QWidget* parent);
+    explicit SeaView(QWidget* parent);
     ~SeaView();
     
     void setDelegate(Delegate* c);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/ships.h 
new/knavalbattle-16.04.1/src/ships.h
--- old/knavalbattle-15.12.3/src/ships.h        2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/ships.h        2016-03-29 00:45:23.000000000 
+0200
@@ -44,7 +44,7 @@
     QHash<unsigned int,Ships> m_ships;
 public:
 
-    BattleShipsConfiguration(const bool fromXML=false);
+    explicit BattleShipsConfiguration(const bool fromXML=false);
     explicit BattleShipsConfiguration(unsigned int longestShipSize, const bool 
allowAdjacentShips, const unsigned int boardWidth, const unsigned int 
boardHeight, const bool fromXML=false);
     BattleShipsConfiguration(const BattleShipsConfiguration& copy);
     // does not add any ship longer than longestShip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/simplemenu.cpp 
new/knavalbattle-16.04.1/src/simplemenu.cpp
--- old/knavalbattle-15.12.3/src/simplemenu.cpp 2016-01-13 14:24:56.000000000 
+0100
+++ new/knavalbattle-16.04.1/src/simplemenu.cpp 2016-03-29 00:45:23.000000000 
+0200
@@ -74,19 +74,24 @@
 {
     QWidget* parent_widget = qobject_cast<QWidget*>(parent());
     Q_ASSERT(parent_widget);
-    NetworkDialog dialog(false, parent_widget);
-    if (dialog.exec()) {
-        finalize(DONE_SERVER, dialog.nickname(), dialog.socket());
+    QPointer<NetworkDialog> dialog = new NetworkDialog(false, parent_widget);
+    if (dialog->exec()) {
+        if (dialog) {
+            finalize(DONE_SERVER, dialog->nickname(), dialog->socket());
+        }
     }
+    delete dialog;
 }
 
 void SimpleMenu::createClientWithUrl(const QUrl& url)
 {
     QWidget* parent_widget = qobject_cast<QWidget*>(parent());
     Q_ASSERT(parent_widget);
-    NetworkDialog dialog(true, parent_widget,&url);
-    if (dialog.exec() == QDialog::Accepted) {
-        finalize(DONE_CLIENT, dialog.nickname(), dialog.socket());
+    QPointer<NetworkDialog> dialog = new NetworkDialog(true, 
parent_widget,&url);
+    if (dialog->exec() == QDialog::Accepted) {
+        if (dialog) {
+            finalize(DONE_CLIENT, dialog->nickname(), dialog->socket());
+        }
     }
 }
 
@@ -94,9 +99,11 @@
 {
     QWidget* parent_widget = qobject_cast<QWidget*>(parent());
     Q_ASSERT(parent_widget);
-    NetworkDialog dialog(true, parent_widget);
-    if (dialog.exec() == QDialog::Accepted) {
-        finalize(DONE_CLIENT, dialog.nickname(), dialog.socket());
+    QPointer<NetworkDialog> dialog = new NetworkDialog(true, parent_widget);
+    if (dialog->exec() == QDialog::Accepted) {
+        if (dialog) {
+            finalize(DONE_CLIENT, dialog->nickname(), dialog->socket());
+        }
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/spritefactory.h 
new/knavalbattle-16.04.1/src/spritefactory.h
--- old/knavalbattle-15.12.3/src/spritefactory.h        2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/spritefactory.h        2016-03-29 
00:45:23.000000000 +0200
@@ -22,7 +22,7 @@
     
     Sprite* createSimpleSprite(const QString& name);
 public:
-    SpriteFactory(KBSRenderer* renderer);
+    explicit SpriteFactory(KBSRenderer* renderer);
     
     Sprite* createShip(Ship* ship);
     Sprite* createHit();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/statswidget.cpp 
new/knavalbattle-16.04.1/src/statswidget.cpp
--- old/knavalbattle-15.12.3/src/statswidget.cpp        2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/statswidget.cpp        2016-03-29 
00:45:23.000000000 +0200
@@ -6,15 +6,15 @@
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 */
+#include "statswidget.h"
+#include "stats.h"
+#include "kbsrenderer.h"
+
 #include <QPen>
 #include <QPainter>
 #include <QPaintEvent>
 #include <QHBoxLayout>
 
-#include "stats.h"
-#include "statswidget.h"
-#include "kbsrenderer.h"
-
 
 StatsWidgetElement::StatsWidgetElement(const QPixmap &icon, const QString 
&text, QWidget *parent)
 : QFrame(parent)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knavalbattle-15.12.3/src/welcomescreen.h 
new/knavalbattle-16.04.1/src/welcomescreen.h
--- old/knavalbattle-15.12.3/src/welcomescreen.h        2016-01-13 
14:24:56.000000000 +0100
+++ new/knavalbattle-16.04.1/src/welcomescreen.h        2016-03-29 
00:45:23.000000000 +0200
@@ -30,7 +30,7 @@
     Button* m_hover;
     bool m_active;
 public:
-    WelcomeScreen(const QFont& font);
+    explicit WelcomeScreen(const QFont& font);
     
     void resize(const QSizeF&);
     


Reply via email to