Skip to content

Commit

Permalink
Merge fa46f06 into 5ea5974
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Dec 14, 2018
2 parents 5ea5974 + fa46f06 commit eda40b6
Show file tree
Hide file tree
Showing 24 changed files with 101 additions and 114 deletions.
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ if(APPLE)
set(MACOS_QT_LIBRARIES
QtConcurrent
QtCore
QtDBus
QtGui
QtHelp
QtMacExtras
Expand Down Expand Up @@ -516,21 +517,15 @@ if(ENABLE_TEST_PLUGINS)
add_definitions(-DENABLE_TEST_PLUGINS)
endif()

# On macOS, make sure that we support 10.10 and later, unless a specific
# On macOS, make sure that we support version 10.12 and later, unless a specific
# deployment target has been specified

if(APPLE)
if("${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12)
endif()

if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.12")
set(SYSTEM_NAME "OS X")
else()
set(SYSTEM_NAME "macOS")
endif()

set(BUILD_INFORMATION "${BUILD_INFORMATION} for ${SYSTEM_NAME} ${CMAKE_OSX_DEPLOYMENT_TARGET} and later")
set(BUILD_INFORMATION "${BUILD_INFORMATION} for macOS ${CMAKE_OSX_DEPLOYMENT_TARGET} and later")
endif()

# Destination of our plugins so that we don't have to deploy OpenCOR on Windows
Expand Down Expand Up @@ -1080,6 +1075,7 @@ if(APPLE)
macos_deploy_qt_plugin(platforms qcocoa)
macos_deploy_qt_plugin(printsupport cocoaprintersupport)
macos_deploy_qt_plugin(sqldrivers qsqlite)
macos_deploy_qt_plugin(styles qmacstyle)
else()
# Copy the GUI version of the OpenCOR executable to the build/bin folder

Expand Down Expand Up @@ -1251,6 +1247,7 @@ if(WIN32)
windows_deploy_qt_plugin(platforms qwindows)
windows_deploy_qt_plugin(printsupport windowsprintersupport)
windows_deploy_qt_plugin(sqldrivers qsqlite)
windows_deploy_qt_plugin(styles qwindowsvistastyle)

# Batch and VBScript files to run OpenCOR (useful when downloading a ZIPped
# version of OpenCOR)
Expand Down
1 change: 1 addition & 0 deletions doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>General:</strong> upgraded to Qt 5.12.0 LTS (see issue <a href=\"https://github.com/opencor/opencor/issues/1910\">#1910</a>)." },
{ "change": "<strong>COMBINE support:</strong> now recognise files that have a master attribute of \"1\" rather than \"true\" (see issue <a href=\"https://github.com/opencor/opencor/issues/1912\">#1912</a>)." }
]
},
Expand Down
4 changes: 3 additions & 1 deletion doc/supportedPlatforms.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ul>
<li><strong>Up to OpenCOR 0.3:</strong> supported on both the 32-bit and 64-bit versions of <a href="https://en.wikipedia.org/wiki/Windows_XP">Windows XP</a> and later.</li>
<li><strong>OpenCOR 0.4.x:</strong> supported on both the 32-bit and 64-bit versions of <a href="https://en.wikipedia.org/wiki/Windows_7">Windows 7</a> and later.</li>
<li><strong>OpenCOR 0.5 and later:</strong> supported on the 64-bit version of <a href="https://en.wikipedia.org/wiki/Windows_7">Windows 7</a> and later.</li>
<li><strong>OpenCOR 0.5 and later, and snapshots:</strong> supported on the 64-bit version of <a href="https://en.wikipedia.org/wiki/Windows_7">Windows 7</a> and later.</li>
</ul>

