Hello community, here is the log from the commit of package katomic for openSUSE:Factory checked in at 2016-01-10 13:04:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/katomic (Old) and /work/SRC/openSUSE:Factory/.katomic.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "katomic" Changes: -------- --- /work/SRC/openSUSE:Factory/katomic/katomic.changes 2015-11-15 12:31:13.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.katomic.new/katomic.changes 2016-01-10 13:04:30.000000000 +0100 @@ -1,0 +2,9 @@ +Sun Dec 13 13:09:53 UTC 2015 - [email protected] + +- Update to KDE Applications 15.12.0 + * KDE Applications 15.12.0 + * https://www.kde.org/announcements/announce-applications-15.12.0.php + * boo#958887 + + +------------------------------------------------------------------- Old: ---- katomic-15.08.3.tar.xz New: ---- katomic-15.12.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ katomic.spec ++++++ --- /var/tmp/diff_new_pack.gVv30t/_old 2016-01-10 13:04:31.000000000 +0100 +++ /var/tmp/diff_new_pack.gVv30t/_new 2016-01-10 13:04:31.000000000 +0100 @@ -39,7 +39,7 @@ License: GPL-2.0+ Group: Amusements/Games/Board/Puzzle Url: http://www.kde.org -Version: 15.08.3 +Version: 15.12.0 Release: 0 Source0: katomic-%{version}.tar.xz Obsoletes: %{name}5 < %{version} ++++++ katomic-15.08.3.tar.xz -> katomic-15.12.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/CMakeLists.txt new/katomic-15.12.0/CMakeLists.txt --- old/katomic-15.08.3/CMakeLists.txt 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/CMakeLists.txt 2015-11-11 10:35:15.000000000 +0100 @@ -11,16 +11,11 @@ CoreAddons Config WidgetsAddons - Config I18n - GuiAddons - ConfigWidgets - ItemViews - IconThemes XmlGui - KIO - NotifyConfig NewStuff + DocTools + DBusAddons ) find_package(KF5KDEGames 4.9.0 REQUIRED) @@ -59,7 +54,7 @@ ecm_add_app_icon(katomic_SRCS ICONS ${ICONS_SRCS}) add_executable(katomic ${katomic_SRCS}) -target_link_libraries(katomic KF5::KIOCore KF5::NewStuff KF5KDEGames KF5::I18n KF5::DBusAddons KF5::NewStuff) +target_link_libraries(katomic KF5::NewStuff KF5KDEGames KF5::I18n KF5::DBusAddons KF5::NewStuff) install(TARGETS katomic ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/chooselevelsetdialog.cpp new/katomic-15.12.0/chooselevelsetdialog.cpp --- old/katomic-15.08.3/chooselevelsetdialog.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/chooselevelsetdialog.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -60,7 +60,7 @@ m_ui.m_lwLevelSets->setItemDelegate(new LevelSetDelegate(this)); m_ui.m_lwLevelSets->setSortingEnabled(true); - m_ui.m_pbNewStuff->setConfigFile("katomic.knsrc"); + m_ui.m_pbNewStuff->setConfigFile(QStringLiteral("katomic.knsrc")); mainLayout->addWidget(chooseWidget); mainLayout->addWidget(m_buttonBox); @@ -84,7 +84,7 @@ { m_ui.m_lwLevelSets->clear(); QStringList fileList; - const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, "levels", QStandardPaths::LocateDirectory); + const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("levels"), QStandardPaths::LocateDirectory); Q_FOREACH (const QString& dir, dirs) { const QStringList fileNames = QDir(dir).entryList(QStringList() << QStringLiteral("*.dat")); Q_FOREACH (const QString& file, fileNames) { @@ -100,7 +100,7 @@ if (!visibleName.isEmpty()) { QListWidgetItem* item = new QListWidgetItem; - item->setIcon(QIcon::fromTheme( QLatin1String( "katomic" ))); + item->setIcon(QIcon::fromTheme( QStringLiteral( "katomic" ))); item->setText(visibleName); item->setData(KAtomic::LevelSetNameRole, ls.name()); item->setData(KAtomic::LevelSetDescriptionRole, ls.description()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/fielditem.cpp new/katomic-15.12.0/fielditem.cpp --- old/katomic-15.08.3/fielditem.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/fielditem.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -117,53 +117,53 @@ void AtomFieldItem::fillNameHashes() { - s_names['1'] = "atom_H"; - s_names['2'] = "atom_C"; - s_names['3'] = "atom_O"; - s_names['4'] = "atom_N"; - s_names['5'] = "atom_S"; - s_names['6'] = "atom_F"; - s_names['7'] = "atom_Cl"; - s_names['8'] = "atom_Br"; - s_names['9'] = "atom_P"; - s_names['0'] = "atom_J"; - s_names['o'] = "atom_Crystal"; - s_names['A'] = "connector_Hor"; - s_names['B'] = "connector_Slash"; - s_names['C'] = "connector_Ver"; - s_names['D'] = "connector_Backslash"; - s_names['#'] = "wall"; - s_names['<'] = "arrow_Left"; - s_names['>'] = "arrow_Right"; - s_names['^'] = "arrow_Up"; - s_names['_'] = "arrow_Down"; - s_names['E'] = "atom_flask0"; - s_names['F'] = "atom_flask1"; - s_names['G'] = "atom_flask2"; - s_names['H'] = "atom_flask3"; - s_names['I'] = "atom_flask4"; - s_names['J'] = "atom_flask5"; - s_names['K'] = "atom_flask6"; - s_names['L'] = "atom_flask7"; + s_names['1'] = QStringLiteral("atom_H"); + s_names['2'] = QStringLiteral("atom_C"); + s_names['3'] = QStringLiteral("atom_O"); + s_names['4'] = QStringLiteral("atom_N"); + s_names['5'] = QStringLiteral("atom_S"); + s_names['6'] = QStringLiteral("atom_F"); + s_names['7'] = QStringLiteral("atom_Cl"); + s_names['8'] = QStringLiteral("atom_Br"); + s_names['9'] = QStringLiteral("atom_P"); + s_names['0'] = QStringLiteral("atom_J"); + s_names['o'] = QStringLiteral("atom_Crystal"); + s_names['A'] = QStringLiteral("connector_Hor"); + s_names['B'] = QStringLiteral("connector_Slash"); + s_names['C'] = QStringLiteral("connector_Ver"); + s_names['D'] = QStringLiteral("connector_Backslash"); + s_names['#'] = QStringLiteral("wall"); + s_names['<'] = QStringLiteral("arrow_Left"); + s_names['>'] = QStringLiteral("arrow_Right"); + s_names['^'] = QStringLiteral("arrow_Up"); + s_names['_'] = QStringLiteral("arrow_Down"); + s_names['E'] = QStringLiteral("atom_flask0"); + s_names['F'] = QStringLiteral("atom_flask1"); + s_names['G'] = QStringLiteral("atom_flask2"); + s_names['H'] = QStringLiteral("atom_flask3"); + s_names['I'] = QStringLiteral("atom_flask4"); + s_names['J'] = QStringLiteral("atom_flask5"); + s_names['K'] = QStringLiteral("atom_flask6"); + s_names['L'] = QStringLiteral("atom_flask7"); - s_bondNames['a'] = "bond_I_Top"; - s_bondNames['b'] = "bond_I_TopRight"; - s_bondNames['c'] = "bond_I_Right"; - s_bondNames['d'] = "bond_I_BotRight"; - s_bondNames['e'] = "bond_I_Bottom"; - s_bondNames['f'] = "bond_I_BotLeft"; - s_bondNames['g'] = "bond_I_Left"; - s_bondNames['h'] = "bond_I_TopLeft"; + s_bondNames['a'] = QStringLiteral("bond_I_Top"); + s_bondNames['b'] = QStringLiteral("bond_I_TopRight"); + s_bondNames['c'] = QStringLiteral("bond_I_Right"); + s_bondNames['d'] = QStringLiteral("bond_I_BotRight"); + s_bondNames['e'] = QStringLiteral("bond_I_Bottom"); + s_bondNames['f'] = QStringLiteral("bond_I_BotLeft"); + s_bondNames['g'] = QStringLiteral("bond_I_Left"); + s_bondNames['h'] = QStringLiteral("bond_I_TopLeft"); - s_bondNames['A'] = "bond_II_Top"; - s_bondNames['B'] = "bond_II_Right"; - s_bondNames['C'] = "bond_II_Bottom"; - s_bondNames['D'] = "bond_II_Left"; + s_bondNames['A'] = QStringLiteral("bond_II_Top"); + s_bondNames['B'] = QStringLiteral("bond_II_Right"); + s_bondNames['C'] = QStringLiteral("bond_II_Bottom"); + s_bondNames['D'] = QStringLiteral("bond_II_Left"); - s_bondNames['E'] = "bond_III_Top"; - s_bondNames['F'] = "bond_III_Right"; - s_bondNames['G'] = "bond_III_Bottom"; - s_bondNames['H'] = "bond_III_Left"; + s_bondNames['E'] = QStringLiteral("bond_III_Top"); + s_bondNames['F'] = QStringLiteral("bond_III_Right"); + s_bondNames['G'] = QStringLiteral("bond_III_Bottom"); + s_bondNames['H'] = QStringLiteral("bond_III_Left"); } QPixmap AtomFieldItem::renderAtom( KGameRenderer* renderer, const atom& at, int size ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/gamewidget.cpp new/katomic-15.12.0/gamewidget.cpp --- old/katomic-15.08.3/gamewidget.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/gamewidget.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -201,7 +201,7 @@ void GameWidget::saveGame() { - QString fileName = QFileDialog::getSaveFileName( this, QString(), QString(), "*.katomic" ); + QString fileName = QFileDialog::getSaveFileName( this, QString(), QString(), QStringLiteral("*.katomic") ); if(fileName.isEmpty()) return; KConfig config(fileName, KConfig::SimpleConfig); @@ -213,7 +213,7 @@ void GameWidget::loadGame() { - QString fileName = QFileDialog::getOpenFileName( this, QString(), QString(), "*.katomic" ); + QString fileName = QFileDialog::getOpenFileName( this, QString(), QString(), QStringLiteral("*.katomic") ); if(fileName.isEmpty()) return; KConfig config(fileName, KConfig::SimpleConfig); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/levels/default_levels.dat new/katomic-15.12.0/levels/default_levels.dat --- old/katomic-15.08.3/levels/default_levels.dat 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/levels/default_levels.dat 2015-11-11 10:35:15.000000000 +0100 @@ -93,6 +93,7 @@ Name[de]=Wasser Name[el]=Νερό Name[en_GB]=Water +Name[eo]=Akvo Name[es]=Agua Name[et]=Vesi Name[fi]=Vesi @@ -2526,7 +2527,7 @@ Name[fr]=Styrène Name[ga]=Stiréin Name[gl]=Estireno -Name[hu]=Sztirén +Name[hu]=Sztirol Name[is]=Stýren Name[it]=Stirene Name[kk]=Стирен @@ -2836,7 +2837,7 @@ Name[fr]=Acide acétylsalicylique Name[ga]=Aigéad salaicileach aicéitileach Name[gl]=Ácido acetilsalicílico -Name[hu]=Acetil szalicil sav +Name[hu]=Acetil-szalicilsav Name[it]=Acido acetilsalicilico Name[kk]=Ацетилсалицид қышқылы Name[km]=អាស៊ីតអាសេទីលសាលីស៊ីលិច @@ -3066,7 +3067,7 @@ Name[fr]=Acide malonique Name[ga]=Aigéad Malónach Name[gl]=Ácido malónico (a. propanodioico) -Name[hu]=Malonát sav +Name[hu]=Malonsav Name[it]=Acido malonico Name[kk]=Малон қышқылы Name[km]=អាស៊ីតម៉ាឡូនិច @@ -3137,7 +3138,7 @@ Name[fr]=2,2-diméthylpropane Name[ga]=2,2-Démheitilprópán Name[gl]=2,2-dimetilpropano (neopentano) -Name[hu]=2,2-Dimetilpropán +Name[hu]=2,2-Dimetil propán Name[it]=2,2-dimetilpropano Name[kk]=2,2-диметилпропан Name[km]=២,២-ឌីមេទីលប្រូប៉ាន @@ -5824,7 +5825,7 @@ Name[fr]=Acide malonique Name[ga]=Aigéad Malónach Name[gl]=Ácido malónico (a. propanodioico) -Name[hu]=Malonát sav +Name[hu]=Malonsav Name[it]=Acido malonico Name[kk]=Малон қышқылы Name[km]=អាស៊ីតម៉ាឡូនិច diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/levelset.cpp new/katomic-15.12.0/levelset.cpp --- old/katomic-15.08.3/levelset.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/levelset.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -100,7 +100,7 @@ bool LevelSet::load(const QString& levelSetName) { - QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QString("levels/%1.dat").arg(levelSetName)); + QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("levels/%1.dat").arg(levelSetName)); if (file.isEmpty()) { qDebug() << "level set \"" << levelSetName << "\" data file not found. Check your installation"; @@ -242,7 +242,7 @@ current.obj = value.at(0).toLatin1(); value = value.mid(2); - strncpy(current.conn, value.toAscii(), sizeof(current.conn)); + strncpy(current.conn, value.toLatin1(), sizeof(current.conn)); if (mol->m_atoms.indexOf(current) != -1) qWarning() << "OOOPS, duplicate atom definition in" << key; @@ -288,7 +288,7 @@ bool LevelSet::isDefaultLevelsAvailable() { - QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QString("levels/%1.dat").arg(DEFAULT_LEVELSET_NAME)); + QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("levels/%1.dat").arg(DEFAULT_LEVELSET_NAME)); if (file.isEmpty()) { //qDebug() << "default level set \"" << DEFAULT_LEVELSET_NAME << "\" data file not found. Check your installation"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/levelsetdelegate.cpp new/katomic-15.12.0/levelsetdelegate.cpp --- old/katomic-15.08.3/levelsetdelegate.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/levelsetdelegate.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -96,7 +96,7 @@ QString text = i18n("by %1", authorName); QString authorEmail = index.data(KAtomic::LevelSetAuthorEmailRole).toString(); if (!authorEmail.isEmpty()) - text.append(QString::fromLatin1(" <%1>").arg(authorEmail)); + text.append(QStringLiteral(" <%1>").arg(authorEmail)); int numLevels = index.data(KAtomic::LevelSetLevelCountRole).toUInt(); text.append(i18np(", contains 1 level", ", contains %1 levels", numLevels)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/main.cpp new/katomic-15.12.0/main.cpp --- old/katomic-15.08.3/main.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/main.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -52,31 +52,32 @@ migrate.setUiFiles(QStringList() << QStringLiteral("katomicui.rc")); migrate.migrate(); KLocalizedString::setApplicationDomain("katomic"); - KAboutData aboutData( "katomic", i18n("KAtomic"), + KAboutData aboutData( QStringLiteral("katomic"), i18n("KAtomic"), version, i18n(description), KAboutLicense::GPL, - i18n("(c) 1998, Andreas Wuest\n(c) 2007-2009 Dmitry Suzdalev"), "http://games.kde.org/katomic" ); - aboutData.addAuthor(i18n("Andreas Wuest"), i18n("Original author"), "[email protected]"); - aboutData.addAuthor(i18n("Dmitry Suzdalev"), i18n("Porting to KDE4. Current maintainer"), "[email protected]"); - aboutData.addAuthor(i18n("Stephan Kulow"), QString(), "[email protected]"); - aboutData.addAuthor(i18n("Cristian Tibirna"), QString(), "[email protected]"); - aboutData.addCredit(i18n("Carsten Pfeiffer"), QString(), "[email protected]"); - aboutData.addCredit(i18n("Dave Corrie"), QString(), "[email protected]"); - aboutData.addCredit(i18n("Kai Jung"), i18n("6 new levels"), "[email protected]"); - aboutData.addCredit(i18n("Danny Allen"), i18n("Game graphics and application icon"), "[email protected]"); - aboutData.addCredit(i18n("Johann Ollivier Lapeyre"), i18n("New great SVG artwork for KDE4"), "[email protected]"); - aboutData.addCredit(i18n("Brian Croom"), i18n("Port to use KGameRenderer"), "[email protected]"); + i18n("(c) 1998, Andreas Wuest\n(c) 2007-2009 Dmitry Suzdalev")); + aboutData.addAuthor(i18n("Andreas Wuest"), i18n("Original author"), QStringLiteral("[email protected]")); + aboutData.addAuthor(i18n("Dmitry Suzdalev"), i18n("Porting to KDE4. Current maintainer"), QStringLiteral("[email protected]")); + aboutData.addAuthor(i18n("Stephan Kulow"), QString(), QStringLiteral("[email protected]")); + aboutData.addAuthor(i18n("Cristian Tibirna"), QString(), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Carsten Pfeiffer"), QString(), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Dave Corrie"), QString(), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Kai Jung"), i18n("6 new levels"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Danny Allen"), i18n("Game graphics and application icon"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Johann Ollivier Lapeyre"), i18n("New great SVG artwork for KDE4"), QStringLiteral("[email protected]")); + aboutData.addCredit(i18n("Brian Croom"), i18n("Port to use KGameRenderer"), QStringLiteral("[email protected]")); + aboutData.setHomepage(QStringLiteral("http://games.kde.org/katomic")); QCommandLineParser parser; KAboutData::setApplicationData(aboutData); parser.addVersionOption(); parser.addHelpOption(); - parser.addOption(QCommandLineOption(QStringList() << QLatin1String("hackmode"), i18n( "Enable access to all levels" ))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("hackmode"), i18n( "Enable access to all levels" ))); aboutData.setupCommandLine(&parser); parser.process(app); aboutData.processCommandLine(&parser); - app.setWindowIcon(QIcon::fromTheme(QLatin1String("katomic"))); + app.setWindowIcon(QIcon::fromTheme(QStringLiteral("katomic"))); KDBusService service; if (!LevelSet::isDefaultLevelsAvailable()) @@ -90,7 +91,7 @@ RESTORE(AtomTopLevel) else { AtomTopLevel *top = new AtomTopLevel; - if ( parser.isSet( "hackmode" ) ) + if ( parser.isSet( QStringLiteral("hackmode") ) ) top->enableHackMode(); top->show(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/playfield.cpp new/katomic-15.12.0/playfield.cpp --- old/katomic-15.08.3/playfield.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/playfield.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -47,7 +47,7 @@ { Theme() : KgTheme("pics/default_theme.desktop") { - setGraphicsPath(QStandardPaths::locate(QStandardPaths::DataLocation, "pics/default_theme.svgz")); + setGraphicsPath(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("pics/default_theme.svgz"))); } }; @@ -156,7 +156,7 @@ void PlayField::updateBackground() { - setBackgroundBrush(m_renderer.spritePixmap("background", sceneRect().size().toSize())); + setBackgroundBrush(m_renderer.spritePixmap(QStringLiteral("background"), sceneRect().size().toSize())); } void PlayField::resize( int width, int height) @@ -211,14 +211,14 @@ while(1) { - AtomFieldItem* item = 0; for(int y=ys; y<FIELD_SIZE; ++y ) { int px = toPixX(x)+m_elemSize/2; int py = toPixY(y)+m_elemSize/2; - item = qgraphicsitem_cast<AtomFieldItem*>( itemAt(px, py) ); - if( item != 0 ) + const QList<QGraphicsItem *> itemsAtPoint = items(QPointF(px, py)); + if( !itemsAtPoint.isEmpty() ) { + AtomFieldItem* item = qgraphicsitem_cast<AtomFieldItem*>( itemsAtPoint[0] ); m_selIdx = m_atoms.indexOf(item); updateArrows(); // if this atom can't move, we won't return - we'll search further @@ -254,21 +254,24 @@ while(1) { - AtomFieldItem* item = 0; for(int y=ys; y>=0; --y ) { int px = toPixX(x)+m_elemSize/2; int py = toPixY(y)+m_elemSize/2; - item = qgraphicsitem_cast<AtomFieldItem*>( itemAt(px, py) ); - if( item != 0 && item->atomNum() != -1 ) + const QList<QGraphicsItem *> itemsAtPoint = items(QPointF(px, py)); + if( !itemsAtPoint.isEmpty() ) { - m_selIdx = m_atoms.indexOf(item); - updateArrows(); - // if this atom can't move, we won't return - we'll search further - // until we found moveable one - if( m_upArrow->isVisible() || m_rightArrow->isVisible() - || m_downArrow->isVisible() || m_leftArrow->isVisible() ) - return; + AtomFieldItem* item = qgraphicsitem_cast<AtomFieldItem*>( itemsAtPoint[0] ); + if ( item->atomNum() != -1 ) + { + m_selIdx = m_atoms.indexOf(item); + updateArrows(); + // if this atom can't move, we won't return - we'll search further + // until we found moveable one + if( m_upArrow->isVisible() || m_rightArrow->isVisible() + || m_downArrow->isVisible() || m_leftArrow->isVisible() ) + return; + } } } x--; @@ -420,11 +423,11 @@ if( isAnimating() || m_levelFinished ) return; - QGraphicsItem* clickedItem = itemAt(ev->scenePos()); - if(!clickedItem) + const QList<QGraphicsItem *> itemsAtPoint = items(ev->scenePos()); + if(itemsAtPoint.isEmpty()) return; - AtomFieldItem *atomItem = qgraphicsitem_cast<AtomFieldItem*>(clickedItem); + AtomFieldItem *atomItem = qgraphicsitem_cast<AtomFieldItem*>(itemsAtPoint[0]); if( atomItem ) // that is: atom selected { m_selIdx = m_atoms.indexOf( atomItem ); @@ -432,7 +435,7 @@ return; } - ArrowFieldItem *arrowItem = qgraphicsitem_cast<ArrowFieldItem*>(clickedItem); + ArrowFieldItem *arrowItem = qgraphicsitem_cast<ArrowFieldItem*>(itemsAtPoint[0]); if( arrowItem == m_upArrow ) { moveSelectedAtom( Up ); @@ -681,7 +684,7 @@ return; } - QPixmap aPix = m_renderer.spritePixmap("wall", QSize(m_elemSize, m_elemSize)); + QPixmap aPix = m_renderer.spritePixmap(QStringLiteral("wall"), QSize(m_elemSize, m_elemSize)); for (int i = 0; i < FIELD_SIZE; i++) for (int j = 0; j < FIELD_SIZE; j++) if(m_levelData->containsWallAt(i,j)) @@ -704,7 +707,7 @@ // we'll write pos through using QPoint // I'd use QPair but it isn't supported by QVariant QPoint pos(m_atoms.at(idx)->fieldX(), m_atoms.at(idx)->fieldY()); - config.writeEntry( QString("Atom_%1").arg(idx), pos); + config.writeEntry( QStringLiteral("Atom_%1").arg(idx), pos); } // save undo history @@ -717,7 +720,7 @@ // atomIdx, direction, numCells QList<int> move; move << mv.atomIdx << static_cast<int>(mv.dir) << mv.numCells; - config.writeEntry( QString("Move_%1").arg(i), move ); + config.writeEntry( QStringLiteral("Move_%1").arg(i), move ); } config.writeEntry("SelectedAtom", m_selIdx); config.writeEntry("LevelFinished", m_levelFinished ); @@ -731,7 +734,7 @@ // read atom positions for(int idx=0; idx<m_atoms.count(); ++idx) { - QPoint pos = config.readEntry( QString("Atom_%1").arg(idx), QPoint() ); + QPoint pos = config.readEntry( QStringLiteral("Atom_%1").arg(idx), QPoint() ); m_atoms.at(idx)->setFieldXY(pos.x(), pos.y()); m_atoms.at(idx)->setPos( toPixX(pos.x()), toPixY(pos.y()) ); } @@ -741,7 +744,7 @@ AtomMove mv; for(int i=0;i<m_numMoves;++i) { - QList<int> move = config.readEntry( QString("Move_%1").arg(i), QList<int>() ); + QList<int> move = config.readEntry( QStringLiteral("Move_%1").arg(i), QList<int>() ); mv.atomIdx = move.at(0); mv.dir = static_cast<Direction>(move.at(1)); mv.numCells = move.at(2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/katomic-15.08.3/toplevel.cpp new/katomic-15.12.0/toplevel.cpp --- old/katomic-15.08.3/toplevel.cpp 2015-11-04 20:56:50.000000000 +0100 +++ new/katomic-15.12.0/toplevel.cpp 2015-11-11 10:35:15.000000000 +0100 @@ -25,7 +25,6 @@ #include <KLocalizedString> #include <kconfig.h> -#include <kstandardaction.h> #include <kstandardgameaction.h> #include <kselectaction.h> #include <kactioncollection.h> @@ -48,7 +47,7 @@ lastPlayedLevelSet = DEFAULT_LEVELSET_NAME; m_gameWid = new GameWidget( lastPlayedLevelSet, this); - m_gameWid->setObjectName( QLatin1String("gamewidget" )); + m_gameWid->setObjectName( QStringLiteral("gamewidget" )); createMenu(); loadSettings(); setCentralWidget(m_gameWid); @@ -100,39 +99,39 @@ m_redoAct = KStandardGameAction::redo(m_gameWid->playfield(), SLOT(redo()), actionCollection()); - m_prevLevelAct = actionCollection()->addAction( QLatin1String( "prev_level" ) ); - m_prevLevelAct->setIcon( QIcon::fromTheme( QLatin1String( "arrow-left" ) ) ); + m_prevLevelAct = actionCollection()->addAction( QStringLiteral( "prev_level" ) ); + m_prevLevelAct->setIcon( QIcon::fromTheme( QStringLiteral( "arrow-left" ) ) ); m_prevLevelAct->setText( i18n( "Previous Level" ) ); actionCollection()->setDefaultShortcut(m_prevLevelAct, Qt::CTRL + Qt::Key_P ); addAction( m_prevLevelAct ); connect( m_prevLevelAct, SIGNAL(triggered(bool)), m_gameWid, SLOT(prevLevel()) ); - m_nextLevelAct = actionCollection()->addAction( QLatin1String( "next_level" ) ); - m_nextLevelAct->setIcon( QIcon::fromTheme( QLatin1String( "arrow-right" ) ) ); + m_nextLevelAct = actionCollection()->addAction( QStringLiteral( "next_level" ) ); + m_nextLevelAct->setIcon( QIcon::fromTheme( QStringLiteral( "arrow-right" ) ) ); m_nextLevelAct->setText( i18n( "Next Level" ) ); actionCollection()->setDefaultShortcut(m_nextLevelAct, Qt::CTRL + Qt::Key_N ); addAction( m_nextLevelAct ); connect( m_nextLevelAct, SIGNAL(triggered(bool)), m_gameWid, SLOT(nextLevel()) ); - QAction* chooseLevelSet = actionCollection()->addAction( QLatin1String( "choose_level_set" ) ); + QAction* chooseLevelSet = actionCollection()->addAction( QStringLiteral( "choose_level_set" ) ); chooseLevelSet->setText( i18n( "Choose level set..." ) ); addAction( chooseLevelSet ); connect(chooseLevelSet, &QAction::triggered, this, &AtomTopLevel::chooseLevelSet); m_animSpeedAct = new KSelectAction(i18n("Animation Speed"), this); - actionCollection()->addAction( QLatin1String( "anim_speed" ), m_animSpeedAct); + actionCollection()->addAction( QStringLiteral( "anim_speed" ), m_animSpeedAct); QStringList acts; acts << i18n("Slow") << i18n("Normal") << i18n("Fast"); m_animSpeedAct->setItems(acts); connect(m_animSpeedAct, static_cast<void (KSelectAction::*)(int)>(&KSelectAction::triggered), this, &AtomTopLevel::slotAnimSpeedChanged); - QAction *undoAll = actionCollection()->addAction( QLatin1String( "move_undo_all" ) ); - undoAll->setIcon( QIcon::fromTheme( QLatin1String( "media-skip-backward" )) ); + QAction *undoAll = actionCollection()->addAction( QStringLiteral( "move_undo_all" ) ); + undoAll->setIcon( QIcon::fromTheme( QStringLiteral( "media-skip-backward" )) ); undoAll->setText( i18n("Undo All") ); connect( undoAll, SIGNAL(triggered(bool)), m_gameWid->playfield(), SLOT(undoAll()) ); - QAction *redoAll = actionCollection()->addAction( QLatin1String( "move_redo_all" ) ); - redoAll->setIcon( QIcon::fromTheme( QLatin1String( "media-skip-forward" )) ); + QAction *redoAll = actionCollection()->addAction( QStringLiteral( "move_redo_all" ) ); + redoAll->setIcon( QIcon::fromTheme( QStringLiteral( "media-skip-forward" )) ); redoAll->setText( i18n("Redo All") ); connect( redoAll, SIGNAL(triggered(bool)), m_gameWid->playfield(), SLOT(redoAll()) ); @@ -146,37 +145,37 @@ connect (m_gameWid->playfield(), SIGNAL (enableUndo(bool)), undoAll, SLOT(setEnabled(bool))); connect (m_gameWid->playfield(), SIGNAL (enableRedo(bool)), redoAll, SLOT(setEnabled(bool))); - QAction * atomUpAct = actionCollection()->addAction( QLatin1String( "atom_up" )); + QAction * atomUpAct = actionCollection()->addAction( QStringLiteral( "atom_up" )); atomUpAct->setText(i18n("Atom Up")); actionCollection()->setDefaultShortcut(atomUpAct, Qt::Key_Up); addAction(atomUpAct); connect(atomUpAct, &QAction::triggered, m_gameWid, &GameWidget::moveUp); - QAction * atomDownAct = actionCollection()->addAction( QLatin1String( "atom_down" )); + QAction * atomDownAct = actionCollection()->addAction( QStringLiteral( "atom_down" )); atomDownAct->setText(i18n("Atom Down")); actionCollection()->setDefaultShortcut(atomDownAct,Qt::Key_Down); addAction(atomDownAct); connect(atomDownAct, &QAction::triggered, m_gameWid, &GameWidget::moveDown); - QAction * atomLeftAct = actionCollection()->addAction( QLatin1String( "atom_left" )); + QAction * atomLeftAct = actionCollection()->addAction( QStringLiteral( "atom_left" )); atomLeftAct->setText(i18n("Atom Left")); actionCollection()->setDefaultShortcut(atomLeftAct,Qt::Key_Left); addAction(atomLeftAct); connect(atomLeftAct, &QAction::triggered, m_gameWid, &GameWidget::moveLeft); - QAction * atomRightAct = actionCollection()->addAction( QLatin1String( "atom_right" )); + QAction * atomRightAct = actionCollection()->addAction( QStringLiteral( "atom_right" )); atomRightAct->setText(i18n("Atom Right")); actionCollection()->setDefaultShortcut(atomRightAct,Qt::Key_Right); addAction(atomRightAct); connect(atomRightAct, &QAction::triggered, m_gameWid, &GameWidget::moveRight); - QAction * nextAtomAct = actionCollection()->addAction( QLatin1String( "next_atom" )); + QAction * nextAtomAct = actionCollection()->addAction( QStringLiteral( "next_atom" )); nextAtomAct->setText(i18n("Next Atom")); actionCollection()->setDefaultShortcut(nextAtomAct,Qt::Key_Tab); addAction(nextAtomAct); connect(nextAtomAct, SIGNAL(triggered(bool)), m_gameWid->playfield(), SLOT(nextAtom())); - QAction * prevAtomAct = actionCollection()->addAction( QLatin1String( "prev_atom" )); + QAction * prevAtomAct = actionCollection()->addAction( QStringLiteral( "prev_atom" )); prevAtomAct->setText(i18n("Previous Atom")); actionCollection()->setDefaultShortcut(prevAtomAct,Qt::SHIFT+Qt::Key_Tab); addAction(prevAtomAct);
