summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-04-03 13:53:55 (GMT)
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-04-03 13:53:55 (GMT)
commitd0d765ecbe8d5ef796b02390439bddf4f0044546 (patch)
treef9efd0a449bdef74f1b647cab6a8de3d95e3b43e
parentbc63b50061d5c291b76d68f7163d832fbc09dbdb (diff)
Postpone port.
Better have deprecated working code than commented out.
-rw-r--r--src/tools/moleculeview.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/tools/moleculeview.cpp b/src/tools/moleculeview.cpp
index 3f13af4..39563c3 100644
--- a/src/tools/moleculeview.cpp
+++ b/src/tools/moleculeview.cpp
@@ -174,18 +174,17 @@ void MoleculeDialog::slotLoadMolecule()
QString commonMoleculeFormats = i18n("Common molecule formats");
QString allFiles = i18n("All files");
- //FIXME:KF5
-// QString filename = KFileDialog::getOpenFileName(
-// m_path,
-// "*.cml *.xyz *.ent *.pdb *.alc *.chm *.cdx *.cdxml *.c3d1 *.c3d2"
-// " *.gpr *.mdl *.mol *.sdf *.sd *.crk3d *.cht *.dmol *.bgf"
-// " *.gam *.inp *.gamin *.gamout *.tmol *.fract"
-// " *.mpd *.mol2|" + commonMoleculeFormats + "\n"
-// "* *.*|" + allFiles,
-// this,
-// i18n("Choose a file to open"));
-//
-// loadMolecule(filename);
+ QString filename = KFileDialog::getOpenFileName(
+ QUrl::fromLocalFile(m_path),
+ "*.cml *.xyz *.ent *.pdb *.alc *.chm *.cdx *.cdxml *.c3d1 *.c3d2"
+ " *.gpr *.mdl *.mol *.sdf *.sd *.crk3d *.cht *.dmol *.bgf"
+ " *.gam *.inp *.gamin *.gamout *.tmol *.fract"
+ " *.mpd *.mol2|" + commonMoleculeFormats + "\n"
+ "* *.*|" + allFiles,
+ this,
+ i18n("Choose a file to open"));
+
+ loadMolecule(filename);
}
void MoleculeDialog::loadMolecule(const QString &filename)