Commit b8b84d87 authored by Luigi Toscano's avatar Luigi Toscano

Port KStandardDirs to QStandardPaths

parent 458f268e
......@@ -32,7 +32,7 @@
#include <kactioncollection.h>
#include <kglobalsettings.h>
#include <KLocalizedString>
#include <kstandarddirs.h>
#include <ktoggleaction.h>
#include <kconfiggroup.h>
......@@ -41,6 +41,8 @@
#include <KGlobal>
#include <KShortcut>
#include <QFontDatabase>
#include <QStandardPaths>
#include <KSharedConfig>
#include "ai.h"
#include "options.h"
......@@ -68,7 +70,7 @@ MyMainView::MyMainView(QWidget *parent)
int i,p;
setMinimumSize(600,400);
random.setSeed(0);
QPixmap backgr(KStandardDirs::locate("appdata",QLatin1String( MV_BACKGROUND) ));
QPixmap backgr(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String(MV_BACKGROUND)));
field.setBackgroundBrush(QBrush(backgr));
view.setCacheMode(QGraphicsView::CacheBackground);
......@@ -88,7 +90,7 @@ MyMainView::MyMainView(QWidget *parent)
minePut[p]=false;
}
svgrender = new QSvgRenderer(KStandardDirs::locate("appdata",QLatin1String( MV_SVG_FILE )));
svgrender = new QSvgRenderer(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String(MV_SVG_FILE)));
sun=new SunSprite(svgrender,QLatin1String( MV_SUN ));
field.addItem(sun);
......
......@@ -19,7 +19,8 @@
#include <QIcon>
#include <KLocalizedString>
#include <kstandarddirs.h>
#include <QStandardPaths>
QPixmap* PlayerInfo::pplayer[6];
......@@ -66,14 +67,14 @@ PlayerInfo::PlayerInfo(int pnr,QWidget *parent)
str = QString::fromLatin1("sprites/playerinfo/ship%1%2.png")
.arg(pnr+1)
.arg(i);
pix[i]=new QPixmap(KStandardDirs::locate("appdata", str));
pix[i]=new QPixmap(QStandardPaths::locate(QStandardPaths::DataLocation, str));
}*/
lplayer.setPixmap(*(pplayer[0]));
currentPixmap=0;
//lenergy.setPixmap(QPixmap(KStandardDirs::locate("appdata", "sprites/playerinfo/energy.png")));
//lenergy.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::DataLocation, "sprites/playerinfo/energy.png")));
lenergy.setPixmap(QIcon::fromTheme( QLatin1String( "battery" )).pixmap(32,32));;
lwins.setPixmap(QPixmap(KStandardDirs::locate("appdata", QLatin1String( "sprites/playerinfo/win.png" ))));
lwins.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "sprites/playerinfo/win.png" ))));
hitpoints.setGeometry(9,45,26,26);
energy.setGeometry(9,120,26,26);
......
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