Commit d59e12f9 authored by David Faure's avatar David Faure
Browse files

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent ac055d42
......@@ -63,7 +63,7 @@ MyMainView::MyMainView(QWidget *parent)
int i,p;
setMinimumSize(600,400);
random.seed(QRandomGenerator::global()->generate());
QPixmap backgr(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral(MV_BACKGROUND)));
QPixmap backgr(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral(MV_BACKGROUND)));
field.setBackgroundBrush(QBrush(backgr));
view.setCacheMode(QGraphicsView::CacheBackground);
......@@ -83,7 +83,7 @@ MyMainView::MyMainView(QWidget *parent)
minePut[p]=false;
}
svgrender = new QSvgRenderer(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral(MV_SVG_FILE)));
svgrender = new QSvgRenderer(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral(MV_SVG_FILE)));
sun=new SunSprite(svgrender,QStringLiteral( MV_SUN ));
field.addItem(sun);
......
......@@ -67,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(QStandardPaths::locate(QStandardPaths::DataLocation, str));
pix[i]=new QPixmap(QStandardPaths::locate(QStandardPaths::AppDataLocation, str));
}*/
lplayer.setPixmap(*(pplayer[0]));
currentPixmap=0;
//lenergy.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::DataLocation, "sprites/playerinfo/energy.png")));
//lenergy.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::AppDataLocation, "sprites/playerinfo/energy.png")));
lenergy.setPixmap(QIcon::fromTheme( QStringLiteral( "battery" )).pixmap(32,32));;
lwins.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral( "sprites/playerinfo/win.png" ))));
lwins.setPixmap(QPixmap(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral( "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