1 Description: Debian patches to make tipp10 compile
2 Author: Christoph Martin <chrism@debian.org>
3 Last-Update: 2016-07-20
5 https://sources.debian.net/data/main/t/tipp10/2.1.0-2/debian/patches/0001-FixCompiling
7 --- a/widget/tickerboard.cpp
8 +++ b/widget/tickerboard.cpp
9 @@ -97,7 +97,8 @@ void TickerBoard::startTicker(bool wasPa
11 if (tickerSpeed == 50) {
13 - scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
14 + const QRect qr = QRect(10, 15, 590, 35);
15 + scroll(-290, 0, qr); //contentsRect());
19 @@ -153,7 +154,8 @@ void TickerBoard::changeChar() {
23 - scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
24 + const QRect qr = QRect(10, 15, 590, 35);
25 + scroll(-290, 0, qr); //contentsRect());
29 @@ -242,7 +244,8 @@ void TickerBoard::progress() {
31 // Move ticker 1 pixel to left
33 - scroll(-1, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
34 + const QRect qr = QRect(10, 15, 590, 35);
35 + scroll(-1, 0, qr); //contentsRect());
37 if ((lessonOffset - scrollOffset) <= 30) {
38 setSpeed(tickerSpeed);
39 @@ -265,14 +268,16 @@ void TickerBoard::progress() {
40 // 160 pixels overage (because the user must see at least the next word)
41 if ((lessonOffset - scrollOffset) > 200) {
42 scrollOffset += (lessonOffset - scrollOffset) - 200;
43 - scroll(-((lessonOffset - scrollOffset) - 200), 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
44 + const QRect qr = QRect(10, 15, 590, 35);
45 + scroll(-((lessonOffset - scrollOffset) - 200), 0, qr); //contentsRect());
48 // If the user types faster than the ticker, move ticker faster after
49 // 160 pixels overage (because the user must see at least the next word)
50 if ((lessonOffset - scrollOffset) > 280) {
52 - scroll(-570, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
53 + const QRect qr = QRect(10, 15, 590, 35);
54 + scroll(-570, 0, qr); //contentsRect());
58 --- a/widget/settingspages.cpp
59 +++ b/widget/settingspages.cpp
60 @@ -501,7 +501,7 @@ void DatabasePage::writeSettings() {
63 settings.beginGroup("database");
64 - settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString::QString(APP_USER_DB));
65 + settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString(APP_USER_DB));
69 --- a/widget/lessondialog.cpp
70 +++ b/widget/lessondialog.cpp
71 @@ -89,7 +89,7 @@ void LessonDialog::updateContent() {
72 *lessonData = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
74 for (int i = 0; i < lessonData->size(); i++) {
75 - if (QString::QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
76 + if (QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
77 lessonData->removeAt(i);
80 @@ -259,7 +259,7 @@ void LessonDialog::clickSave() {
81 contentList = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
83 for (i = 0; i < contentList.size(); i++) {
84 - if (QString::QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
85 + if (QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
86 contentList.removeAt(i);
89 --- a/sql/chartablesql.cpp
90 +++ b/sql/chartablesql.cpp
91 @@ -57,7 +57,7 @@ QVariant CharSqlModel::data(const QModel
92 // Read the unicode value
93 unicode = value.toInt();
94 // Convert unicode to a char
95 - unicodeToChar = QString::QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
96 + unicodeToChar = QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
99 // Last column (error weight)
100 --- a/sql/startsql.cpp
101 +++ b/sql/startsql.cpp
102 @@ -344,7 +344,7 @@ bool StartSql::updateOwnLesson(QString l
103 for (i = 0; i < content.size(); i++) {
104 //simplifiedContent = QString::QString(
105 // content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive).simplified();
106 - simplifiedContent = trim(QString::QString(
107 + simplifiedContent = trim(QString(
108 content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive));
110 if (!query.exec("INSERT INTO own_content VALUES(NULL,'" +
113 @@ -27,9 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fi
117 -#define APP_WIN true
118 +#define APP_WIN false
119 #define APP_MAC false
120 -#define APP_X11 false
121 +#define APP_X11 true
122 #define APP_PORTABLE false //at least one of the 3 OS must be true too!
125 @@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fi
126 #define APP_URL "http://www.tipp10.com"
127 #define APP_DB "tipp10v2.template"
128 #define APP_USER_DB "tipp10v2.db"
129 +#define APP_SHARE_DIR "/usr/share/tipp10"
132 #define UPDATE_URL "www.tipp10.com"
135 @@ -88,3 +88,15 @@ SOURCES += main.cpp \
137 games/abcrainwidget.cpp \
140 +target.path = /usr/bin/
142 +share.path = /usr/share/tipp10/
143 +share.files = release/* *wav
145 +desktop.path = /usr/share/applications/
146 +desktop.files = tipp10.desktop
148 +pixmap.path = /usr/share/pixmaps/
149 +pixmap.files = tipp10.png
151 --- a/sql/connection.h
152 +++ b/sql/connection.h
153 @@ -179,11 +179,13 @@ static bool createConnection() {
154 CANCEL_NO, "Betroffener Pfad:\n" + dbPath);*/
155 // Try to create new databae in user path
156 // Exist a database in the program dir?
157 - if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
158 + // if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
159 + if (QFile::exists(QString(APP_SHARE_DIR) + "/" + dbNameTemplate)) {
160 //if (QFile::exists(":/" + dbNameTemplate)) {
161 // A database exist in the program dir
162 // -> copy database to user home dir
163 - QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
164 + // QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
165 + QFile file(QString(APP_SHARE_DIR) + "/" + dbNameTemplate);
166 //QFile file(":/" + dbNameTemplate);
167 if (file.copy(dbPath)) {
168 QFile::setPermissions(dbPath, QFile::permissions(dbPath) | QFile::WriteUser);
169 @@ -229,7 +231,8 @@ static bool createConnection() {
170 // Exist a database in user's home dir?
171 if (!QFile::exists(dbPath)) {
172 // Exist a database template in the program dir?
173 - dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
174 + // dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
175 + dbPath = QString(APP_SHARE_DIR) + "/" + dbNameTemplate;
176 //dbPath = ":/" + dbNameTemplate;
177 if (QFile::exists(dbPath)) {
178 // A database template exist in the program dir
179 --- a/widget/helpbrowser.cpp
180 +++ b/widget/helpbrowser.cpp
181 @@ -52,13 +52,15 @@ HelpBrowser::HelpBrowser(QString link, Q
182 textBrowser->setOpenExternalLinks(true);
184 textBrowser->setSource(QString("file:///") +
185 - QCoreApplication::applicationDirPath() +
186 + // QCoreApplication::applicationDirPath() +
188 QString("/help/") + language + QString("/index.html"));
192 textBrowser->setSource(QString("file:///") +
193 - QCoreApplication::applicationDirPath() +
194 + // QCoreApplication::applicationDirPath() +
196 QString("/help/") + language + QString("/content/") + link);
205 Comment=Touch Typing Tutor
206 Comment[de]=10-Finger-Schreibtrainer
211 Categories=Education;
212 +Keywords=learning;touchtyping