[app] Only use those HarbourLib classes that we really need
This commit is contained in:
parent
ef131690bb
commit
e1f75ed04a
5 changed files with 61 additions and 43 deletions
28
app/app.pro
28
app/app.pro
|
@ -30,22 +30,22 @@ FRIBIDI_DIR = $$_PRO_FILE_PWD_/../fribidi
|
|||
LINEBREAK_DIR = $$_PRO_FILE_PWD_/../linebreak
|
||||
HARBOUR_LIB_DIR = $$_PRO_FILE_PWD_/../harbour-lib
|
||||
|
||||
HARBOUR_INCLUDE_DIR = $$HARBOUR_LIB_DIR/include
|
||||
HARBOUR_SRC_DIR = $$HARBOUR_LIB_DIR/src
|
||||
|
||||
# Libraries
|
||||
FBREADER_LIB = $$OUT_PWD/../fbreader/libfbreader.a
|
||||
FRIBIDI_LIB = $$OUT_PWD/../fribidi/libfribidi.a
|
||||
LINEBREAK_LIB = $$OUT_PWD/../linebreak/liblinebreak.a
|
||||
HARBOUR_LIB = $$OUT_PWD/../harbour-lib/libharbour-lib.a
|
||||
|
||||
PRE_TARGETDEPS += \
|
||||
$$FBREADER_LIB \
|
||||
$$FRIBIDI_LIB \
|
||||
$$LINEBREAK_LIB \
|
||||
$$HARBOUR_LIB
|
||||
$$LINEBREAK_LIB
|
||||
LIBS += \
|
||||
$$FBREADER_LIB \
|
||||
$$FRIBIDI_LIB \
|
||||
$$LINEBREAK_LIB \
|
||||
$$HARBOUR_LIB \
|
||||
-lbz2 -lz -ldl
|
||||
|
||||
OTHER_FILES += \
|
||||
|
@ -86,7 +86,7 @@ INSTALLS += formats
|
|||
|
||||
INCLUDEPATH += \
|
||||
src \
|
||||
$$HARBOUR_LIB_DIR/include \
|
||||
$$HARBOUR_INCLUDE_DIR \
|
||||
$$FBREADER_DIR/fbreader/fbreader/src \
|
||||
$$FBREADER_DIR/fbreader/zlibrary/text/include \
|
||||
$$FBREADER_DIR/fbreader/zlibrary/core/include \
|
||||
|
@ -173,6 +173,24 @@ HEADERS += \
|
|||
src/BooksTypes.h \
|
||||
src/BooksUtil.h
|
||||
|
||||
# harbour-lib
|
||||
|
||||
HEADERS += \
|
||||
$$HARBOUR_INCLUDE_DIR/HarbourDisplayBlanking.h \
|
||||
$$HARBOUR_INCLUDE_DIR/HarbourJson.h \
|
||||
$$HARBOUR_INCLUDE_DIR/HarbourPluginLoader.h \
|
||||
$$HARBOUR_INCLUDE_DIR/HarbourTask.h
|
||||
|
||||
HEADERS += \
|
||||
$$HARBOUR_SRC_DIR/HarbourMce.h
|
||||
|
||||
SOURCES += \
|
||||
$$HARBOUR_SRC_DIR/HarbourDisplayBlanking.cpp \
|
||||
$$HARBOUR_SRC_DIR/HarbourJson.cpp \
|
||||
$$HARBOUR_SRC_DIR/HarbourMce.cpp \
|
||||
$$HARBOUR_SRC_DIR/HarbourPluginLoader.cpp \
|
||||
$$HARBOUR_SRC_DIR/HarbourTask.cpp
|
||||
|
||||
# Icons
|
||||
ICON_SIZES = 86 108 128 256
|
||||
for(s, ICON_SIZES) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2015-2018 Jolla Ltd.
|
||||
Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
|
||||
Copyright (C) 2015-2019 Jolla Ltd.
|
||||
Copyright (C) 2015-2019 Slava Monich <slava.monich@jolla.com>
|
||||
|
||||
You may use this file under the terms of BSD license as follows:
|
||||
|
||||
|
@ -8,14 +8,15 @@
|
|||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Jolla Ltd nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the names of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
|
@ -53,7 +54,6 @@ ApplicationWindow {
|
|||
|
||||
BooksHints { id: globalHints }
|
||||
BooksFeedback { id: globalFeedback }
|
||||
SystemState { id: globalSystemState }
|
||||
DisplayBlanking {
|
||||
pauseRequested: Qt.application.active &&
|
||||
Settings.currentBook &&
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2015-2018 Jolla Ltd.
|
||||
Contact: Slava Monich <slava.monich@jolla.com>
|
||||
Copyright (C) 2015-2019 Jolla Ltd.
|
||||
Copyright (C) 2015-2019 Slava Monich <slava.monich@jolla.com>
|
||||
|
||||
You may use this file under the terms of BSD license as follows:
|
||||
|
||||
|
@ -8,14 +8,15 @@
|
|||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Jolla Ltd nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the names of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
|
@ -146,8 +147,8 @@ SilicaFlickable {
|
|||
}
|
||||
|
||||
Connections {
|
||||
target: globalSystemState
|
||||
onLockModeChanged: if (target.lockMode === globalSystemState.MCE_TK_LOCKED) editMode = false
|
||||
target: Qt.application
|
||||
onActiveChanged: if (!Qt.application.active) editMode = false
|
||||
}
|
||||
|
||||
BookStorage {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2018 Jolla Ltd.
|
||||
* Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
|
||||
* Copyright (C) 2015-2019 Jolla Ltd.
|
||||
* Copyright (C) 2015-2019 Slava Monich <slava.monich@jolla.com>
|
||||
*
|
||||
* You may use this file under the terms of the BSD license as follows:
|
||||
*
|
||||
|
@ -8,15 +8,15 @@
|
|||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Jolla Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the names of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
|
@ -49,8 +49,8 @@
|
|||
#include "BooksFeedback.h"
|
||||
#include "BooksHints.h"
|
||||
|
||||
#include "HarbourDisplayBlanking.h"
|
||||
#include "HarbourDebug.h"
|
||||
#include "HarbourLib.h"
|
||||
|
||||
#include "ZLibrary.h"
|
||||
|
||||
|
@ -86,8 +86,7 @@ Q_DECL_EXPORT int main(int argc, char **argv)
|
|||
BOOKS_QML_REGISTER(BooksFeedback, "BooksFeedback");
|
||||
BOOKS_QML_REGISTER(BooksHints, "BooksHints");
|
||||
BOOKS_QML_REGISTER(BooksSettings, "BooksSettings");
|
||||
HarbourLib::registerTypes(BOOKS_QML_PLUGIN,
|
||||
BOOKS_QML_PLUGIN_V1, BOOKS_QML_PLUGIN_V2);
|
||||
BOOKS_QML_REGISTER(HarbourDisplayBlanking, "DisplayBlanking");
|
||||
|
||||
QLocale locale;
|
||||
QTranslator* translator = new QTranslator(app);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
SUBDIRS = fribidi linebreak fbreader harbour-lib app
|
||||
SUBDIRS = fribidi linebreak fbreader app
|
||||
|
||||
OTHER_FILES += \
|
||||
README.md \
|
||||
|
|
Loading…
Reference in a new issue