Skip to content

Commit c635edf

Browse files
author
Dario Costa
committed
Changes to be committed:
modified: XCICutter.pro modified: main.cpp modified: qml.qrc modified: xcifile.cpp
1 parent d452266 commit c635edf

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

XCICutter.pro

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
QT += quick
2+
3+
linux {
4+
QT += widgets
5+
}
6+
27
CONFIG += c++11
38

49
# The following define makes your compiler emit warnings if you use
@@ -35,7 +40,8 @@ HEADERS += \
3540
xcifile.h
3641

3742
DISTFILES += \
38-
appicon.icns
43+
appicon.icns \
44+
DejaVuSans.ttf
3945

4046
osx {
4147
ICON = appicon.icns

main.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1+
#include <QApplication>
12
#include <QGuiApplication>
23
#include <QQmlApplicationEngine>
34
#include <QQmlContext>
5+
#include <QFontDatabase>
46

57
#include "worker.h"
68

79
int main(int argc, char *argv[])
810
{
911
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
1012

13+
#ifdef Q_OS_LINUX
14+
QApplication app(argc, argv);
15+
#else
1116
QGuiApplication app(argc, argv);
17+
#endif
1218
qmlRegisterType<Worker>("comp.xcicutter", 1, 0, "Worker");
1319
qmlRegisterType<XCIFile>();
1420

21+
QFontDatabase::addApplicationFont(":/fonts/DejaVuSans.ttf");
22+
1523
QQmlApplicationEngine engine;
1624
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
1725

qml.qrc

+3
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
<qresource prefix="/">
33
<file>main.qml</file>
44
</qresource>
5+
<qresource prefix="/fonts">
6+
<file>DejaVuSans.ttf</file>
7+
</qresource>
58
</RCC>

xcifile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void XCIFile::ReadSizes()
7474
pCartSize = 30464;
7575
break;
7676
default:
77-
qDebug()<<"The source file doesn't look like an XCI file", "Can't determine cartridge size!";
77+
qDebug()<<"The source file doesn't look like an XCI file" << "Can't determine cartridge size!";
7878
break;
7979
}
8080

0 commit comments

Comments
 (0)