Fixed external browser for Windows.

This commit is contained in:
Martin Rotter 2014-01-19 13:25:16 +01:00
parent 5713b3015d
commit 4f0a4d2120
2 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,10 @@ set(EXE_NAME ${APP_LOW_NAME})
option(USE_QT_5 "Use Qt 5 for building" OFF)
option(BUNDLE_ICON_THEMES "Equip installation with custom icon themes" ON)
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()
if(${USE_QT_5})
cmake_minimum_required(VERSION 2.8.10)
else(${USE_QT_5})

View File

@ -230,7 +230,11 @@ void MessagesView::openSelectedSourceArticlesExternally() {
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url;
#if defined(Q_OS_LINUX)
if (!QProcess::startDetached(browser + ' ' + arguments.arg(link))) {
#else
if (!QProcess::startDetached('\"' + browser + '\"' + ' ' + arguments.arg(link))) {
#endif
QMessageBox::critical(this,
tr("Problem with starting external web browser"),
tr("External web browser could not be started."),