Fixed some small issues.

This commit is contained in:
Matthias Koefferlein 2017-09-27 23:25:51 +02:00
parent 4f25f4c81c
commit 368c5cf3ca
2 changed files with 10 additions and 3 deletions

View File

@ -386,8 +386,12 @@ Application::Application (int &argc, char **argv, bool non_ui_mode)
std::string m = tl::to_string (klp_file.absoluteFilePath ());
std::string mn = tl::to_string (klp_file.fileName ());
if (modules.find (mn) == modules.end ()) {
m_native_plugins.push_back (load_plugin (m));
modules.insert (mn);
try {
m_native_plugins.push_back (load_plugin (m));
modules.insert (mn);
} catch (tl::Exception &ex) {
tl::error << tl::to_string (tr ("Unable to load plugin %1: %2").arg (tl::to_qstring (m)).arg (tl::to_qstring (ex.msg ())));
}
}
}
}
@ -894,7 +898,7 @@ Application::scan_global_modules ()
if (rbm_file.exists () && rbm_file.isReadable ()) {
std::string m = tl::to_string (rbm_file.absoluteFilePath ());
if (modules.find (m) == modules.end ()) {
tl::warn << tl::to_string (tr ("Global modules are deprecated. Turn '%1'' into an autorun macro instead and put it into 'macros' or 'pymacros'.").arg (tl::to_qstring (m)));
tl::warn << tl::to_string (tr ("Global modules are deprecated. Turn '%1' into an autorun macro instead and put it into 'macros' or 'pymacros'.").arg (tl::to_qstring (m)));
global_modules.push_back (m);
modules.insert (m);
}

View File

@ -125,6 +125,9 @@ SaltGrain::eff_doc_url () const
return m_doc_url;
}
// force this to become a "file" (for Qt5)
url.setScheme (QString::fromUtf8 ("file"));
QString p = tl::to_qstring (path ());
if (! p.isEmpty ()) {