<div class="section">
Expand All @@ -41,6 +41,7 @@
<li><strong>OpenCOR 0.3 and 0.4.x:</strong> supported on both the 32-bit and 64-bit versions of <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_14.04_LTS_(Trusty_Tahr)">Ubuntu 14.04 LTS (Trusty Tahr)</a> and later.</li>
<li><strong>OpenCOR 0.5:</strong> supported on the 64-bit version of <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_14.04_LTS_(Trusty_Tahr)">Ubuntu 14.04 LTS (Trusty Tahr)</a> and later.</li>
<li><strong>OpenCOR 0.6:</strong> supported on the 64-bit version of <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_16.04_LTS_(Xenial_Xerus)">Ubuntu 16.04 LTS (Xenial Xerus)</a> and later.</li>
<li><strong>Snapshots:</strong> supported on the 64-bit version of <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_16.04_LTS_(Xenial_Xerus)">Ubuntu 16.04 LTS (Xenial Xerus)</a> and later.</li>
</ul>

<div class="section">
Expand All @@ -52,6 +53,7 @@
<li><strong>OpenCOR 0.2 to 0.4.x:</strong> supported on <a href="https://en.wikipedia.org/wiki/Mac_OS_X_Lion">Mac OS X 10.7 (Lion)</a> and later.</li>
<li><strong>OpenCOR 0.5:</strong> supported on <a href="https://en.wikipedia.org/wiki/OS_X_Mountain_Lion">OS X 10.8 (Mountain Lion)</a> and later.</li>
<li><strong>OpenCOR 0.6:</strong> supported on <a href="https://en.wikipedia.org/wiki/OS_X_Yosemite">OS X 10.10 (Yosemite)</a> and later.</li>
<li><strong>Snapshots:</strong> supported on <a href="https://en.wikipedia.org/wiki/MacOS_Sierra">macOS 10.12 (Sierra)</a> and later.</li>
</ul>

<script type="text/javascript">
Expand Down
8 changes: 0 additions & 8 deletions i18n/OpenCOR_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,6 @@
<source>No plugins could be found.</source>
<translation>Aucunes extensions n&apos;ont pu être trouvées.</translation>
</message>
<message>
<source>Preferences</source>
<translation>Préférences</translation>
</message>
<message>
<source>No plugins have preferences.</source>
<translation>Aucunes extensions n&apos;ont de préférences.</translation>
</message>
<message>
<source>About</source>
<translation>À Propos</translation>
Expand Down
36 changes: 18 additions & 18 deletions src/3rdparty/QtWebKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ set(LIBRARY_VERSION ${MAJOR_LIBRARY_VERSION}.${MINOR_LIBRARY_VERSION}.0)

# Git tags for our libraries

set(GIT_TAG v5.212.0-alpha2-72cfbd7-extra)
set(GIT_TAG v5.12.0)
set(GIT_TAG_LIBJPEG 1.5.90)
set(GIT_TAG_LIBPNG v1.6.34)
set(GIT_TAG_ZLIB v1.2.11)

# Release tag

set(RELEASE_TAG v5.212.0-alpha2-72cfbd7-extra)
set(RELEASE_TAG v5.12.0)

# Specify where our local package will be installed

