From 95f00e8dd01c71340083a87e3900932fe380528d Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Sun, 23 Feb 2014 16:46:38 +0100 Subject: [PATCH] Some minor changes Switched to FileIO as subproject Minor cosmetic changes for the CoverPage --- harbour-sailotp.pro | 7 ++----- qml/cover/CoverPage.qml | 5 +++++ src/FileIO/FileIO.pri | 7 +++++++ src/{ => FileIO/src}/fileio.cpp | 0 src/{ => FileIO/src}/fileio.h | 7 +++---- 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 src/FileIO/FileIO.pri rename src/{ => FileIO/src}/fileio.cpp (100%) rename src/{ => FileIO/src}/fileio.h (94%) diff --git a/harbour-sailotp.pro b/harbour-sailotp.pro index fbf18df..a6171da 100644 --- a/harbour-sailotp.pro +++ b/harbour-sailotp.pro @@ -13,8 +13,7 @@ DEFINES += APP_BUILDNUM=\\\"$$RELEASE\\\" CONFIG += sailfishapp -SOURCES += src/harbour-sailotp.cpp \ - src/fileio.cpp +SOURCES += src/harbour-sailotp.cpp OTHER_FILES += qml/harbour-sailotp.qml \ qml/cover/CoverPage.qml \ @@ -34,9 +33,6 @@ OTHER_FILES += qml/harbour-sailotp.qml \ qml/pages/ScanOTP.qml \ qml/lib/urldecoder.js -HEADERS += \ - src/fileio.h - i18n.files = i18n/*.qm i18n.path = /usr/share/$${TARGET}/i18n @@ -53,3 +49,4 @@ lupdate_only { } include(src/qzxing/QZXing.pri) +include(src/FileIO/FileIO.pri) diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index f7c21c2..6a31e98 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -75,12 +75,17 @@ CoverBackground { Column { anchors.top: logo.bottom + width: parent.width anchors.topMargin: 48 anchors.horizontalCenter: parent.horizontalCenter Label { text: appWin.coverTitle anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - Theme.paddingMedium*2 + maximumLineCount: 1 + truncationMode: TruncationMode.Fade + horizontalAlignment: contentWidth <= width ? Text.AlignHCenter : Text.AlignLeft } Label { id: lOTP diff --git a/src/FileIO/FileIO.pri b/src/FileIO/FileIO.pri new file mode 100644 index 0000000..816d5bc --- /dev/null +++ b/src/FileIO/FileIO.pri @@ -0,0 +1,7 @@ +QT += core declarative + +INCLUDEPATH += $$PWD/src + +HEADERS += $$PWD/src/fileio.h + +SOURCES += $$PWD/src/fileio.cpp diff --git a/src/fileio.cpp b/src/FileIO/src/fileio.cpp similarity index 100% rename from src/fileio.cpp rename to src/FileIO/src/fileio.cpp diff --git a/src/fileio.h b/src/FileIO/src/fileio.h similarity index 94% rename from src/fileio.h rename to src/FileIO/src/fileio.h index b78f46c..878811a 100644 --- a/src/fileio.h +++ b/src/FileIO/src/fileio.h @@ -31,16 +31,15 @@ #define FILEIO_H #include +#include class FileIO : public QObject { Q_OBJECT public: - Q_PROPERTY(QString source - READ source - WRITE setSource - NOTIFY sourceChanged) + Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged) + explicit FileIO(QObject *parent = 0); Q_INVOKABLE QString read();