diff options
author | stingray21 <stingray21@gmx.de> | 2020-05-21 05:44:38 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2020-05-21 21:13:18 +0300 |
commit | d863496f62e6f72933eedc32da01c23f23825f27 (patch) | |
tree | 9bc3be07524e41890fb782708565c429b33138f9 /src/gui | |
parent | bcb64a231fa6ba45a7f42edd3733f70e9a19cfdc (diff) |
Add DB_DIR placeholder for autoopen urls
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/DatabaseWidget.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 980b8d32a..88aaf9565 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1973,15 +1973,16 @@ void DatabaseWidget::processAutoOpen() } QFileInfo filepath; QFileInfo keyfile; + QString databaseUrl = entry->resolveMultiplePlaceholders(entry->url()); - if (entry->url().startsWith("file://")) { - QUrl url(entry->url()); + if (databaseUrl.startsWith("file://")) { + QUrl url(databaseUrl); filepath.setFile(url.toLocalFile()); } else { - filepath.setFile(entry->url()); + filepath.setFile(databaseUrl); if (filepath.isRelative()) { QFileInfo currentpath(m_db->filePath()); - filepath.setFile(currentpath.absoluteDir(), entry->url()); + filepath.setFile(currentpath.absoluteDir(), databaseUrl); } } |