Expand Down Expand Up @@ -100,43 +100,43 @@ if(USE_PREBUILT_QTWEBKIT_PACKAGE)
if(WIN32)
if(RELEASE_MODE)
retrieve_package_file(${PACKAGE_NAME} ${PACKAGE_VERSION}
${RELATIVE_PROJECT_SOURCE_DIR} 6b0c986ad56f9cf3ac70963363cf540d8a0d5574
${RELATIVE_PROJECT_SOURCE_DIR} 88c2375d8f90c3c6e731a52002bcb4695163c489
RELEASE_TAG ${RELEASE_TAG}
SHA1_FILES ${SHA1_FILES}
SHA1_VALUES 010bb916e3a7f249722b0938d26d0ed656542582
85cd25ab94c275bf588432ccd75fdd01794f3f3b
SHA1_VALUES 6eeb3b514038fba691bdcf94183c35bc04b1029a
154194a3dfe1723716da77a2938b0757ec1bb326
874175a6db51afe0902882f0b00f7855ab498c79
47cb72ba7c899ca218be75dd89a0c0f900b968b8
a386658900a742f31f1f08d55c0915d577af2d7e
8e3ce5f7def8eaf5e47ee7ae66441c4d02beaf04
cdb7055f969699db92e7d2ea9c61256c1bf5ce61)
9ec4fe53b4189db4d2b3791a4f994384ab910641
0753c0147fc75d617612088e745f17b3107d1ada)
else()
retrieve_package_file(${PACKAGE_NAME} ${PACKAGE_VERSION}
${RELATIVE_PROJECT_SOURCE_DIR} d028b2a6aed6db705b553aac3b1069659536ad29
${RELATIVE_PROJECT_SOURCE_DIR} 56b08867163478535787e0014b65c93b4487873c
RELEASE_TAG ${RELEASE_TAG}
SHA1_FILES ${SHA1_FILES}
SHA1_VALUES e940b8734e9e24fc691177d0c889319cd2c2867f
07d4256e33ff38686f2400ac35373095f86bce4a
SHA1_VALUES f89689041007123e2f87f425c153ad236d490f2c
6bfec618a49e104b1dde9547f48b5ded382ec39b
43497bf1a89173badccc0b945b43473cf5d5f12a
2ef114df767c6fe4184ef458545ff8d71f4f4917
5eeaf7c066cca05413a35bba5efc71526c46f478
dfedab7aa19ff1ac525b40f467679ee021969ab3
5b2832be2417c293f750babb57093e8e171f371a)
c1f07535c93d5d51cc211813f48d0ca827cda1f5
a89cf300bea576d849ee66a2b33832a65c0db9ff)
endif()
elseif(APPLE)
retrieve_package_file(${PACKAGE_NAME} ${PACKAGE_VERSION}
${RELATIVE_PROJECT_SOURCE_DIR} 93287a9b6324dc2857b8775cfef7f332e3b29ae4
${RELATIVE_PROJECT_SOURCE_DIR} 907aa8f0572de663a1d10386c71a79afb7acbba6
RELEASE_TAG ${RELEASE_TAG}
SHA1_FILES ${SHA1_FILES}
SHA1_VALUES 5add97d2f47b3d0b231989458abc7ba1a5b41ef7
17b3339432e9f99f9b702d4d85c04225c4d3c9d1)
SHA1_VALUES 024104337ec2a92f2ae63bdd592cb9ac7c426b35
cbace54abac7c6df21d1c0f8a2e00fc9a0c9a696)
else()
retrieve_package_file(${PACKAGE_NAME} ${PACKAGE_VERSION}
${RELATIVE_PROJECT_SOURCE_DIR} 5611b118ebcadf16e9cc6a2a562d1535a54e04f5
${RELATIVE_PROJECT_SOURCE_DIR} bba1e82441095e952716b247ce280dd51721bb22
RELEASE_TAG ${RELEASE_TAG}
SHA1_FILES ${SHA1_FILES}
SHA1_VALUES 3d81e88afd4fbc712abd4c83327605539156ed89
beb2849ef45c1b451578bebf47a93f9f94267a52)
SHA1_VALUES 687d5b9d508ed450315cc8b93dfb269696921ebe
91fd09d27e4e80cf6ac6e60a6263abb09e690989)
endif()
else()
# Build JPEG, PNG and ZLIB as external projects, if on Linux or macOS
Expand Down
6 changes: 2 additions & 4 deletions src/3rdparty/QtWebKit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ In order to build `QtWebKit <https://wiki.qt.io/QtWebKit>`__, we need to:

- **Windows:** install:

- `Perl 5.22 <http://www.activestate.com/activeperl/>`__;
- `Perl >= 5.20 <http://www.activestate.com/activeperl/>`__;
- `Python 2.7 <https://www.python.org/>`__;
- `Ruby >= 1.9 <http://rubyinstaller.org/>`__;
- `Bison and Flex <https://sourceforge.net/projects/winflexbison/>`__ (make a copy of ``win_flex.exe`` and name it ``flex.exe``);
- `Bison and Flex <https://sourceforge.net/projects/winflexbison/>`__;
- `gperf <http://gnuwin32.sourceforge.net/packages/gperf.htm>`__; and

**Note:** the `GnuWin32 <http://gnuwin32.sourceforge.net/>`__ version of `Flex <http://gnuwin32.sourceforge.net/packages/flex.htm>`__ is not suitable, hence we must use `Win flex-bison <https://sourceforge.net/projects/winflexbison/>`__ instead.

