Changeset View
Changeset View
Standalone View
Standalone View
src/board.cpp
Context not available. | |||||
27 | #include <array> | 27 | #include <array> | ||
---|---|---|---|---|---|
28 | 28 | | |||
29 | // Qt | 29 | // Qt | ||
30 | #include <QMessageBox> | | |||
31 | #include <QMouseEvent> | 30 | #include <QMouseEvent> | ||
32 | #include <QPainter> | 31 | #include <QPainter> | ||
33 | #include <QStandardPaths> | 32 | #include <QStandardPaths> | ||
Context not available. | |||||
35 | 34 | | |||
36 | // KDE | 35 | // KDE | ||
37 | #include <KLocalizedString> | 36 | #include <KLocalizedString> | ||
37 | #include <KMessageBox> | ||||
38 | 38 | | |||
39 | // KShisen | 39 | // KShisen | ||
40 | #include "debug.h" | 40 | #include "debug.h" | ||
Context not available. | |||||
98 | void Board::loadSettings() | 98 | void Board::loadSettings() | ||
99 | { | 99 | { | ||
100 | if (!loadTileset(Prefs::tileSet())) { | 100 | if (!loadTileset(Prefs::tileSet())) { | ||
101 | QMessageBox::critical(this, | 101 | KMessageBox::error(this | ||
102 | i18n("Error Loading Tiles"), | 102 | , i18nc("%1 is a path to a tileset file", "An error occurred when loading the tileset. %1 and the default tileset have been tried.\nPlease install the KMahjongg library.", Prefs::tileSet()) | ||
103 | i18nc("%1 is a path to a tileset file", "An error occurred when loading the tileset. %1 and the default tileset have been tried.\nPlease install the KMahjongg library.", Prefs::tileSet())); | 103 | , i18n("Error Loading Tiles") | ||
104 | ); | ||||
104 | } | 105 | } | ||
105 | 106 | | |||
106 | // Load background | 107 | // Load background | ||
107 | if (!loadBackground(Prefs::background())) { | 108 | if (!loadBackground(Prefs::background())) { | ||
108 | QMessageBox::critical(this, | 109 | KMessageBox::error(this | ||
109 | i18n("Error Loading Background"), | 110 | , i18nc("%1 is a path to a background image file", "An error occurred when loading the background. %1 and the default background have been tried.\nPlease install the KMahjongg library.", Prefs::background()) | ||
110 | i18nc("%1 is a path to a background image file", "An error occurred when loading the background. %1 and the default background have been tried.\nPlease install the KMahjongg library.", Prefs::background())); | 111 | , i18n("Error Loading Background") | ||
112 | ); | ||||
111 | } | 113 | } | ||
112 | 114 | | |||
113 | // There are tile sets, that have only one tile for e.g. the flowers group. | 115 | // There are tile sets, that have only one tile for e.g. the flowers group. | ||
Context not available. |