Commit f2169c3b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use not deprecated enum

parent 06d90c49
Pipeline #131944 passed with stage
in 1 minute and 27 seconds
......@@ -99,7 +99,7 @@ KalziumDataObject::KalziumDataObject()
//a settings-dialog where we can select the different iconsets...
QString setname = "school";
QString pathname = QStandardPaths::locate(QStandardPaths::DataLocation, "data/iconsets/", QStandardPaths::LocateDirectory);
QString pathname = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "data/iconsets/", QStandardPaths::LocateDirectory);
QString filename = pathname + setname + '/' + QString::number(i + 1) + ".svg";
......
......@@ -23,7 +23,7 @@ DetailedQmlView::DetailedQmlView(QWidget *parent) : QWidget(parent)
QDeclarativeView *view = new QDeclarativeView(this);
QString qmlPath = QStandardPaths::locate(QStandardPaths::DataLocation, "qml/", QStandardPaths::LocateDirectory);
QString qmlPath = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "qml/", QStandardPaths::LocateDirectory);
m_context = view->rootContext();
......
......@@ -79,7 +79,7 @@ void DetailedGraphicalOverview::paintEvent(QPaintEvent*)
} else if (Prefs::colorschemebox() == 2) { //The iconic view is the 3rd view (0,1,2,...)
pm.fill(palette().window().color());
QString pathname = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/iconsets/"), QStandardPaths::LocateDirectory);
QString pathname = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/iconsets/"), QStandardPaths::LocateDirectory);
int enumii = m_element->dataAsVariant(ChemicalDataObject::atomicNumber).toInt();
......
......@@ -56,10 +56,10 @@ DetailedInfoDlg::DetailedInfoDlg(int el, QWidget *parent) : KPageDialog(parent),
resize(820, 580);
m_baseHtml = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/htmlview/"), QStandardPaths::LocateDirectory);
m_baseHtml2 = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/hazardsymbols/"), QStandardPaths::LocateDirectory);
m_baseHtml = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/htmlview/"), QStandardPaths::LocateDirectory);
m_baseHtml2 = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/hazardsymbols/"), QStandardPaths::LocateDirectory);
//X m_picsdir = QStandardPaths::locate(QStandardPaths::DataLocation, "elempics/") + "elempics/";
//X m_picsdir = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "elempics/") + "elempics/";
//X m_picsdir = QFileInfo(m_picsdir).absolutePath();
// creating the tabs but not the contents, as that will be done when setting the element
......
......@@ -325,7 +325,7 @@ void Kalzium::slotGlossary()
// creating the glossary dialog and loading the glossaries we have
m_glossarydlg = new GlossaryDialog(this);
m_glossarydlg->setObjectName(QStringLiteral("glossary"));
QString dir = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/"), QStandardPaths::LocateDirectory);
QString dir = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/"), QStandardPaths::LocateDirectory);
dir = QFileInfo(dir).absolutePath();
QString picturepath = dir + "/bg.jpg";
QUrl u = QUrl::fromLocalFile(dir + "/knowledge.xml");
......@@ -567,7 +567,7 @@ void Kalzium::elementHover(int num)
void Kalzium::extractIconicInformationAboutElement(int elementNumber)
{
QString setname = QStringLiteral("school");
QString pathname = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/iconsets/"), QStandardPaths::LocateDirectory);
QString pathname = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/iconsets/"), QStandardPaths::LocateDirectory);
pathname = QFileInfo(pathname).absolutePath();
QString filename = pathname + setname + '/' + "iconinformation.txt";
......
......@@ -183,7 +183,7 @@ void KalziumDataObject::loadIconSet()
//a settings-dialog where we can select the different iconsets...
const QString setname = QStringLiteral("school");
QString pathname = QStandardPaths::locate(
QStandardPaths::DataLocation, "data/iconsets/" + setname + '/',
QStandardPaths::AppLocalDataLocation, "data/iconsets/" + setname + '/',
QStandardPaths::LocateDirectory);
QSvgRenderer renderer;
......
......@@ -453,7 +453,7 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X
//X static QString resourcepath;
//X if (resourcepath.isEmpty()) {
//X resourcepath = QStandardPaths::locate(QStandardPaths::DataLocation, "data/latticeicons/");
//X resourcepath = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "data/latticeicons/");
//X }
//X
//X QString filename;
......@@ -502,7 +502,7 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X static QString resourcepath;
//X if (resourcepath.isEmpty())
//X {
//X resourcepath = QStandardPaths::locate(QStandardPaths::DataLocation, "data/latticeicons/");
//X resourcepath = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "data/latticeicons/");
//X }
//X
//X QList<legendPair> ll;
......@@ -547,7 +547,7 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X
//X static QString resourcepath;
//X if (resourcepath.isEmpty()) {
//X resourcepath = QStandardPaths::locate(QStandardPaths::DataLocation, "data/maps/");
//X resourcepath = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "data/maps/");
//X }
//X
//X QString filename;
......@@ -603,7 +603,7 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X {
//X static QString resourcepath;
//X if (resourcepath.isEmpty()) {
//X resourcepath = QStandardPaths::locate(QStandardPaths::DataLocation, "data/maps/");
//X resourcepath = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "data/maps/");
//X }
//X
//X QList<legendPair> ll;
......
......@@ -140,7 +140,7 @@ void MoleculeDialog::slotLoadMolecule()
KMessageBox::information(this, error);
}
m_path = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("data/molecules/"), QStandardPaths::LocateDirectory);
m_path = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/molecules/"), QStandardPaths::LocateDirectory);
QString commonMoleculeFormats = i18n("Common molecule formats");
QString allFiles = i18n("All files");
......
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