There are additional dependencies (``ICU``, ``libjpeg``, ``libpng``, ``libxml2``, ``libxslt``, ``SQLite`` and ``zlib``) that are automatically downloaded upon building QtWebKit.
(The prebuilt version of those binaries originally comes from `https://github.com/Vitallium/qtwebkit-libs-win/releases <https://github.com/Vitallium/qtwebkit-libs-win/releases>`__, to which we removed unneeded files.)

Expand Down
4 changes: 2 additions & 2 deletions src/generalpreferenceswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ static const auto SettingsPreferencesStyle = QStringLiteral("Style");
//==============================================================================

#if defined(Q_OS_WIN)
static const auto SettingsPreferencesStyleDefault = QStringLiteral("WindowsVista");
static const auto SettingsPreferencesStyleDefault = QStringLiteral("windowsvista");
#elif defined(Q_OS_LINUX)
static const auto SettingsPreferencesStyleDefault = QStringLiteral("Fusion");
#elif defined(Q_OS_MAC)
static const auto SettingsPreferencesStyleDefault = QStringLiteral("Macintosh");
static const auto SettingsPreferencesStyleDefault = QStringLiteral("macintosh");
#else
#error Unsupported platform
#endif
Expand Down
55 changes: 22 additions & 33 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include <QCloseEvent>
#include <QDesktopServices>
#include <QDesktopWidget>
#include <QLocale>
#include <QRect>
#include <QScreen>
#include <QSettings>
#include <QShortcut>
#include <QTimer>
Expand Down Expand Up @@ -691,14 +691,14 @@ void MainWindow::loadSettings()

// Default size and position of the main window

QRect desktopGeometry = qApp->desktop()->availableGeometry();
int horizSpace = desktopGeometry.width()/13;
int vertSpace = desktopGeometry.height()/13;
QRect availableGeometry = qApp->primaryScreen()->availableGeometry();
int horizSpace = availableGeometry.width()/13;
int vertSpace = availableGeometry.height()/13;

setGeometry(desktopGeometry.left()+horizSpace,
desktopGeometry.top()+vertSpace,
desktopGeometry.width()-2*horizSpace,
desktopGeometry.height()-2*vertSpace);
setGeometry(availableGeometry.left()+horizSpace,
availableGeometry.top()+vertSpace,
availableGeometry.width()-2*horizSpace,
availableGeometry.height()-2*vertSpace);
}

// Retrieve whether the docked windows are to be shown
Expand Down Expand Up @@ -1201,37 +1201,26 @@ void MainWindow::actionPluginsTriggered()

