diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(ksirk VERSION ${KDE_APPLICATIONS_VERSION}) -set (QT_MIN_VERSION "5.7.0") +set (QT_MIN_VERSION "5.8.0") set (KF5_MIN_VERSION "5.30.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG) diff --git a/ksirk/GameLogic/gameautomaton.cpp b/ksirk/GameLogic/gameautomaton.cpp --- a/ksirk/GameLogic/gameautomaton.cpp +++ b/ksirk/GameLogic/gameautomaton.cpp @@ -2198,6 +2198,7 @@ case DecrNbArmies: stream >> countryName >> nbArmies; m_game->theWorld()->countryNamed(countryName)->decrNbArmies(nbArmies); + Q_FALLTHROUGH(); case StartLocalCurrentAI: m_game->startLocalCurrentAI(); break; diff --git a/ksirk/GameLogic/goal.h b/ksirk/GameLogic/goal.h --- a/ksirk/GameLogic/goal.h +++ b/ksirk/GameLogic/goal.h @@ -68,7 +68,7 @@ /** Default destructor */ ~Goal(); - + //@{ /** Accessors for the goal type */ inline GoalType type() const {return m_type;} diff --git a/ksirk/GameLogic/onu.h b/ksirk/GameLogic/onu.h --- a/ksirk/GameLogic/onu.h +++ b/ksirk/GameLogic/onu.h @@ -207,7 +207,7 @@ struct FontDesc { QString family; - uint size; + int size; QFont::Weight weight; bool italic; QString foregroundColor; diff --git a/ksirk/GameLogic/onu.cpp b/ksirk/GameLogic/onu.cpp --- a/ksirk/GameLogic/onu.cpp +++ b/ksirk/GameLogic/onu.cpp @@ -71,7 +71,7 @@ } #endif m_font.family = "URW Chancery L"; - m_font.size = (uint)(13*m_zoom); + m_font.size = (int)(13*m_zoom); m_font.weight = QFont::Bold; m_font.italic = true; m_font.foregroundColor = "black"; @@ -222,7 +222,7 @@ KConfigGroup fontgroup = config.group("font"); m_font.family = fontgroup.readEntry("family","URW Chancery L"); - m_font.size = fontgroup.readEntry("size",(uint)(13*m_zoom)); + m_font.size = fontgroup.readEntry("size",(int)(13*m_zoom)); QString w = fontgroup.readEntry("weight", "bold");; if (w == "normal") { @@ -640,7 +640,7 @@ m_zoom *= zoomFactor; - //m_font.size = (unsigned int)(m_font.size*m_zoom); + //m_font.size = (int)(m_font.size*m_zoom); //m_width = (unsigned int)(m_width *m_zoom); //m_height = (unsigned int)(m_height *m_zoom); @@ -665,7 +665,7 @@ //Application of zoom if (zoomFactor > 1 && m_nbZooms < nbLimitZooms) { - m_font.size = (unsigned int)(m_font.size*zoomFactor); + m_font.size = (int)(m_font.size*zoomFactor); m_width = (unsigned int)(m_width *zoomFactor); m_height = (unsigned int)(m_height *zoomFactor); @@ -684,7 +684,7 @@ } else if (zoomFactor < 1 && m_nbZooms > -nbLimitZooms) { - m_font.size = (unsigned int)(m_font.size*zoomFactor); + m_font.size = (int)(m_font.size*zoomFactor); m_width = (unsigned int)(m_width *zoomFactor); m_height = (unsigned int)(m_height *zoomFactor); diff --git a/ksirk/krightdialog.cpp b/ksirk/krightdialog.cpp --- a/ksirk/krightdialog.cpp +++ b/ksirk/krightdialog.cpp @@ -443,31 +443,31 @@ QHBoxLayout * deAtt = new QHBoxLayout(); QHBoxLayout * deDef = new QHBoxLayout(); - if(A1!=0 || A1!=-1) + if(A1!=0 && A1!=-1) { QLabel * de1 = new QLabel(); de1->setPixmap(game->getDice(KGameWindow::Red,A1)); rightContents.insert(0,de1);deAtt->addWidget(de1); } - if(A2!=0 || A2!=-1) + if(A2!=0 && A2!=-1) { QLabel * de2= new QLabel(); de2->setPixmap(game->getDice(KGameWindow::Red,A2)); rightContents.insert(0,de2);deAtt->addWidget(de2); } - if(A3!=0 || A3!=-1) + if(A3!=0 && A3!=-1) { QLabel * de3= new QLabel(); de3->setPixmap(game->getDice(KGameWindow::Red,A3)); rightContents.insert(0,de3);deAtt->addWidget(de3); } - if(D1!=0 || D1!=-1) + if(D1!=0 && D1!=-1) { QLabel * de4= new QLabel(); de4->setPixmap(game->getDice(KGameWindow::Blue,D1)); rightContents.insert(0,de4);deDef->addWidget(de4); } - if(D2!=0 || D2!=-1) + if(D2!=0 && D2!=-1) { QLabel * de5= new QLabel(); de5->setPixmap(game->getDice(KGameWindow::Blue,D2)); diff --git a/ksirkskineditor/onu.h b/ksirkskineditor/onu.h --- a/ksirkskineditor/onu.h +++ b/ksirkskineditor/onu.h @@ -213,7 +213,7 @@ struct FontDesc { QString family; - uint size; + int size; QFont::Weight weight; bool italic; QString foregroundColor; diff --git a/ksirkskineditor/onu.cpp b/ksirkskineditor/onu.cpp --- a/ksirkskineditor/onu.cpp +++ b/ksirkskineditor/onu.cpp @@ -56,7 +56,7 @@ qCDebug(KSIRKSKINEDITOR_LOG) << "ONU constructor: " << m_configFileName; m_font.family = QStringLiteral("URW Chancery L"); - m_font.size = (uint)(13); + m_font.size = 13; m_font.weight = QFont::Bold; m_font.italic = true; m_font.foregroundColor = QStringLiteral("black"); @@ -199,7 +199,7 @@ qCDebug(KSIRKSKINEDITOR_LOG) << "Loading font data"; KConfigGroup fontgroup = config.group("font"); m_font.family = fontgroup.readEntry("family","URW Chancery L"); - m_font.size = fontgroup.readEntry("size",(uint)(13)); + m_font.size = fontgroup.readEntry("size", 13); QString w = fontgroup.readEntry("weight", "bold");; if (w == QLatin1String("normal")) {