Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions hiro/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)
moc = $(shell pkg-config --variable=host_bins Qt5Core)/moc
hiro.flags = $(flags.cpp) -DHIRO_QT=5 -fPIC $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
Expand Down
4 changes: 0 additions & 4 deletions hiro/qt/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ auto pApplication::state() -> State& {
//obviously, it is used as sparingly as possible
auto pApplication::synchronize() -> void {
for(auto n : range(8)) {
#if HIRO_QT==4 && defined(DISPLAY_XORG)
QApplication::syncX();
#elif HIRO_QT==5
QApplication::sync();
#endif
Application::processEvents();
usleep(2000);
}
Expand Down
10 changes: 0 additions & 10 deletions hiro/qt/header.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <QApplication>
#include <QtGui>
#if HIRO_QT==5
#include <QtWidgets>
#endif
#undef foreach

#include <nall/xorg/guard.hpp>
Expand All @@ -13,11 +11,3 @@
#undef XK_MISCELLANY
#undef XK_LATIN1
#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
8 changes: 0 additions & 8 deletions hiro/qt/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ namespace hiro {

Settings::Settings() {
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"}));
#endif

#define get(name, type, value) \
if(auto node = document[name]) value = node.type()
Expand Down Expand Up @@ -39,11 +35,7 @@ Settings::~Settings() {

#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));
#endif
}

}
4 changes: 0 additions & 4 deletions hiro/qt/widget/table-view-column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ auto pTableViewColumn::_parent() -> maybe<pTableView&> {
auto pTableViewColumn::_setState() -> void {
if(auto parent = _parent()) {
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);
#endif
parent->qtTableView->setColumnHidden(self().offset(), !self().visible());

for(auto& item : parent->state().items) {
Expand Down
8 changes: 0 additions & 8 deletions hiro/qt/widget/table-view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ auto pTableView::construct() -> void {
qtTableView->setContextMenuPolicy(Qt::CustomContextMenu);
qtTableView->setRootIsDecorated(false);
qtTableView->setHeaderHidden(true);
#if HIRO_QT==4
qtTableView->header()->setMovable(false);
#elif HIRO_QT==5
qtTableView->header()->setSectionsMovable(false);
#endif

qtTableViewDelegate = new QtTableViewDelegate(*this);
qtTableView->setItemDelegate(qtTableViewDelegate);
Expand Down Expand Up @@ -126,11 +122,7 @@ auto pTableView::setHeadered(bool headered) -> void {
}

auto pTableView::setSortable(bool sortable) -> void {
#if HIRO_QT==4
qtTableView->header()->setClickable(sortable);
#elif HIRO_QT==5
qtTableView->header()->setSectionsClickable(sortable);
#endif
}

//called on resize/show events
Expand Down
4 changes: 0 additions & 4 deletions hiro/qt/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ auto pWindow::setFullScreen(bool fullScreen) -> void {
auto pWindow::setGeometry(Geometry geometry) -> void {
auto lock = acquire();
Application::processEvents();
#if HIRO_QT==4
QApplication::syncX();
#elif HIRO_QT==5
QApplication::sync();
#endif

setResizable(state().resizable);
qtWindow->move(geometry.x() - frameMargin().x(), geometry.y() - frameMargin().y());
Expand Down
Loading