void MainWindow::showPreferencesDialog(const QString &pPluginName)
{
// Show the preferences dialog, if we have at least one plugin that supports
// the Preferences interface
// Show the preferences dialog

if (mPluginManager->plugins().count()) {
if (mLoadedPreferencesPlugins.count()) {
mSettings->beginGroup("PreferencesDialog");
PreferencesDialog preferencesDialog(mSettings, mPluginManager,
pPluginName, this);
mSettings->beginGroup("PreferencesDialog");
PreferencesDialog preferencesDialog(mSettings, mPluginManager,
pPluginName, this);

preferencesDialog.exec();
mSettings->endGroup();
preferencesDialog.exec();
mSettings->endGroup();

// Let people know about the plugins that had their preferences
// changed, if any and if requested
// Let people know about the plugins that had their preferences changed, if
// any and if requested

if ( (preferencesDialog.result() == QMessageBox::Ok)
&& !preferencesDialog.pluginNames().isEmpty()) {
foreach (Plugin *plugin, mPluginManager->loadedPlugins()) {
PreferencesInterface *preferencesInterface = qobject_cast<PreferencesInterface *>(plugin->instance());
if ( (preferencesDialog.result() == QMessageBox::Ok)
&& !preferencesDialog.pluginNames().isEmpty()) {
foreach (Plugin *plugin, mPluginManager->loadedPlugins()) {
PreferencesInterface *preferencesInterface = qobject_cast<PreferencesInterface *>(plugin->instance());

if (preferencesInterface)
preferencesInterface->preferencesChanged(preferencesDialog.pluginNames());
}
}
} else {
warningMessageBox(tr("Preferences"),
tr("No plugins have preferences."));
if (preferencesInterface)
preferencesInterface->preferencesChanged(preferencesDialog.pluginNames());
}
} else {
warningMessageBox(tr("Preferences"),
tr("No plugins could be found."));
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/misc/cliutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ QString applicationDescription(bool pGuiMode)
QString prettyProductName()
{
// Return a pretty version of the product name
// Note: Qt 5.9.7 LTS doesn't recognise macOS Mojave (10.14), so we need to
// handle that particular case...
// Note: Qt 5.12.0 LTS doesn't recognise macOS Mojave (10.14) (see
// https://bugreports.qt.io/browse/QTBUG-72489), so we need to handle
// handle that particular case ourselves...

QString res = QSysInfo::prettyProductName();

Expand Down
2 changes: 1 addition & 1 deletion src/misc/guiutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include <QAction>
#include <QApplication>
#include <QDesktopWidget>
#include <QDialogButtonBox>
#include <QFileSystemModel>
#include <QLayout>
#include <QMainWindow>
#include <QPointer>
#include <QPushButton>
#include <QScreen>
#include <QSettings>
#include <QStandardItemModel>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//==============================================================================

#include <QApplication>
#include <QDesktopWidget>
#include <QLayout>
#include <QMetaType>
#include <QScreen>
#include <QSettings>
#include <QVariant>

Expand Down Expand Up @@ -69,11 +69,12 @@ void CellmlAnnotationViewWidget::loadSettings(QSettings *pSettings)
// some information between the different instances, so we have to do
// it here instead...

QVariantList defaultEditingWidgetSizes = QVariantList() << 0.25*qApp->desktop()->screenGeometry().width()
<< 0.75*qApp->desktop()->screenGeometry().width();
QVariantList defaultMetadataDetailsWidgetSizes = QVariantList() << 0.25*qApp->desktop()->screenGeometry().height()
<< 0.25*qApp->desktop()->screenGeometry().height()
<< 0.50*qApp->desktop()->screenGeometry().height();
QRect availableGeometry = qApp->primaryScreen()->availableGeometry();
QVariantList defaultEditingWidgetSizes = QVariantList() << 0.25*availableGeometry.width()
<< 0.75*availableGeometry.width();
QVariantList defaultMetadataDetailsWidgetSizes = QVariantList() << 0.25*availableGeometry.height()
<< 0.25*availableGeometry.height()
<< 0.50*availableGeometry.height();

mEditingWidgetSizes = qVariantListToIntList(pSettings->value(SettingsCellmlAnnotationViewEditingWidgetSizes, defaultEditingWidgetSizes).toList());
mMetadataDetailsWidgetSizes = qVariantListToIntList(pSettings->value(SettingsCellmlAnnotationViewMetadataDetailsWidgetSizes, defaultMetadataDetailsWidgetSizes).toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//==============================================================================

#include <QApplication>
#include <QDesktopWidget>
#include <QScreen>
#include <QSettings>

//==============================================================================
Expand Down Expand Up @@ -120,9 +120,10 @@ void CellmlEditingViewWidget::loadSettings(QSettings *pSettings)
// respectively, of the desktop's height, but that doesn't matter
// at all...

QVariantList defaultCellmlEditingViewWidgetSizes = QVariantList() << 0.19*qApp->desktop()->screenGeometry().height()
<< qApp->desktop()->screenGeometry().height()
<< 0.13*qApp->desktop()->screenGeometry().height();
int availableGeometryHeight = qApp->primaryScreen()->availableGeometry().height();
QVariantList defaultCellmlEditingViewWidgetSizes = QVariantList() << 0.19*availableGeometryHeight
<< availableGeometryHeight
<< 0.13*availableGeometryHeight;

mEditingWidgetSizes = qVariantListToIntList(pSettings->value(SettingsCellmlEditingViewWidgetSizes, defaultCellmlEditingViewWidgetSizes).toList());

Expand Down

0 comments on commit eda40b6

Please sign in to comment.