Skip to content

Commit

Permalink
Port to QT5
Browse files Browse the repository at this point in the history
By the end of 2015, QT 4.x upstream support will end, therefore
it is needed to move to QT5

Tested with QT 5.4.1 in openSUSE Tumbleweed.
  • Loading branch information
crrodriguez committed Apr 29, 2015
1 parent 3472842 commit 531d36b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#include <QtDBus>
#include <QFile>
#include <QDebug>
#include <QVBoxLayout>
#include <QStackedLayout>
#include <QPushButton>
#include <QDesktopWidget>
#include <QMessageBox>
#include <QApplication>

#include <unistd.h>
#include <sys/types.h>
Expand Down
2 changes: 2 additions & 0 deletions MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <QtGui>
#include <QWidget>
#include <QDBusMessage>
#include <QLabel>
#include <QComboBox>

#include "MetaTypes.h"
#include "Platform.h"
Expand Down
1 change: 0 additions & 1 deletion Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <errno.h>

#define BLOCKSIZE 1048576
#define _GNU_SOURCE

Platform::Platform(bool kioskMode, bool unsafe)
{
Expand Down
1 change: 1 addition & 0 deletions PlatformUdisks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <QRegExp>
#include <QDir>
#include <QProgressDialog>
#include <QMessageBox>

#include "DeviceItem.h"
#include "PlatformUdisks.h"
Expand Down
1 change: 1 addition & 0 deletions PlatformUdisks2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <QRegExp>
#include <QDir>
#include <QProgressDialog>
#include <QMessageBox>

#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusPendingReply>
Expand Down
6 changes: 4 additions & 2 deletions imagewriter.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ INCLUDEPATH += .
DESTDIR += .
VERSION=1.10
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
QMAKE_CXXFLAGS_RELEASE += "-fvisibility=hidden -fvisibility-inlines-hidden"
QT += dbus gui widgets

# Input
HEADERS += DeviceItem.h \
Expand All @@ -29,8 +31,8 @@ SOURCES += main.cpp \
udisks2_interface.cpp \
udisks2_mountpoints_interface.cpp

CONFIG += link_pkgconfig \
qdbus
CONFIG += c++11 link_pkgconfig


exists("/usr/include/hal/libhal.h") {
PKGCONFIG += hal \
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ main (int argc, char *argv[])
for (i = list.begin(); i != list.end(); ++i)
{
if (!(*i)->getPath().isEmpty())
fprintf(stdout, "%s\n", (*i)->getPath().toAscii().data());
fprintf(stdout, "%s\n", (*i)->getPath().toLatin1().data());
}
exit(0);
}
Expand Down

0 comments on commit 531d36b

Please sign in to comment.