Commit 728fbc8d authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Merge branch 'frameworks'

parents 9b93f723 2246ba98
.kdev4/
build/
*.kdev4
project(kreversi)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.15.0")
if(NOT COMPILING_KDEGAMES)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
find_package(KDEGames 4.9.0 REQUIRED)
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(${KDEGAMES_INCLUDE_DIRS} ${KDEGAMES_INCLUDE_DIR}/highscore ${KDE4_INCLUDES} ${QDBUS_INCLUDE_DIRS})
endif(NOT COMPILING_KDEGAMES)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
Crash
DBusAddons
Declarative
I18n
IconThemes
KIO
XmlGui
WidgetsAddons
)
find_package(KF5DocTools ${KF5_MIN_VERSION})
find_package(KDeclarative REQUIRED)
find_package(KF5KDEGames 4.9.0 REQUIRED)
add_subdirectory( pics )
add_subdirectory( sounds )
add_subdirectory( icons )
add_subdirectory( doc )
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include_directories( ${CMAKE_SOURCE_DIR}/libkdegames/highscore )
add_definitions(
-DQT_USE_FAST_CONCATENATION
-DQT_USE_FAST_OPERATOR_PLUS
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_TO_ASCII
# -DQT_NO_CAST_FROM_BYTEARRAY
-DQT_NO_URL_CAST_FROM_STRING
-DQT_USE_QSTRINGBUILDER
)
add_subdirectory(pics)
add_subdirectory(sounds)
add_subdirectory(icons)
if (KF5DocTools_FOUND)
add_subdirectory(doc)
endif()
include_directories(${CMAKE_SOURCE_DIR}/libKF5KDEGames/highscore)
########### next target ##############
set(kreversi_SRCS
......@@ -32,25 +62,45 @@ set(kreversi_SRCS
startgamedialog.cpp
Engine.cpp
highscores.cpp
kexthighscore.cpp
kexthighscore_gui.cpp
kexthighscore_internal.cpp
kexthighscore_item.cpp
kexthighscore_tab.cpp
mainwindow.cpp
main.cpp )
main.cpp
)
kde4_add_ui_files(kreversi_SRCS startgamedialog.ui)
ki18n_wrap_ui(kreversi_SRCS startgamedialog.ui)
kde4_add_kcfg_files(kreversi_SRCS preferences.kcfgc)
kconfig_add_kcfg_files(kreversi_SRCS preferences.kcfgc)
kde4_add_app_icon(kreversi_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-app-kreversi.png")
kde4_add_executable(kreversi ${kreversi_SRCS})
add_executable(kreversi ${kreversi_SRCS})
target_link_libraries(kreversi
Qt5::Svg
KF5::ConfigCore
KF5::ConfigGui
KF5::CoreAddons
KF5::Crash
KF5::DBusAddons
KF5::Declarative
KF5::IconThemes
KF5::KIOCore
KF5::KIOFileWidgets
KF5::WidgetsAddons
KF5::XmlGui
KF5KDEGames
)
target_link_libraries(kreversi kdegames ${KDE4_KDEUI_LIBS}
${QT_QTDECLARATIVE_LIBRARY} ${KDECLARATIVE_LIBRARIES})
install(TARGETS kreversi ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kreversi ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install( PROGRAMS org.kde.kreversi.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
#install( FILES kreversi.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES kreversiui.rc DESTINATION ${DATA_INSTALL_DIR}/kreversi )
install( DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/kreversi )
install(FILES org.kde.kreversi.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/metainfo/ )
install(PROGRAMS org.kde.kreversi.desktop DESTINATION ${KDE_INSTALL_APPDIR})
#install(FILES kreversi.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kreversiui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kreversi)
install(DIRECTORY qml DESTINATION ${KDE_INSTALL_DATADIR}/kreversi)
install(FILES org.kde.kreversi.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -114,12 +114,10 @@
// This makes it possible to select a random move among those with equal
// or nearly equal value after the search is completed.
#include <Engine.h>
#include "Engine.h"
#include <QVector>
#include <QApplication>
#include <KDebug>
#include <QVector>
// ================================================================
// Classes SquareStackEntry and SquareStack
......
......@@ -121,8 +121,8 @@
#include <KRandomSequence>
#include <commondefs.h>
#include <kreversigame.h>
#include "commondefs.h"
#include "kreversigame.h"
class KReversiGame;
......
......@@ -22,8 +22,8 @@
********************************************************************/
#include "colorscheme.h"
ColorScheme::ColorScheme(QDeclarativeItem *parent) :
QDeclarativeItem(parent)
ColorScheme::ColorScheme(QQuickItem *parent) :
QQuickItem(parent)
{
}
......
......@@ -24,18 +24,18 @@
#ifndef COLORSCHEME_H
#define COLORSCHEME_H
#include <QDeclarativeItem>
#include <QQuickItem>
#include <KColorScheme>
#include <QColor>
class ColorScheme : public QDeclarativeItem
class ColorScheme : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY placeHolder)
Q_PROPERTY(QColor foreground READ foreground NOTIFY placeHolder)
Q_PROPERTY(QColor border READ border NOTIFY placeHolder)
public:
ColorScheme(QDeclarativeItem *parent = 0);
ColorScheme(QQuickItem *parent = 0);
QColor background() const;
QColor foreground() const;
......
......@@ -21,12 +21,12 @@
* Boston, MA 02110-1301, USA.
*
********************************************************************/
#include <commondefs.h>
#include "commondefs.h"
#include <KLocale>
#include <KLocalizedString>
static QString chipPrefixString[2] = {"chip_bw", "chip_color"};
static QString chipPrefixString[2] = {QStringLiteral("chip_bw"), QStringLiteral("chip_color")};
QString Utils::chipPrefixToString(ChipsPrefix prefix) {
return chipPrefixString[prefix];
......
......@@ -27,7 +27,7 @@
#include <QString>
#include <KgDifficulty>
#include <preferences.h>
#include "preferences.h"
/**
* Used to indicate chip's state.
......
########### install files ###############
#
#
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kreversi)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kreversi)
<?xml version="1.0" ?>
<!--IMPORTANT: please note that'do not change this!' notice does not apply to translators -->
<!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 "&kreversi;">
<!ENTITY kappversion "2.0"><!--Applicaion version. Use this variable everywhere it's needed.-->
<!ENTITY package "kdegames"> <!-- do not change this! -->
......
......@@ -16,14 +16,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <highscores.h>
#include "highscores.h"
#include <QVector>
#include <QDateTime>
#include <QVector>
#include <kdemacros.h>
#include <KGlobal>
#include <KLocale>
#include <KLocalizedString>
#include <KConfigGroup>
#include <KConfig>
#include <KgDifficulty>
......@@ -79,7 +77,7 @@ void ExtManager::convertLegacy(uint gameType)
if ( gameType!=0 )
return;
KConfigGroup cg(KGlobal::config(), "High Score");
KConfigGroup cg(KSharedConfig::openConfig(), "High Score");
for (uint i = 1; i <= 10; i++) {
QString key = "Pos" + QString::number(i);
......
......@@ -19,7 +19,7 @@
#define HIGHSCORES_H
#include <QStringList>
#include <KExtHighscore>
#include "kexthighscore.h"
namespace KExtHighscore
{
......@@ -30,7 +30,7 @@ public:
ExtManager();
private:
virtual QString gameTypeLabel(uint gameTye, LabelType) const;
QString gameTypeLabel(uint gameTye, LabelType) const override;
QStringList m_typeLabels;
};
......
kde4_install_icons( ${ICON_INSTALL_DIR} )
kde4_install_icons( ${ICON_INSTALL_DIR} )
add_subdirectory(hicolor)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment