Skip to content

Commit

Permalink
Bump Qt minimum version to 5.9 (#7204)
Browse files Browse the repository at this point in the history
* bump qt minimum version to 5.9

* cleanup cmake checks

* Remove the obsoleted check.

* Missed this while removing the check.
  • Loading branch information
Rossmaxx committed Apr 18, 2024
1 parent d5e1d9e commit df11a98
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -179,7 +179,7 @@ check_library_exists(rt shm_open "" LMMS_HAVE_LIBRT)

LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")

FIND_PACKAGE(Qt5 5.6.0 COMPONENTS Core Gui Widgets Xml REQUIRED)
FIND_PACKAGE(Qt5 5.9.0 COMPONENTS Core Gui Widgets Xml REQUIRED)
FIND_PACKAGE(Qt5 COMPONENTS LinguistTools QUIET)

INCLUDE_DIRECTORIES(
Expand Down
4 changes: 0 additions & 4 deletions plugins/VstBase/VstPlugin.cpp
Expand Up @@ -735,14 +735,12 @@ void VstPlugin::createUI( QWidget * parent )

QWidget* container = nullptr;

#if QT_VERSION >= 0x050100
if (m_embedMethod == "qt" )
{
QWindow* vw = QWindow::fromWinId(m_pluginWindowID);
container = QWidget::createWindowContainer(vw, parent );
container->installEventFilter(this);
} else
#endif

#ifdef LMMS_BUILD_WIN32
if (m_embedMethod == "win32" )
Expand Down Expand Up @@ -801,15 +799,13 @@ void VstPlugin::createUI( QWidget * parent )

bool VstPlugin::eventFilter(QObject *obj, QEvent *event)
{
#if QT_VERSION >= 0x050100
if (embedMethod() == "qt" && obj == m_pluginWidget)
{
if (event->type() == QEvent::Show) {
RemotePlugin::showUI();
}
qDebug() << obj << event;
}
#endif
return false;
}

Expand Down
2 changes: 0 additions & 2 deletions src/core/ConfigManager.cpp
Expand Up @@ -192,9 +192,7 @@ QStringList ConfigManager::availableVstEmbedMethods()
{
QStringList methods;
methods.append("none");
#if QT_VERSION >= 0x050100
methods.append("qt");
#endif
#ifdef LMMS_BUILD_WIN32
methods.append("win32");
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/core/main.cpp
Expand Up @@ -356,9 +356,7 @@ int main( int argc, char * * argv )
// don't let OS steal the menu bar. FIXME: only effective on Qt4
QCoreApplication::setAttribute( Qt::AA_DontUseNativeMenuBar );
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QCoreApplication * app = coreOnly ?
new QCoreApplication( argc, argv ) :
new gui::MainApplication(argc, argv);
Expand Down
6 changes: 0 additions & 6 deletions src/gui/MainWindow.cpp
Expand Up @@ -324,10 +324,7 @@ void MainWindow::finalize()
SLOT(onExportProjectMidi()),
Qt::CTRL + Qt::Key_M );

// Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION < 0x050600))
project_menu->addSeparator();
#endif
project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ),
qApp, SLOT(closeAllWindows()),
Qt::CTRL + Qt::Key_Q );
Expand Down Expand Up @@ -400,10 +397,7 @@ void MainWindow::finalize()
this, SLOT(help()));
}

// Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION < 0x050600))
help_menu->addSeparator();
#endif
help_menu->addAction( embed::getIconPixmap( "icon_small" ), tr( "About" ),
this, SLOT(aboutLMMS()));

Expand Down

0 comments on commit df11a98

Please sign in to comment.