Commit 2146d2c2 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Less auto-casting to QString

GIT_SILENT
parent 9c2df891
......@@ -575,9 +575,9 @@ void Game::saveGame (bool saveAs)
return;
// check filename
QRegExp pattern ("*.kjc", Qt::CaseSensitive, QRegExp::Wildcard);
QRegExp pattern (QStringLiteral("*.kjc"), Qt::CaseSensitive, QRegExp::Wildcard);
if (! pattern.exactMatch (url.fileName())) {
url.setPath(url.path() +".kjc");
url.setPath(url.path() + QLatin1String(".kjc"));
}
#if KIO_VERSION >= QT_VERSION_CHECK(5, 69, 0)
......@@ -817,8 +817,8 @@ void Game::saveProperties (KConfigGroup & config)
int index = x * m_side + y;
owner = QString::asprintf ("%u", m_box->owner (index));
value = QString::asprintf ("%u", m_box->value (index));
list.append (owner.toLatin1());
list.append (value.toLatin1());
list.append (owner);
list.append (value);
config.writeEntry (key, list);
list.clear();
......
......@@ -118,7 +118,7 @@ void KJumpingCube::initKAction() {
actionButton = new QPushButton (this);
actionButton->setObjectName (QStringLiteral("ActionButton"));
// Action button's style sheet: parameters for red, green and clicked colors.
buttonLook =
buttonLook = QStringLiteral(
"QPushButton#ActionButton { color: white; background-color: %1; "
"border-style: outset; border-width: 2px; border-radius: 10px; "
"border-color: beige; font: bold 14px; min-width: 10em; "
......@@ -126,7 +126,7 @@ void KJumpingCube::initKAction() {
"QPushButton#ActionButton:pressed { background-color: %2; "
"border-style: inset; } "
"QPushButton#ActionButton:disabled { color: white;"
"border-color: beige; background-color: steelblue; }";
"border-color: beige; background-color: steelblue; }");
gameMapper->setMapping (actionButton, BUTTON);
connect (actionButton, SIGNAL(clicked()), gameMapper, SLOT(map()));
......@@ -172,9 +172,15 @@ void KJumpingCube::changePlayerColor (int newPlayer)
void KJumpingCube::setAction (const Action a, const bool onOff)
{
// These must match enum Action (see file game.h) and be in the same order.
const char * name [] = {"game_new", "move_hint", "action_button",
"move_undo", "move_redo",
"game_save", "game_saveAs", "game_load"};
static const QString name [] = {
QStringLiteral("game_new"),
QStringLiteral("move_hint"),
QStringLiteral("action_button"),
QStringLiteral("move_undo"),
QStringLiteral("move_redo"),
QStringLiteral("game_save"),
QStringLiteral("game_saveAs"),
QStringLiteral("game_load")};
((QAction *) actionCollection()->action (name [a]))->setEnabled (onOff);
}
......
......@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
KLocalizedString::setApplicationDomain("kjumpingcube");
KAboutData aboutData( QStringLiteral("kjumpingcube"), i18n("KJumpingCube"),
KJC_VERSION, i18n(description), KAboutLicense::GPL,
QStringLiteral(KJC_VERSION), i18n(description), KAboutLicense::GPL,
i18n("(c) 1998-2000, Matthias Kiefer"));
aboutData.setOrganizationDomain(QByteArray("kde.org"));
aboutData.addAuthor(i18n("Matthias Kiefer"),QString(), QStringLiteral("matthias.kiefer@gmx.de"));
......
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