From 8c43f025ea4c42f0923dc1cab60d2cedafd74e23 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:18:01 +0100 Subject: [PATCH] package created using the webbuild interface [release 0.8.1.20160727git-1mamba;Wed Jul 27 2016] --- README.md | 2 + ...7git-disable_updates_check_and_crash.patch | 54 ++ ...160727git-fix-crash-on-save-settings.patch | 34 + qtadb-0.8.1.20160727git-revert-to-qt4.patch | 846 ++++++++++++++++++ qtadb.desktop | 10 + qtadb.png | Bin 0 -> 1431 bytes qtadb.spec | 71 ++ 7 files changed, 1017 insertions(+) create mode 100644 qtadb-0.8.1.20160727git-disable_updates_check_and_crash.patch create mode 100644 qtadb-0.8.1.20160727git-fix-crash-on-save-settings.patch create mode 100644 qtadb-0.8.1.20160727git-revert-to-qt4.patch create mode 100644 qtadb.desktop create mode 100644 qtadb.png create mode 100644 qtadb.spec diff --git a/README.md b/README.md index 3664117..7023f0a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # qtadb +QtADB is an adb graphical frontend. + diff --git a/qtadb-0.8.1.20160727git-disable_updates_check_and_crash.patch b/qtadb-0.8.1.20160727git-disable_updates_check_and_crash.patch new file mode 100644 index 0000000..3dab404 --- /dev/null +++ b/qtadb-0.8.1.20160727git-disable_updates_check_and_crash.patch @@ -0,0 +1,54 @@ +--- qtadb-0.8.1.20160727git/widgets/settingswidget.cpp.orig 2016-07-27 13:48:10.560281318 +0200 ++++ qtadb-0.8.1.20160727git/widgets/settingswidget.cpp 2016-07-27 13:48:46.706306638 +0200 +@@ -182,7 +182,7 @@ + this->showPhoneColumnsHeaders = true; + this->dialogKopiujShowModal = true; + this->killDemonOnExit = false; +- this->checkForUpdatesOnStart = true; ++ this->checkForUpdatesOnStart = false; + this->color = true; + this->colorShellFiles = true; + this->showAppIcon = false; +@@ -395,7 +395,7 @@ + this->showPhoneColumnsHeaders = settings->value("showPhoneColumnsHeaders", true).toBool(); + this->dialogKopiujShowModal = settings->value("dialogKopiujShowModal", true).toBool(); + this->killDemonOnExit = settings->value("killDemonOnExit", false).toBool(); +- this->checkForUpdatesOnStart = settings->value("checkForUpdatesOnStart", true).toBool(); ++ this->checkForUpdatesOnStart = settings->value("checkForUpdatesOnStart", false).toBool(); + this->color = settings->value("color", true).toBool(); + this->colorShellFiles = settings->value("colorShellFiles", true).toBool(); + this->showAppIcon = settings->value("showAppIcon", false).toBool(); +--- qtadb-0.8.1.20160727git/classes/updateapp.cpp 2016-07-27 12:42:19.000000000 +0200 ++++ qtadb-0.8.1.20160727git/classes/updateapp.cpp.orig 2016-07-27 14:21:44.729444327 +0200 +@@ -73,5 +73,4 @@ + + void UpdateApp::checkUpdates() + { +- this->reply = this->updateMan->get(QNetworkRequest(QUrl("http://qtadb.com/wordpress/download"))); + } +--- qtadb-0.8.1.20160727git/dialogs/appinfo.cpp.orig 2016-07-27 14:28:55.164722945 +0200 ++++ qtadb-0.8.1.20160727git/dialogs/appinfo.cpp 2016-07-27 14:29:30.801747304 +0200 +@@ -61,7 +61,6 @@ + + connect(this->ui->pushButton, SIGNAL(clicked()), this, SLOT(install())); + connect(this->ui->pushButton_2, SIGNAL(clicked()), this, SLOT(openMarket())); +- connect(this->updateMan, SIGNAL(finished(QNetworkReply*)), this, SLOT(gotWWW(QNetworkReply*))); + connect(this->ui->pushButton_3, SIGNAL(clicked()), this, SLOT(openMarketPC())); + this->getQR(); + +@@ -107,7 +106,6 @@ + + connect(this->ui->pushButton, SIGNAL(clicked()), this, SLOT(install())); + connect(this->ui->pushButton_2, SIGNAL(clicked()), this, SLOT(openMarket())); +- connect(this->updateMan, SIGNAL(finished(QNetworkReply*)), this, SLOT(gotWWW(QNetworkReply*))); + this->getQR(); + + // ui->pageApps->setLayout(ui->layoutApps); +@@ -118,7 +116,6 @@ + if (this->appsDialog != NULL) + delete this->appsDialog; + delete this->app; +- delete this->reply; + delete ui; + } + diff --git a/qtadb-0.8.1.20160727git-fix-crash-on-save-settings.patch b/qtadb-0.8.1.20160727git-fix-crash-on-save-settings.patch new file mode 100644 index 0000000..6f6aa9a --- /dev/null +++ b/qtadb-0.8.1.20160727git-fix-crash-on-save-settings.patch @@ -0,0 +1,34 @@ +--- qtadb-0.8.1.20160727git/dialogs/mainwindow.cpp.orig 2016-07-27 14:44:31.591977208 +0200 ++++ qtadb-0.8.1.20160727git/dialogs/mainwindow.cpp 2016-07-27 14:45:08.595965418 +0200 +@@ -179,12 +179,6 @@ + delete this->systemTray; + + delete this->fileWidget; +- if (!this->settingsWidget->clearSettings) +- { +- QSettings settings; +- settings.setValue("windowGeometry", saveGeometry()); +- this->settingsWidget->saveSettings(); +- } + if (this->settingsWidget != NULL) + delete this->settingsWidget; + +--- qtadb-0.8.1.20160727git/widgets/settingswidget.cpp.orig 2016-07-27 14:53:44.615903214 +0200 ++++ qtadb-0.8.1.20160727git/widgets/settingswidget.cpp 2016-07-27 14:54:05.367903466 +0200 +@@ -142,16 +142,6 @@ + + SettingsWidget::~SettingsWidget() + { +- QSettings *settings = new QSettings; +- if (this->rememberPhonePath) +- settings->setValue("phonePath", this->phonePath); +- if (this->rememberComputerPath) +- settings->setValue("computerPath", this->computerPath); +- +- //settings->setValue("sdkPath", this->sdkPath); +- //settings->setValue("wlanIP", this->wlanIP); +- +- delete settings; + delete ui; + } + diff --git a/qtadb-0.8.1.20160727git-revert-to-qt4.patch b/qtadb-0.8.1.20160727git-revert-to-qt4.patch new file mode 100644 index 0000000..92f456c --- /dev/null +++ b/qtadb-0.8.1.20160727git-revert-to-qt4.patch @@ -0,0 +1,846 @@ +From ccbb0c86c9eb9362a378db9f6c2a6b48b5d72c07 Mon Sep 17 00:00:00 2001 +From: ryba <7ymekk@gmail.com> +Date: Sat, 22 Nov 2014 12:44:42 +0100 +Subject: [PATCH] Qt5.3 + +--- + classes/animation.h | 3 +- + classes/models/contactmodel.cpp | 6 ++- + classes/models/contactmodel.h | 2 + + classes/models/messagemodel.cpp | 6 ++- + classes/models/messagemodel.h | 2 + + classes/models/messagethreadmodel.cpp | 7 ++- + classes/models/messagethreadmodel.h | 2 + + classes/mytableview.cpp | 2 + + classes/phone.cpp | 12 +++-- + dialogs/connectWifi.cpp | 4 +- + dialogs/connectWifi.h | 2 +- + dialogs/logcatdialog.cpp | 4 ++ + dialogs/mainwindow.cpp | 22 +++++---- + dialogs/mainwindow.h | 3 +- + dialogs/registerdialog.cpp | 2 +- + main.cpp | 87 ++++++++++++++++++++++++----------- + threads/screenshotthread.cpp | 2 +- + widgets/appwidget.cpp | 25 +++++----- + widgets/contactwidget.cpp | 2 +- + widgets/fastbootwidget.cpp | 3 ++ + widgets/fastbootwidget.h | 2 +- + widgets/filewidget.cpp | 22 +++++---- + widgets/messagewidget.cpp | 1 + + widgets/recoverywidget.cpp | 2 + + widgets/screenshotwidget.cpp | 3 ++ + widgets/screenshotwidget.h | 2 +- + widgets/settingswidget.cpp | 8 +++- + widgets/shellwidget.cpp | 15 ++++-- + widgets/shellwidget.h | 3 +- + 29 files changed, 175 insertions(+), 81 deletions(-) + +diff --git a/classes/animation.h b/classes/animation.h +index c57ea26..b13f046 100644 +--- a/classes/animation.h ++++ b/classes/animation.h +@@ -21,7 +21,8 @@ + #ifndef ANIMATION_H + #define ANIMATION_H + +-#include ++#include ++#include + + #define UP_TO_DOWN 0 + #define DOWN_TO_UP 1 +diff --git a/classes/models/contactmodel.cpp b/classes/models/contactmodel.cpp +index 8e1f928..9130629 100644 +--- a/classes/models/contactmodel.cpp ++++ b/classes/models/contactmodel.cpp +@@ -80,11 +80,15 @@ bool ContactModel::clear() + ContactModel::ContactModel(QObject *parent) + : QAbstractListModel(parent) + { ++} ++ ++QHash ContactModel::roleNames() ++{ + QHash roles; + roles[IdRole] = "threadId"; + roles[NumberRole] = "number"; + roles[NameRole] = "name"; +- setRoleNames(roles); ++ return roles; + } + + void ContactModel::addContact(const Contact &contact) +diff --git a/classes/models/contactmodel.h b/classes/models/contactmodel.h +index 16073dd..0fb88c7 100644 +--- a/classes/models/contactmodel.h ++++ b/classes/models/contactmodel.h +@@ -53,6 +53,8 @@ public: + QString getNumber(QString name); + QString getName(QString number); + ++ QHash roleNames(); ++ + private: + QList contacts; + }; +diff --git a/classes/models/messagemodel.cpp b/classes/models/messagemodel.cpp +index b587803..3b770e5 100644 +--- a/classes/models/messagemodel.cpp ++++ b/classes/models/messagemodel.cpp +@@ -116,6 +116,10 @@ bool MessageModel::clear() + MessageModel::MessageModel(QObject *parent) + : QAbstractListModel(parent) + { ++} ++ ++QHash MessageModel::roleNames() ++{ + QHash roles; + roles[ThreadIdRole] = "threadId"; + roles[MessageIdRole] = "messageId"; +@@ -125,7 +129,7 @@ MessageModel::MessageModel(QObject *parent) + roles[ReadRole] = "read"; + roles[ToaRole] = "toa"; + roles[ContactNameRole] = "contactName"; +- setRoleNames(roles); ++ return roles; + } + + void MessageModel::addMessage(const Message &message) +diff --git a/classes/models/messagemodel.h b/classes/models/messagemodel.h +index 1a1c2f7..d95a425 100644 +--- a/classes/models/messagemodel.h ++++ b/classes/models/messagemodel.h +@@ -64,6 +64,8 @@ public: + void markThreadAsRead(QString id); + bool clear(); + ++ QHash roleNames(); ++ + private: + QList messages; + }; +diff --git a/classes/models/messagethreadmodel.cpp b/classes/models/messagethreadmodel.cpp +index 927a8db..0cc0c05 100644 +--- a/classes/models/messagethreadmodel.cpp ++++ b/classes/models/messagethreadmodel.cpp +@@ -173,6 +173,11 @@ bool MessageThreadModel::clear() + MessageThreadModel::MessageThreadModel(QObject *parent) + : QAbstractListModel(parent) + { ++ ++} ++ ++QHash MessageThreadModel::roleNames() ++{ + QHash roles; + roles[ThreadIdRole] = "threadId"; + roles[MessageCountRole] = "messageCount"; +@@ -181,7 +186,7 @@ MessageThreadModel::MessageThreadModel(QObject *parent) + roles[LastBodyRole] = "lastBody"; + roles[ReadRole] = "read"; + roles[ContactNameRole] = "contactName"; +- setRoleNames(roles); ++ return roles; + } + + void MessageThreadModel::addThread(const MessageThread &thread) +diff --git a/classes/models/messagethreadmodel.h b/classes/models/messagethreadmodel.h +index a53fef1..8b3515c 100644 +--- a/classes/models/messagethreadmodel.h ++++ b/classes/models/messagethreadmodel.h +@@ -65,6 +65,8 @@ public: + void addThread(const MessageThread &thread); + bool clear(); + ++ QHash roleNames(); ++ + private: + QList threads; + }; +diff --git a/classes/mytableview.cpp b/classes/mytableview.cpp +index 23f9a04..8116903 100644 +--- a/classes/mytableview.cpp ++++ b/classes/mytableview.cpp +@@ -20,6 +20,8 @@ + + #include "mytableview.h" + ++#include ++ + MyTableView::MyTableView(QWidget *parent) : + QTableView(parent) + { +diff --git a/classes/phone.cpp b/classes/phone.cpp +index 217f984..d072285 100644 +--- a/classes/phone.cpp ++++ b/classes/phone.cpp +@@ -21,7 +21,9 @@ + #include "phone.h" + #include + #include +- ++#include ++#include ++#include + + void ConnectionThread::run() + { +@@ -324,7 +326,7 @@ QList *Phone::getFileList() + tmpFile.fileColor = QColor(Qt::black); + name.remove(QRegExp("\\[\\d;\\d+m")); + +- tmpFile.fileName = QString::fromUtf8(name.toAscii()); ++ tmpFile.fileName = QString::fromUtf8(name.toLatin1()); + tmpFile.filePath = this->getPath() + tmpFile.fileName; + + qDebug()<<"Phone::getFileList() - plik: "< *Phone::getFileList(QString filter) + tmpFile.fileColor = QColor(Qt::black); + name.remove(QRegExp("\\[\\d;\\d+m")); + +- tmpFile.fileName = QString::fromUtf8(name.toAscii()); ++ tmpFile.fileName = QString::fromUtf8(name.toLatin1()); + tmpFile.filePath = this->getPath() + tmpFile.fileName; + + qDebug()<<"Phone::getFileList() - plik: "<toUnicode(path.toAscii())+"\'\""; ++ command="\""+sdk+"\""+"adb shell \"busybox ls -l -a \'"+codec->toUnicode(path.toLatin1())+"\'\""; + else +- command="\""+sdk+"\""+"adb shell \"busybox ls -l \'"+codec->toUnicode(path.toAscii())+"\'\""; ++ command="\""+sdk+"\""+"adb shell \"busybox ls -l \'"+codec->toUnicode(path.toLatin1())+"\'\""; + + qDebug()<<"Phone::getFileList() - "<start(command); +diff --git a/dialogs/connectWifi.cpp b/dialogs/connectWifi.cpp +index 6ac31ce..2b5770a 100644 +--- a/dialogs/connectWifi.cpp ++++ b/dialogs/connectWifi.cpp +@@ -20,8 +20,8 @@ + + #include "connectWifi.h" + +-ConnectWifi::ConnectWifi( QWidget * parent, Qt::WFlags f) +- : QDialog(parent, f) ++ConnectWifi::ConnectWifi( QWidget * parent) ++ : QDialog(parent) + { + setupUi(this); + this->setLayout(this->gridLayout); +diff --git a/dialogs/connectWifi.h b/dialogs/connectWifi.h +index bf71d04..9909853 100644 +--- a/dialogs/connectWifi.h ++++ b/dialogs/connectWifi.h +@@ -30,7 +30,7 @@ class ConnectWifi : public QDialog, public Ui::ConnectWifi + { + Q_OBJECT + public: +- ConnectWifi( QWidget * parent = 0, Qt::WFlags f = 0 ); ++ ConnectWifi( QWidget * parent = 0); + }; + #endif + +diff --git a/dialogs/logcatdialog.cpp b/dialogs/logcatdialog.cpp +index 9be7699..f896d51 100644 +--- a/dialogs/logcatdialog.cpp ++++ b/dialogs/logcatdialog.cpp +@@ -21,6 +21,10 @@ + #include "logcatdialog.h" + #include "ui_logcatdialog.h" + ++#include ++#include ++#include ++ + LogcatDialog::LogcatDialog(QWidget *parent) : + QDialog(parent) + { +diff --git a/dialogs/mainwindow.cpp b/dialogs/mainwindow.cpp +index 8629b3b..06c081b 100644 +--- a/dialogs/mainwindow.cpp ++++ b/dialogs/mainwindow.cpp +@@ -22,6 +22,9 @@ + #include "../classes/application.h" + #include "ui_mainwindow.h" + ++#include ++#include ++ + MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow) + { + ui->setupUi(this); +@@ -232,8 +235,8 @@ void MainWindow::changeEvent(QEvent *e) + this->logcatDialog->retranslateUi(this->logcatDialog); + for (int i=0; i < this->akcje.size(); i++) + { +- akcje.at(i).actionMenu->setText(tr(akcje.at(i).text.toAscii())); +- akcje.at(i).button->setText(tr(akcje.at(i).text.toAscii())); ++ akcje.at(i).actionMenu->setText(tr(akcje.at(i).text.toLatin1())); ++ akcje.at(i).button->setText(tr(akcje.at(i).text.toLatin1())); + } + break; + default: +@@ -657,7 +660,7 @@ bool MainWindow::verifyKey(QString email,QString key) + QCryptographicHash md5(QCryptographicHash::Md5); + QCryptographicHash sha1(QCryptographicHash::Sha1); + +- md5.addData(email.toAscii()); ++ md5.addData(email.toLatin1()); + sha1.addData(md5.result()); + + QString tmp = sha1.result().toHex(); +@@ -712,13 +715,14 @@ void MainWindow::showPageMessages() + else if (firstRun.addDays(10) <= QDate::currentDate()) + { + qDebug()<<"MainWindow::showPageMessages(): demo is over dude"; +- accountList = Phone::getGoogleAccounts(); ++ verified = true; ++// accountList = Phone::getGoogleAccounts(); + +- foreach(QString element, accountList) +- { +- if (verifyRegistered(element)) +- verified = true; +- } ++// foreach(QString element, accountList) ++// { ++// if (verifyRegistered(element)) ++// verified = true; ++// } + } + else + { +diff --git a/dialogs/mainwindow.h b/dialogs/mainwindow.h +index 0485c8b..24836c1 100644 +--- a/dialogs/mainwindow.h ++++ b/dialogs/mainwindow.h +@@ -30,7 +30,8 @@ + #include + #include + +-#include ++#include ++#include + + #include "dialogkopiuj.h" + #include "../threads/screenshotthread.h" +diff --git a/dialogs/registerdialog.cpp b/dialogs/registerdialog.cpp +index 0d50398..d2ee10f 100644 +--- a/dialogs/registerdialog.cpp ++++ b/dialogs/registerdialog.cpp +@@ -77,7 +77,7 @@ bool RegisterDialog::verifyKey(QString key) + QCryptographicHash md5(QCryptographicHash::Md5); + QCryptographicHash sha1(QCryptographicHash::Sha1); + +- md5.addData("QtADB"+element.toAscii()+"qtadb"); ++ md5.addData("QtADB"+element.toLatin1()+"qtadb"); + sha1.addData(md5.result()); + + if (key == sha1.result().toHex()) +diff --git a/main.cpp b/main.cpp +index 796b102..4a9fa50 100644 +--- a/main.cpp ++++ b/main.cpp +@@ -18,46 +18,79 @@ + ************************************************************************/ + + +-#include ++#include + #include "./classes/application.h" + #include "./dialogs/mainwindow.h" + //////////////////////////////////////// + #include + #include + #include ++#include + +-void myMessageHandler(QtMsgType type, const char *msg) ++void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) + { +- QStringList args = qApp->arguments(); ++ Q_UNUSED(context); + ++// QString dt = QDateTime::currentDateTime().toString("dd/MM/yyyy hh:mm:ss"); ++// QString txt = QString("[%1] ").arg(dt); + QString txt; +- switch (type) { +- case QtDebugMsg: +- txt = QString("Debug: %1").arg(msg); +- break; +- case QtWarningMsg: +- txt = QString("Warning: %1").arg(msg); +- break; +- case QtCriticalMsg: +- txt = QString("Critical: %1").arg(msg); +- break; +- case QtFatalMsg: +- txt = QString("Fatal: %1").arg(msg); +- abort(); +- } +- if (args.contains("--debug")) +- { +- QFile outFile("debug.log"); +- outFile.open(QIODevice::WriteOnly | QIODevice::Append); +- QTextStream ts(&outFile); + +- txt.remove(QChar( 0xa ),Qt::CaseInsensitive); +- txt.remove(QChar( 0xd ),Qt::CaseInsensitive); ++ switch (type) ++ { ++ case QtDebugMsg: ++ txt += QString("{Debug} \t\t %1").arg(msg); ++ break; ++ case QtWarningMsg: ++ txt += QString("{Warning} \t %1").arg(msg); ++ break; ++ case QtCriticalMsg: ++ txt += QString("{Critical} \t %1").arg(msg); ++ break; ++ case QtFatalMsg: ++ txt += QString("{Fatal} \t\t %1").arg(msg); ++ abort(); ++ break; ++ } + +- ts << txt << endl; +- } ++ QFile outFile("debug.log"); ++ outFile.open(QIODevice::WriteOnly | QIODevice::Append); ++ ++ QTextStream textStream(&outFile); ++ textStream << txt << endl; + } + ++//void myMessageHandler(QtMsgType type, const char *msg) ++//{ ++// QStringList args = qApp->arguments(); ++ ++// QString txt; ++// switch (type) { ++// case QtDebugMsg: ++// txt = QString("Debug: %1").arg(msg); ++// break; ++// case QtWarningMsg: ++// txt = QString("Warning: %1").arg(msg); ++// break; ++// case QtCriticalMsg: ++// txt = QString("Critical: %1").arg(msg); ++// break; ++// case QtFatalMsg: ++// txt = QString("Fatal: %1").arg(msg); ++// abort(); ++// } ++// if (args.contains("--debug")) ++// { ++// QFile outFile("debug.log"); ++// outFile.open(QIODevice::WriteOnly | QIODevice::Append); ++// QTextStream ts(&outFile); ++ ++// txt.remove(QChar( 0xa ),Qt::CaseInsensitive); ++// txt.remove(QChar( 0xd ),Qt::CaseInsensitive); ++ ++// ts << txt << endl; ++// } ++//} ++ + int main(int argc, char *argv[]) + { + QCoreApplication::setOrganizationName("Bracia"); +@@ -65,7 +98,7 @@ int main(int argc, char *argv[]) + QCoreApplication::setApplicationVersion("0.8.1"); + QCoreApplication::setOrganizationDomain("http://qtadb.com"); + Application a(argc, argv); +- qInstallMsgHandler(myMessageHandler); ++ qInstallMessageHandler(customMessageHandler); + a.loadTranslations(":/lang"); + a.loadTranslations(qApp->applicationDirPath()); + a.setQuitOnLastWindowClosed(true); +diff --git a/threads/screenshotthread.cpp b/threads/screenshotthread.cpp +index 08e1709..c54e6dd 100644 +--- a/threads/screenshotthread.cpp ++++ b/threads/screenshotthread.cpp +@@ -140,7 +140,7 @@ void ThreadScreenshot::run() + { + tmp.setNum(serialNumber.length()+15, 16); + tmp = tmp.rightJustified(4, '0'); +- this->socket->write(tmp.toAscii() + "host:transport:" + serialNumber.toAscii()); ++ this->socket->write(tmp.toLatin1() + "host:transport:" + serialNumber.toLatin1()); + this->socket->waitForReadyRead(2000); + data = this->socket->read(4); + if (data == "OKAY") +diff --git a/widgets/appwidget.cpp b/widgets/appwidget.cpp +index bebb929..3cba532 100644 +--- a/widgets/appwidget.cpp ++++ b/widgets/appwidget.cpp +@@ -21,6 +21,9 @@ + #include "appwidget.h" + #include "ui_appwidget.h" + ++#include ++#include ++ + AppWidget::AppWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::AppWidget) +@@ -132,17 +135,17 @@ void AppWidget::changeEvent(QEvent *e) + if (this->appMenu != NULL) + { + foreach(QAction *action, this->appMenu->actions()) +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + } + if (this->backupMenu != NULL) + { + foreach(QAction *action, this->backupMenu->actions()) +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + } + foreach(QAction *action, this->ui->toolButtonBackup->menu()->actions()) +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + foreach(QAction *action, this->ui->toolButtonRestore->menu()->actions()) +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + + break; + default: +@@ -618,7 +621,7 @@ void AppWidget::missingAapt() + + msgBox->exec(); + +- if (msgBox->clickedButton() == download) ++ if (msgBox->clickedButton() == (QAbstractButton*)download) + { + QDesktopServices::openUrl(QUrl("http://qtadb.wordpress.com/download/")); + QDesktopServices::openUrl(QUrl("file:///"+this->sdk)); +@@ -1030,7 +1033,7 @@ void ThreadBackups::run() + { + tmp.remove("app.name="); + tmp.remove(QRegExp("\\s+$")); +- backupFound.appName = QString::fromUtf8(tmp.toAscii()); ++ backupFound.appName = QString::fromUtf8(tmp.toLatin1()); + } + else if (tmp.contains("app.size")) + { +@@ -1313,7 +1316,7 @@ void ThreadApps::run() + { + if (aaptLineParts.first().contains(QRegExp("name=")) && app.packageName.isEmpty()) + { +- app.packageName=QString::fromUtf8(aaptLineParts.first().toAscii()); ++ app.packageName=QString::fromUtf8(aaptLineParts.first().toLatin1()); + app.packageName.remove(0,app.packageName.indexOf("name=")+5); + app.packageName.remove("'"); + } +@@ -1325,7 +1328,7 @@ void ThreadApps::run() + } + else if (aaptLineParts.first().contains(QRegExp("label="))&&app.appName.isEmpty()) + { +- app.appName=QString::fromUtf8(aaptLineParts.first().toAscii()); ++ app.appName=QString::fromUtf8(aaptLineParts.first().toLatin1()); + app.appName.remove(0,app.appName.indexOf("label=")+6); + app.appName.remove("'"); + } +@@ -1341,7 +1344,7 @@ void ThreadApps::run() + } + qDebug()<<"Apps aapt decoded"; + settings.setValue("apps/"+app.packageName+"/icoName", app.icoName); +- settings.setValue("apps/"+app.packageName+"/appName", QString::fromUtf8(app.appName.toAscii())); ++ settings.setValue("apps/"+app.packageName+"/appName", QString::fromUtf8(app.appName.toLatin1())); + settings.setValue("apps/"+app.packageName+"/version", app.appVersion); + settings.setValue("apps/"+app.packageName+"/size", app.appSize); + settings.setValue("apps/"+app.packageName+"/date", app.date); +@@ -1506,7 +1509,7 @@ App * AppWidget::getAppInfo(QString filePath) + } + else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty()) + { +- app->appName=QString::fromUtf8(aaptLineParts.first().toAscii()); ++ app->appName=QString::fromUtf8(aaptLineParts.first().toLatin1()); + app->appName.remove(0,app->appName.indexOf("label=")+6); + app->appName.remove("'"); + } +@@ -1524,7 +1527,7 @@ App * AppWidget::getAppInfo(QString filePath) + if (!settings.contains(app->packageName)) + { + settings.setValue(app->packageName+"/icoName", app->icoName); +- settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toAscii())); ++ settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toLatin1())); + settings.setValue(app->packageName+"/version", app->appVersion); + } + +diff --git a/widgets/contactwidget.cpp b/widgets/contactwidget.cpp +index be1aadd..4e20bf7 100644 +--- a/widgets/contactwidget.cpp ++++ b/widgets/contactwidget.cpp +@@ -92,7 +92,7 @@ + // proces->start("\""+sdk+"\""+"adb shell sqlite3"); + // proces->waitForReadyRead(-1); + // tmp=proces->readLine(); +-// proces->write(QString(QChar(0x3)).toAscii()); ++// proces->write(QString(QChar(0x3)).toLatin1()); + // proces->close(); + + // if (tmp.contains("not found")) +diff --git a/widgets/fastbootwidget.cpp b/widgets/fastbootwidget.cpp +index 0f2e829..f5e5920 100644 +--- a/widgets/fastbootwidget.cpp ++++ b/widgets/fastbootwidget.cpp +@@ -21,6 +21,9 @@ + #include "fastbootwidget.h" + #include "ui_fastbootwidget.h" + ++#include ++#include ++ + FastbootWidget::FastbootWidget(QWidget *parent,Phone *phone) : + QWidget(parent), + ui(new Ui::FastbootWidget) +diff --git a/widgets/fastbootwidget.h b/widgets/fastbootwidget.h +index 8b31ded..79ad19d 100644 +--- a/widgets/fastbootwidget.h ++++ b/widgets/fastbootwidget.h +@@ -21,7 +21,7 @@ + #ifndef FASTBOOTWIDGET_H + #define FASTBOOTWIDGET_H + +-#include ++#include + #include "../classes/phone.h" + + namespace Ui { +diff --git a/widgets/filewidget.cpp b/widgets/filewidget.cpp +index 01717b5..2cb769e 100644 +--- a/widgets/filewidget.cpp ++++ b/widgets/filewidget.cpp +@@ -21,6 +21,10 @@ + #include "filewidget.h" + #include "ui_filewidget.h" + ++#include ++#include ++#include ++ + quint32 qbytearrayToInt32(QByteArray array) + { + QDataStream stream(array); +@@ -212,15 +216,17 @@ FileWidget::FileWidget(QWidget *parent, SettingsWidget *settings) : + //ustawienie comboboxa + QPair para; + QFileIconProvider *provider = new QFileIconProvider; +- para.second = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); ++ para.second = QStandardPaths::standardLocations(QStandardPaths::DesktopLocation).first();//QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); + para.first = provider->icon(QFileInfo(para.second)); + this->ui->leftComboBox->addItem(para.first, para.second); + +- para.second = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); ++ para.second = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first(); ++// para.second = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); + para.first = provider->icon(QFileInfo(para.second)); + this->ui->leftComboBox->addItem(para.first, para.second); + +- para.second = QDesktopServices::storageLocation(QDesktopServices::HomeLocation); ++ QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first(); ++// para.second = QDesktopServices::storageLocation(QDesktopServices::HomeLocation); + para.first = provider->icon(QFileInfo(para.second)); + this->ui->leftComboBox->addItem(para.first, para.second); + +@@ -364,7 +370,7 @@ void FileWidget::changeEvent(QEvent *e) + QList actions = this->computerMenu->actions(); + foreach(QAction *action, actions) + { +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + } + } + if (this->phoneLeftMenu != NULL) +@@ -372,7 +378,7 @@ void FileWidget::changeEvent(QEvent *e) + QList actions = this->phoneLeftMenu->actions(); + foreach(QAction *action, actions) + { +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + } + } + if (this->phoneRightMenu != NULL) +@@ -380,7 +386,7 @@ void FileWidget::changeEvent(QEvent *e) + QList actions = this->phoneRightMenu->actions(); + foreach(QAction *action, actions) + { +- action->setText(tr(action->data().toString().toAscii())); ++ action->setText(tr(action->data().toString().toLatin1())); + } + } + } +@@ -1994,7 +2000,7 @@ App * FileWidget::getAppInfo(QString filePath) + } + else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty()) + { +- app->appName=QString::fromUtf8(aaptLineParts.first().toAscii()); ++ app->appName=QString::fromUtf8(aaptLineParts.first().toLatin1()); + app->appName.remove(0,app->appName.indexOf("label=")+6); + app->appName.remove("'"); + } +@@ -2012,7 +2018,7 @@ App * FileWidget::getAppInfo(QString filePath) + if (!settings.contains(app->packageName)) + { + settings.setValue(app->packageName+"/icoName", app->icoName); +- settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toAscii())); ++ settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toLatin1())); + settings.setValue(app->packageName+"/version", app->appVersion); + } + +diff --git a/widgets/messagewidget.cpp b/widgets/messagewidget.cpp +index 29e2164..10bd57f 100644 +--- a/widgets/messagewidget.cpp ++++ b/widgets/messagewidget.cpp +@@ -21,6 +21,7 @@ + #include "messagewidget.h" + #include "ui_messagewidget.h" + ++#include + + MessageWidget::MessageWidget(QWidget *parent, QString clientIP) : + QWidget(parent), +diff --git a/widgets/recoverywidget.cpp b/widgets/recoverywidget.cpp +index 5633ec6..9359241 100644 +--- a/widgets/recoverywidget.cpp ++++ b/widgets/recoverywidget.cpp +@@ -21,6 +21,8 @@ + #include "recoverywidget.h" + #include "ui_recoverywidget.h" + ++#include ++ + RecoveryWidget::RecoveryWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::RecoveryWidget) +diff --git a/widgets/screenshotwidget.cpp b/widgets/screenshotwidget.cpp +index b65ecf7..3b07a31 100644 +--- a/widgets/screenshotwidget.cpp ++++ b/widgets/screenshotwidget.cpp +@@ -21,6 +21,9 @@ + #include "screenshotwidget.h" + #include "ui_screenshotwidget.h" + ++#include ++#include ++ + ScreenshotWidget::ScreenshotWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::ScreenshotWidget) +diff --git a/widgets/screenshotwidget.h b/widgets/screenshotwidget.h +index 9f662eb..ff15ea3 100644 +--- a/widgets/screenshotwidget.h ++++ b/widgets/screenshotwidget.h +@@ -21,7 +21,7 @@ + #ifndef SCREENSHOTWIDGET_H + #define SCREENSHOTWIDGET_H + +-#include ++#include + #include "../threads/screenshotthread.h" + + namespace Ui { +diff --git a/widgets/settingswidget.cpp b/widgets/settingswidget.cpp +index d442811..ecf8bd6 100644 +--- a/widgets/settingswidget.cpp ++++ b/widgets/settingswidget.cpp +@@ -21,6 +21,10 @@ + #include "settingswidget.h" + #include "ui_settingswidget.h" + ++#include ++#include ++#include ++ + SettingsWidget::SettingsWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::SettingsWidget) +@@ -426,8 +430,8 @@ void SettingsWidget::getSettings() + this->animationDuration = settings->value("animationDuration", 1000).toInt(); + this->animationDirection = settings->value("animationDirection", 0).toInt(); + +- this->shellBackgroundColor = settings->value("shellBackgroundColor", Qt::white).value(); +- this->shellFontColor = settings->value("shellFontColor", Qt::black).value(); ++ this->shellBackgroundColor = settings->value("shellBackgroundColor", "#ffffff").value(); ++ this->shellFontColor = settings->value("shellFontColor", "#000000").value(); + + this->windowGeometry = settings->value("windowGeometry").toByteArray(); + +diff --git a/widgets/shellwidget.cpp b/widgets/shellwidget.cpp +index 4877e3f..c4990bb 100644 +--- a/widgets/shellwidget.cpp ++++ b/widgets/shellwidget.cpp +@@ -21,6 +21,11 @@ + #include "shellwidget.h" + #include "ui_shellwidget.h" + ++#include ++#include ++#include ++#include ++ + /* + dodac 2 listy stringow: + - commandList - w konstruktorze wczytywac komendy busyboxa i shella, a pozniej szift+tab bedzie podpowiadal komendy +@@ -43,10 +48,10 @@ ShellWidget::ShellWidget(QWidget *parent) : + QSettings settings; + this->sdk=settings.value("sdkPath").toString(); + +- this->fontColor = settings.value("shellFontColor", Qt::black).value(); ++ this->fontColor = settings.value("shellFontColor", "#000000").value(); + + QPalette palette = this->palette(); +- palette.setColor(QPalette::Base, settings.value("shellBackgroundColor", Qt::white).value()); ++ palette.setColor(QPalette::Base, settings.value("shellBackgroundColor", "#ffffff").value()); + + this->setPalette(palette); + +@@ -70,7 +75,7 @@ void ShellWidget::keyPressEvent(QKeyEvent *e) + { + if (e->key() == Qt::Key_C) + { +- this->process.write(QString(QChar(0x3)).toAscii()); ++ this->process.write(QString(QChar(0x3)).toLatin1()); + } + else if (e->key() == Qt::Key_Left) + { +@@ -218,7 +223,7 @@ void ShellWidget::keyPressEvent(QKeyEvent *e) + } + else if(e->key() == Qt::Key_Escape) + { +- this->process.write(QString(QChar(0x3)).toAscii()); ++ this->process.write(QString(QChar(0x3)).toLatin1()); + } + else if (e->text().length()>0) + { +@@ -402,7 +407,7 @@ void ShellWidget::keyPressEvent(QKeyEvent *e) + { + if(ui->editShell->hasFocus() && e->key() == Qt::Key_Escape) + { +- this->procesShell->write(QString(QChar(0x3)).toAscii()); ++ this->procesShell->write(QString(QChar(0x3)).toLatin1()); + } + if(ui->editShell->hasFocus() && e->key() == Qt::Key_Down) + { +diff --git a/widgets/shellwidget.h b/widgets/shellwidget.h +index ddceca2..f1cb9f8 100644 +--- a/widgets/shellwidget.h ++++ b/widgets/shellwidget.h +@@ -21,7 +21,8 @@ + #ifndef SHELLWIDGET_H + #define SHELLWIDGET_H + +-#include ++#include ++#include + + class ShellWidget : public QTextEdit + { +-- +2.7.4.1.g5468f9e + diff --git a/qtadb.desktop b/qtadb.desktop new file mode 100644 index 0000000..f392c36 --- /dev/null +++ b/qtadb.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=0.8.1 +Type=Application +Name=QtADB +GenericName=Android manager +Comment=Your android manager +TryExec=/usr/bin/qtadb +Exec=qtadb %f +Icon=/usr/share/pixmaps/qtadb.png +Categories=Utility;Qt; diff --git a/qtadb.png b/qtadb.png new file mode 100644 index 0000000000000000000000000000000000000000..1c33213c12d3b013761aace44ea5b24048dd0e9b GIT binary patch literal 1431 zcmV;I1!($-P)FsE7|0p;CMh`ci`UCRqQWwjgaEL{yAQ6{J`R6{OHA z2$i-X1s@7F2Gb@nx!s-d_s!0odz;(a+2k&zaudGYow?cX|9tz+HzBRHxSpF7*Lm}s z4IcgRamUw51kv;()o}U;bjG<)M0^!Whr*L(Gb>V6j7u|LYlS;oUEfyrD}%n*I~w=% z+wkD$ZUW4OSDZBvsbC`*xD(8ckYTZvxbfAp`+N}2RKsYl{T2wK+4v!EeZ<;+9Zz2a z?ndWK!ZmvV72BTz%ox>^x!#NGAh7SyuvFeUjIF2L1&|`vWvO&y3!Q2aLQth6%#bgk z{~G4L2N!t?0|S__LaE>;OLh`W{)IU|gPX&^xEoaVYT%Gm629MK+%Ag_T+~YLD1eTY zD@tB(CSvwwFo=7^GO|V=!t<^=0&}Zt4VKVr(A$O=hVjCbBszwl&q?w`+0c<0>?=`? zU_7&S3PvHF`zKc6`W=Kh3Jv$Ud#zVCXS*Hb5b>GA z%bxflpr19i{|n$T`wXp$p$vMb z0Z-WHvw%C`cKx&AM+?|zV(O25G2nB6GLm0MaMRC6YVBUCm3qSSu4z&(kn9Bpo} z_-<)|vSO9S(V?%VE-*O&g}kB+{%Qk+YPKN=7j_~3FtG*_uo48HNg-Sh_!aOQ;I0yV+V4-=T&ZZc64B};EuwlzDds|rzAj9(Ng#Ouu)4|Qb&d;YeTK7h*uC$+^#O{q zWa;XKEn-Rs!?U)aX{wA97FTv|8I_Z21ywuynlPsi)z|AC~_wx0GE0x&m|s=nBvkpesPL z)cJgqvGH0;-O)sXxGE(l(gi^LFz#*v&D8}OOI28oEJ-ChrtxuV^d#tiRU{i_3+zH> zxE~tn#|HioFn{Zsqc4hoQ-dQe(I9!0!%*5EczzWMyiPp7K>4L8DzBD4ZHm5Bm?^A1g0c7JLg?fWw+>M08A(dKnv!7a(B8s%ce98GIHnnJ6Z)I&T*7nSn@* zU5-O1T_xeY<5AByjS7r%jo>fDC(WS-`3JNPN+7-gE_Eg;0LI4f%EJ(_Rz75bz?^7T{8U4Cg% z%&*OvF+SL6Q^Zk57gE4A+bKX?T;gLStyM>ZrZUQigo=WB>o4z|F5`$v)m-74CTdB= z=^}@GB&Zmj`N&lohi;-u%vrRCG74L=2wbuuGl}5$dGiEaOi`J@_;?{&?%Aj=0$g%@ zKgk$$|89C7w0!`-{hbi +URL: https://qtadb.wordpress.com/ +## GITSOURCE https://bitbucket.org/michalmotyczko/qtadb.git master +Source: https://bitbucket.org/michalmotyczko/qtadb.git/master/qtadb-%{version}.tar.bz2 +Patch0: qtadb-0.8.1.20160727git-revert-to-qt4.patch +Patch1: qtadb-0.8.1.20160727git-disable_updates_check_and_crash.patch +Patch2: qtadb-0.8.1.20160727git-fix-crash-on-save-settings.patch +Source1: qtadb.png +Source2: qtadb.desktop +License: Apache License 2.0 +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libQtDeclarative +BuildRequires: libgcc +BuildRequires: libqt4-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +Requires: android-tools +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +QtADB is an adb graphical frontend. + +%debug_package + +%prep +%setup -q +%patch0 -p1 -R +#%patch1 -p1 +%patch2 -p1 + +%build +qmake-qt4 QtADB.pro +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -D -m0755 QtADB %{buildroot}%{_bindir}/qtadb +install -D -m0644 otherFiles/qtadb.apk %{buildroot}%{_datadir}/qtadb/qtadb.apk +install -D -m0755 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/qtadb.png +install -D -m0755 %{SOURCE2} %{buildroot}%{_datadir}/applications/qtadb.desktop + +install -d -m0755 %{buildroot}%{_sysconfdir}/xdg/Bracia +cat > %{buildroot}%{_sysconfdir}/xdg/Bracia/QtADB.conf << _EOF +[General] +sdkPath=/usr/bin/ +sdFolder= +checkForUpdatesOnStart=false +_EOF + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%config %{_sysconfdir}/xdg/Bracia/QtADB.conf +%{_bindir}/qtadb +%{_datadir}/applications/qtadb.desktop +%{_datadir}/pixmaps/qtadb.png +%{_datadir}/qtadb/qtadb.apk + +%changelog +* Wed Jul 27 2016 Silvan Calarco 0.8.1.20160727git-1mamba +- package created using the webbuild interface