Hello,
I'm using MakeMKV in Ubuntu 25.10 via the fantastic PPA created and maintained by @hjmooses:
https://launchpad.net/~heyarje/+archive ... kemkv-beta
Ubuntu is planning to remove all Qt5 libraries and support in it's next release 26.04 LTS (April 2026):
https://discourse.ubuntu.com/t/removing ... -lts/49296
As MakeMKV uses Qt5 it means that there will be no "official" way to create native packages for newer Ubuntu versions.
Will MakeMKV be ported from Qt5 to Qt6?
I've read that there is a "quick" way of porting Qt5 to Qt6 (or that's what they said) using a "Qt5Compat Library":
https://www.qt.io/blog/porting-from-qt- ... at-library
Thank you very much and best regards.
Will MakeMKV be ported from Qt5 to Qt6?
Re: Will MakeMKV be ported from Qt5 to Qt6?
Why wouldn't it be? I'm not a C++ guru but taking something like MakeMKV GUI from qt5 to qt6 should be extremely elementary. If you look at the code it's not very complex, it's very C heavy with little C++ and very little of a class based approach (baring which is required by Qt).
Sadly, I think due to commercial reasons, there will never be a "contributeable" repository were people can submit new features.
Sadly, I think due to commercial reasons, there will never be a "contributeable" repository were people can submit new features.
Re: Will MakeMKV be ported from Qt5 to Qt6?
I hope too.
I am on Arch Linux, and while Qt5 packages are still in the official repositories, this version of Qt has reached end-of-life, and most other software on Linux have migrated to Qt6 already. I do not know much about it, but it seems the transition is not that painful to do. It is much more complicated to move from GTK3 to GTK4, compared to Qt5 to Qt6 based on what other Linux developers say.
It is one of the reasons that prevent me from buying a MakeMKV license key to be honest.
I am on Arch Linux, and while Qt5 packages are still in the official repositories, this version of Qt has reached end-of-life, and most other software on Linux have migrated to Qt6 already. I do not know much about it, but it seems the transition is not that painful to do. It is much more complicated to move from GTK3 to GTK4, compared to Qt5 to Qt6 based on what other Linux developers say.
It is one of the reasons that prevent me from buying a MakeMKV license key to be honest.
-
el_vandragon
- Posts: 9
- Joined: Wed May 31, 2023 6:39 am
Re: Will MakeMKV be ported from Qt5 to Qt6?
Here is a quick patch that ports it to Qt6, works on Arch linux (I saved this as `qt6.patch` and then added it to `PKGBUILD` from the AUR). Pretty basic, mostly just renaming qt5 -> qt6, only a few bits of code needed to be changed (for configure host_bins doesn't exist so added a hardcoded fallback for MOC, may be different on other distros, also need to force C++17 now).
I didn't fully test every feature but it seems to work fine from what little testing I did do.
I didn't fully test every feature but it seems to work fine from what little testing I did do.
Code: Select all
--- a/configure
+++ b/configure
@@ -662,8 +662,8 @@ QT_MOC
QT_LIB
QT_CFLAGS
QT_INC
-qt5_LIBS
-qt5_CFLAGS
+qt6_LIBS
+qt6_CFLAGS
ffmpeg_LIBS
ffmpeg_CFLAGS
PKG_CONFIG_LIBDIR
@@ -777,7 +777,7 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_gui
-enable_qt5
+enable_qt6
enable_noec
enable_debug
'
@@ -800,8 +800,8 @@ PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
ffmpeg_CFLAGS
ffmpeg_LIBS
-qt5_CFLAGS
-qt5_LIBS'
+qt6_CFLAGS
+qt6_LIBS'
# Initialize some variables set by options.
@@ -1431,7 +1431,7 @@ Optional Features:
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-gui do not build GUI (default is build GUI)
- --disable-qt5 do not use Qt5
+ --disable-qt6 do not use Qt6
--enable-noec use private ECDSA code (default - use openssl ECDSA
if available)
--enable-debug keep debug symbols in binarfies (default - strip
@@ -1471,8 +1471,8 @@ Some influential environment variables:
ffmpeg_CFLAGS
C compiler flags for ffmpeg, overriding pkg-config
ffmpeg_LIBS linker flags for ffmpeg, overriding pkg-config
- qt5_CFLAGS C compiler flags for qt5, overriding pkg-config
- qt5_LIBS linker flags for qt5, overriding pkg-config
+ qt6_CFLAGS C compiler flags for qt6, overriding pkg-config
+ qt6_LIBS linker flags for qt6, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -12545,12 +12545,12 @@ ENABLE_GUI=$enable_gui
#AM_CONDITIONAL([ENABLE_GUI],[test "x$enable_gui" = "xyes"])
-# Check whether --enable-qt5 was given.
-if test ${enable_qt5+y}
+# Check whether --enable-qt6 was given.
+if test ${enable_qt6+y}
then :
- enableval=$enable_qt5;
+ enableval=$enable_qt6;
else $as_nop
- enable_qt5=yes
+ enable_qt6=yes
fi
@@ -18295,24 +18295,24 @@ qt_ok=no
if test "x$enable_gui" != "xno"
then :
- if test "x$enable_qt5" != "xno"
+ if test "x$enable_qt6" != "xno"
then :
pkg_failed=no
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5Core Qt5Gui Qt5Widgets Qt5DBus" >&5
-printf %s "checking for Qt5Core Qt5Gui Qt5Widgets Qt5DBus... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt6Core Qt6Gui Qt6Widgets Qt6DBus" >&5
+printf %s "checking for Qt6Core Qt6Gui Qt6Widgets Qt6DBus... " >&6; }
-if test -n "$qt5_CFLAGS"; then
- pkg_cv_qt5_CFLAGS="$qt5_CFLAGS"
+if test -n "$qt6_CFLAGS"; then
+ pkg_cv_qt6_CFLAGS="$qt6_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core Qt5Gui Qt5Widgets Qt5DBus\""; } >&5
- ($PKG_CONFIG --exists --print-errors "Qt5Core Qt5Gui Qt5Widgets Qt5DBus") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt6Core Qt6Gui Qt6Widgets Qt6DBus\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt6Core Qt6Gui Qt6Widgets Qt6DBus") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_qt5_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core Qt5Gui Qt5Widgets Qt5DBus" 2>/dev/null`
+ pkg_cv_qt6_CFLAGS=`$PKG_CONFIG --cflags "Qt6Core Qt6Gui Qt6Widgets Qt6DBus" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18320,16 +18320,16 @@ fi
else
pkg_failed=untried
fi
-if test -n "$qt5_LIBS"; then
- pkg_cv_qt5_LIBS="$qt5_LIBS"
+if test -n "$qt6_LIBS"; then
+ pkg_cv_qt6_LIBS="$qt6_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core Qt5Gui Qt5Widgets Qt5DBus\""; } >&5
- ($PKG_CONFIG --exists --print-errors "Qt5Core Qt5Gui Qt5Widgets Qt5DBus") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt6Core Qt6Gui Qt6Widgets Qt6DBus\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "Qt6Core Qt6Gui Qt6Widgets Qt6DBus") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_qt5_LIBS=`$PKG_CONFIG --libs "Qt5Core Qt5Gui Qt5Widgets Qt5DBus" 2>/dev/null`
+ pkg_cv_qt6_LIBS=`$PKG_CONFIG --libs "Qt6Core Qt6Gui Qt6Widgets Qt6DBus" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18350,12 +18350,12 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- qt5_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Core Qt5Gui Qt5Widgets Qt5DBus" 2>&1`
+ qt6_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt6Core Qt6Gui Qt6Widgets Qt6DBus" 2>&1`
else
- qt5_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Core Qt5Gui Qt5Widgets Qt5DBus" 2>&1`
+ qt6_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt6Core Qt6Gui Qt6Widgets Qt6DBus" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$qt5_PKG_ERRORS" >&5
+ echo "$qt6_PKG_ERRORS" >&5
qt_ok=no
elif test $pkg_failed = untried; then
@@ -18363,16 +18363,19 @@ elif test $pkg_failed = untried; then
printf "%s\n" "no" >&6; }
qt_ok=no
else
- qt5_CFLAGS=$pkg_cv_qt5_CFLAGS
- qt5_LIBS=$pkg_cv_qt5_LIBS
+ qt6_CFLAGS=$pkg_cv_qt6_CFLAGS
+ qt6_LIBS=$pkg_cv_qt6_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
- QT_INC="$qt5_CFLAGS";
- QT_CFLAGS="-fPIC";
- QT_LIB="$qt5_LIBS";
- qt5_host_bins=`$PKG_CONFIG --variable host_bins "Qt5Core" 2>/dev/null`;
- QT_MOC="$qt5_host_bins/moc";
+ QT_INC="$qt6_CFLAGS";
+ QT_CFLAGS="-fPIC -std=c++17";
+ QT_LIB="$qt6_LIBS";
+ qt6_host_bins=`$PKG_CONFIG --variable host_bins "Qt6Core" 2>/dev/null`;
+ if test -z "$qt6_host_bins"; then
+ qt6_host_bins="/usr/lib/qt6"
+ fi
+ QT_MOC="$qt6_host_bins/moc";
qt_ok=yes
fi
--- a/makemkvgui/src/dirselectbox.cpp
+++ b/makemkvgui/src/dirselectbox.cpp
@@ -121,7 +121,7 @@ void CDirSelectBox::SlotButtonPressed()
if ( (dir.at(dlen-(alen+1))==QLatin1Char('/')) ||
(dir.at(dlen-(alen+1))==QLatin1Char('\\')) )
{
- if (dir.endsWith(appendName)) {
+ if (dir.endsWith(*appendName)) {
dir.chop(alen+1);
}
}
--- a/makemkvgui/src/mainwnd.cpp
+++ b/makemkvgui/src/mainwnd.cpp
@@ -35,7 +35,7 @@ static const Qt::WindowFlags mainWindowFlags =
Qt::MacWindowToolBarButtonHint |
Qt::WindowMinMaxButtonsHint ;
#else
- 0;
+ Qt::WindowFlags();
#endif
MainWnd::MainWnd(CGUIApClient* App,const char* AppDir)
--- a/makemkvgui/src/qtgui.h
+++ b/makemkvgui/src/qtgui.h
@@ -31,6 +31,7 @@
#include <QtGui/QDesktopServices>
#include <QtGui/QScreen>
#include <QtGui/QFontDatabase>
+#include <QtGui/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMessageBox>
@@ -46,7 +47,6 @@
#include <QtWidgets/QProgressBar>
#include <QtWidgets/QStackedWidget>
#include <QtWidgets/QComboBox>
-#include <QtWidgets/QAction>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QBoxLayout>