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 0e74f6dd authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use KCrash.

parent 1a7eb936
......@@ -2,27 +2,30 @@ project(palapeli)
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 Concurrent Svg)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Archive
Config
ConfigWidgets
CoreAddons
Crash
GuiAddons
I18n
ItemModels
KDELibs4Support
KIO
NewStuff
NotifyConfig
TextWidgets
WidgetsAddons
WindowSystem
I18n
GuiAddons
ConfigWidgets
TextWidgets
XmlGui
KIO
NotifyConfig
NewStuff
KDELibs4Support)
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
......
......@@ -50,7 +50,14 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/*-apps-palapeli.png")
ecm_add_app_icon(palapeli_SRCS ICONS ${ICONS_SRCS})
add_executable(palapeli ${palapeli_SRCS})
target_link_libraries(palapeli pala KF5::KDELibs4Support KF5::Archive Qt5::Concurrent Qt5::Svg)
target_link_libraries(palapeli
pala
KF5::KDELibs4Support
KF5::Archive
KF5::Crash
Qt5::Concurrent
Qt5::Svg
)
install(TARGETS palapeli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES palapeliui.rc
......
......@@ -22,7 +22,7 @@
#include <ctime>
#include <QTimer>
#include <KAboutData>
#include <KCrash>
#include <QApplication>
#include <KLocalizedString>
......@@ -31,18 +31,19 @@
int main(int argc, char** argv)
{
qsrand(time(0));
KAboutData about("palapeli", i18nc("The application's name", "Palapeli"), "2.0", i18n("KDE Jigsaw Puzzle Game"), KAboutLicense::GPL, i18n("Copyright 2009, 2010, Stefan Majewsky"));
about.addAuthor(i18n("Stefan Majewsky"), QString(), "majewsky@gmx.net", "http://majewsky.wordpress.com");
about.addCredit (i18n ("Johannes Loehnert"),
i18n ("The option to preview the completed puzzle"),
"loehnert.kde@gmx.de");
qsrand(time(0));
KAboutData about("palapeli", i18nc("The application's name", "Palapeli"), "2.0", i18n("KDE Jigsaw Puzzle Game"), KAboutLicense::GPL, i18n("Copyright 2009, 2010, Stefan Majewsky"));
about.addAuthor(i18n("Stefan Majewsky"), QString(), "majewsky@gmx.net", "http://majewsky.wordpress.com");
about.addCredit (i18n ("Johannes Loehnert"),
i18n ("The option to preview the completed puzzle"),
"loehnert.kde@gmx.de");
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("palapeli");
QCommandLineParser parser;
KAboutData::setApplicationData(about);
KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
parser.addPositionalArgument(QStringLiteral("puzzlefile"), i18n("Path to puzzle file (will be opened if -i is not given)"));
......@@ -54,9 +55,9 @@ int main(int argc, char** argv)
about.processCommandLine(&parser);
//NOTE: Syntax errors are reported on stderr, while file errors are presented to the user.
if (parser.isSet("import"))
//perform import request
//NOTE: Syntax errors are reported on stderr, while file errors are presented to the user.
if (parser.isSet("import"))
//perform import request
new Palapeli::ImportHelper(parser.value("import"));
else {
const QStringList args = parser.positionalArguments();
......@@ -64,9 +65,9 @@ int main(int argc, char** argv)
if (args.count()>1) {
path = args.at(1);
}
//no import request, show main window
//no import request, show main window
(new Palapeli::MainWindow(path))->show();
}
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("palapeli")));
return app.exec();
return app.exec();
}
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