Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9c88ab40 authored by Laurent Montel's avatar Laurent Montel 😁

Start to make it compile

parent d41af6a1
project(palapeli)
if(NOT COMPILING_KDEGAMES)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
find_package(KDEGames REQUIRED)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
find_package(ECM 1.3.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 Concurrent)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
Config
ItemModels
WidgetsAddons
WindowSystem
I18n
GuiAddons
ConfigWidgets
TextWidgets
XmlGui
KIO
NotifyConfig
NewStuff
KDELibs4Support)
find_package(KF5KDEGames 4.9.0 REQUIRED)
include(FeatureSummary)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DTRANSLATION_DOMAIN="palapeli")
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)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libpala)
......@@ -21,4 +45,3 @@ add_subdirectory(mime)
add_subdirectory(puzzles)
add_subdirectory(doc)
macro_display_feature_log()
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR palapeli)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR palapeli)
......@@ -13,18 +13,19 @@ else(QVORONOI_EXECUTABLE)
set(QVORONOI_FOUND FALSE)
endif(QVORONOI_EXECUTABLE)
macro_log_feature(QVORONOI_FOUND "qvoronoi" "Part of the qhull package, needed for the irregular grid from the Palapeli Slicer Collection" "http://www.qhull.org/download" FALSE "" "")
#PORT IT
#macro_log_feature(QVORONOI_FOUND "qvoronoi" "Part of the qhull package, needed for the irregular grid from the Palapeli Slicer Collection" "http://www.qhull.org/download" FALSE "" "")
#correctly include the headers of libpala when they are not yet installed
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS USE_LOCAL_LIBPALA)
set(SLICER_LINK_LIBS ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} pala)
set(SLICER_LINK_LIBS KF5::KDELibs4Support Qt5::Gui pala)
kde4_add_plugin(palapeli_rectslicer slicer-rect.cpp)
add_library(palapeli_rectslicer MODULE slicer-rect.cpp)
target_link_libraries(palapeli_rectslicer ${SLICER_LINK_LIBS})
kde4_add_plugin(palapeli_jigsawslicer slicer-jigsaw.cpp)
add_library(palapeli_jigsawslicer MODULE slicer-jigsaw.cpp)
target_link_libraries(palapeli_jigsawslicer ${SLICER_LINK_LIBS})
set(palapeli_goldbergslicer_SRCS
......@@ -40,7 +41,7 @@ set(palapeli_goldbergslicer_SRCS
goldberg/utilities.cpp
)
kde4_add_plugin(palapeli_goldbergslicer ${palapeli_goldbergslicer_SRCS})
add_library(palapeli_goldbergslicer MODULE ${palapeli_goldbergslicer_SRCS})
target_link_libraries(palapeli_goldbergslicer ${SLICER_LINK_LIBS})
......
......@@ -35,7 +35,7 @@ QByteArray serializeLine(QList<qreal> input) {
for (int i=0; i<input.size(); ++i) {
result.append(QString::number(input[i]));
}
return result.join( QLatin1String( " " )).toAscii();
return result.join( QLatin1String( " " )).toLatin1();
}
/// unserializes the first item of the input into a list of space-separated ints and removes it.
......@@ -332,7 +332,7 @@ void IrregularMode::generateVoronoiGrid(GoldbergEngine *e, QList<QPointF> cell_c
cell_centers.append(QPointF(-width, 2 * height));
cell_centers.append(QPointF(2 * width, -height));
cell_centers.append(QPointF(2 * width, 2 * height));
qvoronoi_input.append(QString::number(cell_centers.size()).toAscii()).append("\n");
qvoronoi_input.append(QString::number(cell_centers.size()).toLatin1()).append("\n");
for (int n=0; n<cell_centers.size(); n++) {
QList<qreal> coords;
coords.append(cell_centers[n].x());
......
......@@ -44,12 +44,12 @@ set(palapeli_SRCS
window/puzzletablewidget.cpp
window/pieceholder.cpp
)
kde4_add_kcfg_files(palapeli_SRCS settings.kcfgc)
kde4_add_ui_files(palapeli_SRCS settings.ui)
kconfig_add_kcfg_files(palapeli_SRCS settings.kcfgc)
ki18n_wrap_ui(palapeli_SRCS settings.ui)
kde4_add_app_icon(palapeli_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/hi*-app-palapeli.png")
kde4_add_executable(palapeli ${palapeli_SRCS})
target_link_libraries(palapeli pala ${KDE4_KFILE_LIBS})
add_executable(palapeli ${palapeli_SRCS})
target_link_libraries(palapeli pala KF5::KDELibs4Support KF5::Archive Qt5::Concurrent)
install(TARGETS palapeli ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES palapeli.kcfg palapeli.notifyrc palapeliui.rc
......
......@@ -21,7 +21,7 @@
#include "triggerconfigwidget.h"
#include "../engine/texturehelper.h"
#include "settings.h"
#include <KIcon>
#include <QTimer>
//BEGIN Palapeli::TriggerComboBox
......@@ -143,4 +143,4 @@ void Palapeli::ConfigDialog::solutionAreaChange(int index)
//END Palapeli::ConfigDialog
#include "configdialog.moc"
#include "configdialog_p.moc"
//#include "configdialog_p.moc"
......@@ -258,4 +258,4 @@ void Palapeli::MouseInputButton::showModifiers(Qt::KeyboardModifiers modifiers)
}
#include "mouseinputbutton.moc"
#include "mouseinputbutton_p.moc"
//#include "mouseinputbutton_p.moc"
......@@ -36,7 +36,7 @@ static QString categoryToString(Palapeli::Interactor::Category category)
Palapeli::TriggerListView::TriggerListView(const QMap<QByteArray, Palapeli::Interactor*>& interactors, Palapeli::InteractorType interactorType, QWidget* parent)
: KCategorizedView(parent)
, m_categoryDrawer(new KCategoryDrawer)
, m_categoryDrawer(new KCategoryDrawer(this))
, m_baseModel(new QStandardItemModel(this))
, m_proxyModel(new Palapeli::TriggerListProxyModel(this))
, m_delegate(new Palapeli::TriggerListDelegate(this))
......@@ -96,4 +96,4 @@ void Palapeli::TriggerListView::setAssociations(const QMap<QByteArray, Palapeli:
}
#include "triggerlistview.moc"
#include "triggerlistview_p.moc"
//#include "triggerlistview_p.moc"
......@@ -22,7 +22,7 @@
#include "triggerlistview.h"
#include "elidinglabel.h"
#include "mouseinputbutton.h"
#include <kstringhandler_deprecated.h>
#include <QApplication>
#include <QHBoxLayout>
#include <QLabel>
......@@ -30,7 +30,6 @@
#include <KCategorizedSortFilterProxyModel>
#include <KCategoryDrawer>
#include <KLocalizedString>
#include <KStringHandler>
#include <KWidgetItemDelegate>
namespace Palapeli
......@@ -124,7 +123,7 @@ namespace Palapeli
return m_calculator->minimumSizeHint();
}
protected:
virtual QList<QWidget*> createItemWidgets() const
virtual QList<QWidget*> createItemWidgets(const QModelIndex &index) const
{
return QList<QWidget*>() << new Palapeli::TriggerListDelegateWidget(itemView());
}
......
......@@ -47,8 +47,8 @@ Palapeli::PuzzleCreatorDialog::PuzzleCreatorDialog()
, m_slicerConfigMasterWidget(new QStackedWidget)
{
//setup dialog
setCaption(i18nc("@title:window", "Create new puzzle"));
showButton(KDialog::Help, false);
setWindowTitle(i18nc("@title:window", "Create new puzzle"));
//QT5showButton(KDialog::Help, false);
//setup image selector
m_imageSelector->setMode(KFile::File | KFile::LocalOnly | KFile::ExistingOnly);
//build sublayouts
......
......@@ -35,7 +35,7 @@
#include "../config/configdialog.h"
#include "settings.h"
#include <KUrl>
#include <QtGui/QStackedWidget>
#include <QPointer>
#include <QPropertyAnimation>
......
......@@ -370,4 +370,4 @@ void Palapeli::Piece::endMove()
//END mouse interaction
#include "piece.moc"
#include "piece_p.moc"
//#include "piece_p.moc"
......@@ -39,10 +39,10 @@ Palapeli::ZoomWidget::ZoomWidget(QWidget* parent)
m_constrainedButton->setCheckable(true);
connect(m_constrainedButton, SIGNAL(toggled(bool)), this, SIGNAL(constrainedChanged(bool)));
m_zoomOutButton->setIcon(KIcon( QLatin1String( "zoom-out" )));
m_zoomOutButton->setShortcut(KStandardShortcut::zoomOut().primary());
//QT5 m_zoomOutButton->setShortcut(KStandardShortcut::zoomOut().primary());
connect(m_zoomOutButton, SIGNAL(pressed()), this, SIGNAL(zoomOutRequest()));
m_zoomInButton->setIcon(KIcon( QLatin1String( "zoom-in" )));
m_zoomInButton->setShortcut(KStandardShortcut::zoomIn().primary());
//QT5 m_zoomInButton->setShortcut(KStandardShortcut::zoomIn().primary());
connect(m_zoomInButton, SIGNAL(pressed()), this, SIGNAL(zoomInRequest()));
//init slider
m_slider->setMinimum(Palapeli::View::MinimumZoomLevel);
......
......@@ -210,4 +210,4 @@ bool Palapeli::Collection::deletePuzzle(const QModelIndex& index)
}
#include "collection.moc"
#include "collection_p.moc"
//#include "collection_p.moc"
......@@ -19,13 +19,13 @@
#include "puzzle.h"
#include <QtCore/QAtomicInt>
#include <QtCore/QAtomicPointer>
#include <QAtomicPointer>
#include <QtCore/QFileInfo>
#include <QtCore/QFutureSynchronizer>
#include <QtCore/QHash>
#include <QtCore/QMutexLocker>
#include <QtCore/QWaitCondition>
#include <QtCore/QtConcurrentRun>
#include <QtConcurrentRun>
#include <KDE/KGlobal>
//BEGIN Palapeli::PuzzleComponent
......
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