|
|
|
@ -334,6 +334,7 @@ int main(int argv, char** argc) try { |
|
|
|
|
bool login(false); |
|
|
|
|
Settings::MimeTypes mimetypes; |
|
|
|
|
QString bookmarks; |
|
|
|
|
bool editbookmarks(false); |
|
|
|
|
QStringList args(app.arguments()); |
|
|
|
|
std::auto_ptr<QSettings> settings |
|
|
|
|
(std::auto_ptr<QSettings>(new QSettings("SwissSign", "SwissBrowser"))); |
|
|
|
@ -359,6 +360,8 @@ int main(int argv, char** argc) try { |
|
|
|
|
" start <tool> for mimetype <mime>\n" |
|
|
|
|
" -b, --bookmarks <file>\n" |
|
|
|
|
" load and save bookmarks from and to <file>\n" |
|
|
|
|
" -e, --edit-bookmarks\n" |
|
|
|
|
" start in bookmark-edition mode\n" |
|
|
|
|
" <url> optional full URL\n" |
|
|
|
|
"Environment:\n" |
|
|
|
|
" LANGUAGE \"de\", \"en\", ... (actual: %5)\n" |
|
|
|
@ -387,6 +390,8 @@ int main(int argv, char** argc) try { |
|
|
|
|
actlib = *it; |
|
|
|
|
} else if ((*it=="-b" || *it=="--bookmarks") && ++it!=args.end()) { |
|
|
|
|
bookmarks = *it; |
|
|
|
|
} else if ((*it=="-e" || *it=="--edit-bookmarks")) { |
|
|
|
|
editbookmarks = true; |
|
|
|
|
} else if ((*it=="-s" || *it=="--settings") && ++it!=args.end()) { |
|
|
|
|
settings = std::auto_ptr<QSettings> |
|
|
|
|
(new QSettings(*it, QSettings::IniFormat)); |
|
|
|
@ -433,6 +438,7 @@ int main(int argv, char** argc) try { |
|
|
|
|
if (env.contains("QTWEBKIT_PLUGIN_PATH")) qt_drt_overwritePluginDirectories(); |
|
|
|
|
Browser browser(actlib, urls, settings.get(), mimetypes, silent, |
|
|
|
|
login, quirks, bookmarks); |
|
|
|
|
if (editbookmarks) browser.on_actionEditBookmarks_triggered(); |
|
|
|
|
return app.exec(); |
|
|
|
|
} catch (std::exception& x) { |
|
|
|
|
std::cerr<<"**** Error: "<<x.what()<<std::endl; |
|
|
|
|