Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Kalzium
Commits
f2169c3b
Commit
f2169c3b
authored
Feb 02, 2022
by
Laurent Montel
😁
Browse files
Use not deprecated enum
parent
06d90c49
Pipeline
#131944
passed with stage
in 1 minute and 27 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plasmoid/applet/nuclearPlasmoid/kalziumdataobject.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
"data/iconsets/"
,
QStandardPaths
::
LocateDirectory
);
QString
filename
=
pathname
+
setname
+
'/'
+
QString
::
number
(
i
+
1
)
+
".svg"
;
...
...
src/detailedQmlView.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
"qml/"
,
QStandardPaths
::
LocateDirectory
);
m_context
=
view
->
rootContext
();
...
...
src/detailedgraphicaloverview.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
QStringLiteral
(
"data/iconsets/"
),
QStandardPaths
::
LocateDirectory
);
int
enumii
=
m_element
->
dataAsVariant
(
ChemicalDataObject
::
atomicNumber
).
toInt
();
...
...
src/detailinfodlg.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
QStringLiteral
(
"data/htmlview/"
),
QStandardPaths
::
LocateDirectory
);
m_baseHtml2
=
QStandardPaths
::
locate
(
QStandardPaths
::
AppLocal
DataLocation
,
QStringLiteral
(
"data/hazardsymbols/"
),
QStandardPaths
::
LocateDirectory
);
//X m_picsdir = QStandardPaths::locate(QStandardPaths::DataLocation, "elempics/") + "elempics/";
//X m_picsdir = QStandardPaths::locate(QStandardPaths::
AppLocal
DataLocation, "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
...
...
src/kalzium.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
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
::
AppLocal
DataLocation
,
QStringLiteral
(
"data/iconsets/"
),
QStandardPaths
::
LocateDirectory
);
pathname
=
QFileInfo
(
pathname
).
absolutePath
();
QString
filename
=
pathname
+
setname
+
'/'
+
"iconinformation.txt"
;
...
...
src/kalziumdataobject.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
"data/iconsets/"
+
setname
+
'/'
,
QStandardPaths
::
LocateDirectory
);
QSvgRenderer
renderer
;
...
...
src/kalziumschemetype.cpp
View file @
f2169c3b
...
...
@@ -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::
AppLocal
DataLocation, "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::
AppLocal
DataLocation, "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::
AppLocal
DataLocation, "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::
AppLocal
DataLocation, "data/maps/");
//X }
//X
//X QList<legendPair> ll;
...
...
src/tools/moleculeview.cpp
View file @
f2169c3b
...
...
@@ -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
::
AppLocal
DataLocation
,
QStringLiteral
(
"data/molecules/"
),
QStandardPaths
::
LocateDirectory
);
QString
commonMoleculeFormats
=
i18n
(
"Common molecule formats"
);
QString
allFiles
=
i18n
(
"All files"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment