Skip to content

Commit

Permalink
Merge 7a42c92 into d4d59c3
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jul 20, 2018
2 parents d4d59c3 + 7a42c92 commit 1377aab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/plugins/miscellaneous/Core/src/centralwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@ void CentralWidget::updateGui()
// don't end up with several identical connections (something that
// might happen if we were to switch views and back)...

ViewWidget *newViewWidget = dynamic_cast<ViewWidget *>(newView);
ViewWidget *newViewWidget = qobject_cast<ViewWidget *>(newView);

if (newViewWidget) {
connect(newViewWidget, &ViewWidget::updateFileTabIcon,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/miscellaneous/Core/src/coreguiutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CentralWidget * centralWidget()
if (firstTime) {
foreach (QObject *object, mainWindow()->children()) {
if (!strcmp(object->metaObject()->className(), "OpenCOR::Core::CentralWidget")) {
res = dynamic_cast<CentralWidget *>(object);
res = qobject_cast<CentralWidget *>(object);

break;
}
Expand Down
5 changes: 1 addition & 4 deletions src/plugins/miscellaneous/Core/src/filemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ FileManager::FileManager() :
this, &FileManager::checkFiles);

// Keep track of when OpenCOR gets/loses the focus
// Note: the focusWindowChanged() signal comes from QGuiApplication, so we
// need to check whether we are running the console version of OpenCOR
// or its GUI version...

if (dynamic_cast<QGuiApplication *>(QCoreApplication::instance())) {
if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
connect(qApp, &QApplication::focusWindowChanged,
this, &FileManager::focusWindowChanged);
}
Expand Down

0 comments on commit 1377aab

Please sign in to comment.