Remove Qt 4 support.

Qt 4.8 LTS was released on December 15th, 2011. It hit its official
end-of-life on December 31st, 2015. It has been dead for nearly 10
years. Qt 4 is now so old, that it has been removed from Debian long
enough that "qt4" doesn't show up in *any* of the indexed package suites
in Debian's online package search service.

With that in mind, I think we can safely say nobody is using this,
nobody will miss this, and it is beyond time to get rid of it (and
probably add Qt 6 support some day.)
This commit is contained in:
John Chadwick
2025-08-29 22:29:50 -04:00
committed by Screwtapello
parent 2e2440fe74
commit 8011051eea
7 changed files with 0 additions and 44 deletions

View File

@@ -57,12 +57,6 @@ ifneq ($(filter $(platform),linux bsd),)
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0) hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0)
endif endif
ifeq ($(hiro),qt4)
moc = /usr/local/lib/qt4/bin/moc
hiro.flags = $(flags.cpp) -DHIRO_QT=4 $(shell pkg-config --cflags QtCore QtGui)
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs QtCore QtGui)
endif
ifeq ($(hiro),qt5) ifeq ($(hiro),qt5)
moc = $(shell pkg-config --variable=host_bins Qt5Core)/moc moc = $(shell pkg-config --variable=host_bins Qt5Core)/moc
hiro.flags = $(flags.cpp) -DHIRO_QT=5 -fPIC $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) hiro.flags = $(flags.cpp) -DHIRO_QT=5 -fPIC $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)

View File

@@ -63,11 +63,7 @@ auto pApplication::state() -> State& {
//obviously, it is used as sparingly as possible //obviously, it is used as sparingly as possible
auto pApplication::synchronize() -> void { auto pApplication::synchronize() -> void {
for(auto n : range(8)) { for(auto n : range(8)) {
#if HIRO_QT==4 && defined(DISPLAY_XORG)
QApplication::syncX();
#elif HIRO_QT==5
QApplication::sync(); QApplication::sync();
#endif
Application::processEvents(); Application::processEvents();
usleep(2000); usleep(2000);
} }

View File

@@ -1,8 +1,6 @@
#include <QApplication> #include <QApplication>
#include <QtGui> #include <QtGui>
#if HIRO_QT==5
#include <QtWidgets> #include <QtWidgets>
#endif
#undef foreach #undef foreach
#include <nall/xorg/guard.hpp> #include <nall/xorg/guard.hpp>
@@ -13,11 +11,3 @@
#undef XK_MISCELLANY #undef XK_MISCELLANY
#undef XK_LATIN1 #undef XK_LATIN1
#include <nall/xorg/guard.hpp> #include <nall/xorg/guard.hpp>
//Qt 4.8.0 and earlier improperly define the QLOCATION macro
//in C++11, it is detected as a malformed user-defined literal
//below is a workaround to fix compilation errors caused by this
#if HIRO_QT==4
#undef QLOCATION
#define QLOCATION "\0" __FILE__ ":" QTOSTRING(__LINE__)
#endif

View File

@@ -2,11 +2,7 @@ namespace hiro {
Settings::Settings() { Settings::Settings() {
string path = {Path::userSettings(), "hiro/"}; string path = {Path::userSettings(), "hiro/"};
#if HIRO_QT==4
auto document = BML::unserialize(file::read({path, "qt4.bml"}));
#elif HIRO_QT==5
auto document = BML::unserialize(file::read({path, "qt5.bml"})); auto document = BML::unserialize(file::read({path, "qt5.bml"}));
#endif
#define get(name, type, value) \ #define get(name, type, value) \
if(auto node = document[name]) value = node.type() if(auto node = document[name]) value = node.type()
@@ -39,11 +35,7 @@ Settings::~Settings() {
#undef set #undef set
#if HIRO_QT==4
file::write({path, "qt4.bml"}, BML::serialize(document));
#elif HIRO_QT==5
file::write({path, "qt5.bml"}, BML::serialize(document)); file::write({path, "qt5.bml"}, BML::serialize(document));
#endif
} }
} }

View File

@@ -102,11 +102,7 @@ auto pTableViewColumn::_parent() -> maybe<pTableView&> {
auto pTableViewColumn::_setState() -> void { auto pTableViewColumn::_setState() -> void {
if(auto parent = _parent()) { if(auto parent = _parent()) {
auto lock = parent->acquire(); auto lock = parent->acquire();
#if HIRO_QT==4
parent->qtTableView->header()->setResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed);
#elif HIRO_QT==5
parent->qtTableView->header()->setSectionResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed); parent->qtTableView->header()->setSectionResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed);
#endif
parent->qtTableView->setColumnHidden(self().offset(), !self().visible()); parent->qtTableView->setColumnHidden(self().offset(), !self().visible());
for(auto& item : parent->state().items) { for(auto& item : parent->state().items) {

View File

@@ -8,11 +8,7 @@ auto pTableView::construct() -> void {
qtTableView->setContextMenuPolicy(Qt::CustomContextMenu); qtTableView->setContextMenuPolicy(Qt::CustomContextMenu);
qtTableView->setRootIsDecorated(false); qtTableView->setRootIsDecorated(false);
qtTableView->setHeaderHidden(true); qtTableView->setHeaderHidden(true);
#if HIRO_QT==4
qtTableView->header()->setMovable(false);
#elif HIRO_QT==5
qtTableView->header()->setSectionsMovable(false); qtTableView->header()->setSectionsMovable(false);
#endif
qtTableViewDelegate = new QtTableViewDelegate(*this); qtTableViewDelegate = new QtTableViewDelegate(*this);
qtTableView->setItemDelegate(qtTableViewDelegate); qtTableView->setItemDelegate(qtTableViewDelegate);
@@ -126,11 +122,7 @@ auto pTableView::setHeadered(bool headered) -> void {
} }
auto pTableView::setSortable(bool sortable) -> void { auto pTableView::setSortable(bool sortable) -> void {
#if HIRO_QT==4
qtTableView->header()->setClickable(sortable);
#elif HIRO_QT==5
qtTableView->header()->setSectionsClickable(sortable); qtTableView->header()->setSectionsClickable(sortable);
#endif
} }
//called on resize/show events //called on resize/show events

View File

@@ -147,11 +147,7 @@ auto pWindow::setFullScreen(bool fullScreen) -> void {
auto pWindow::setGeometry(Geometry geometry) -> void { auto pWindow::setGeometry(Geometry geometry) -> void {
auto lock = acquire(); auto lock = acquire();
Application::processEvents(); Application::processEvents();
#if HIRO_QT==4
QApplication::syncX();
#elif HIRO_QT==5
QApplication::sync(); QApplication::sync();
#endif
setResizable(state().resizable); setResizable(state().resizable);
qtWindow->move(geometry.x() - frameMargin().x(), geometry.y() - frameMargin().y()); qtWindow->move(geometry.x() - frameMargin().x(), geometry.y() - frameMargin().y());