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> | ||||
30 | #include <QMouseEvent> | 31 | #include <QMouseEvent> | ||
31 | #include <QPainter> | 32 | #include <QPainter> | ||
32 | #include <QStandardPaths> | 33 | #include <QStandardPaths> | ||
Context not available. | |||||
97 | void Board::loadSettings() | 98 | void Board::loadSettings() | ||
98 | { | 99 | { | ||
99 | if (!loadTileset(Prefs::tileSet())) { | 100 | if (!loadTileset(Prefs::tileSet())) { | ||
100 | qCWarning(KSHISEN_General) << "An error occurred when loading the tileset. " << Prefs::tileSet() << " and the default tileset have been tried."; | 101 | QMessageBox messageBox; | ||
102 | messageBox.critical(this, | ||||
103 | i18n("Error Loading Tiles"), | ||||
104 | 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())); | ||||
101 | } | 105 | } | ||
102 | 106 | | |||
103 | // Load background | 107 | // Load background | ||
104 | if (!loadBackground(Prefs::background())) { | 108 | if (!loadBackground(Prefs::background())) { | ||
105 | qCWarning(KSHISEN_General) << "An error occurred when loading the background. " << Prefs::background() << " and the default background have been tried."; | 109 | QMessageBox messageBox; | ||
110 | messageBox.critical(this, | ||||
111 | i18n("Error Loading Background"), | ||||
112 | 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::tileSet())); | ||||
106 | } | 113 | } | ||
107 | 114 | | |||
108 | // 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. |