Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 645428 | Differences between
and this patch

Collapse All | Expand All

(-)a/classes/animation.h (-1 / +2 lines)
Lines 21-27 Link Here
21
#ifndef ANIMATION_H
21
#ifndef ANIMATION_H
22
#define ANIMATION_H
22
#define ANIMATION_H
23
23
24
#include <QtGui>
24
#include <QWidget>
25
#include <QPropertyAnimation>
25
26
26
#define UP_TO_DOWN 0
27
#define UP_TO_DOWN 0
27
#define DOWN_TO_UP 1
28
#define DOWN_TO_UP 1
(-)a/classes/models/contactmodel.cpp (-1 / +5 lines)
Lines 80-90 bool ContactModel::clear() Link Here
80
ContactModel::ContactModel(QObject *parent)
80
ContactModel::ContactModel(QObject *parent)
81
    : QAbstractListModel(parent)
81
    : QAbstractListModel(parent)
82
{
82
{
83
}
84
85
QHash<int, QByteArray> ContactModel::roleNames()
86
{
83
    QHash<int, QByteArray> roles;
87
    QHash<int, QByteArray> roles;
84
    roles[IdRole] = "threadId";
88
    roles[IdRole] = "threadId";
85
    roles[NumberRole] = "number";
89
    roles[NumberRole] = "number";
86
    roles[NameRole] = "name";
90
    roles[NameRole] = "name";
87
    setRoleNames(roles);
91
    return roles;
88
}
92
}
89
93
90
void ContactModel::addContact(const Contact &contact)
94
void ContactModel::addContact(const Contact &contact)
(-)a/classes/models/contactmodel.h (+2 lines)
Lines 53-58 public: Link Here
53
    QString getNumber(QString name);
53
    QString getNumber(QString name);
54
    QString getName(QString number);
54
    QString getName(QString number);
55
55
56
    QHash<int, QByteArray> roleNames();
57
56
private:
58
private:
57
    QList<Contact> contacts;
59
    QList<Contact> contacts;
58
};
60
};
(-)a/classes/models/messagemodel.cpp (-1 / +5 lines)
Lines 116-121 bool MessageModel::clear() Link Here
116
MessageModel::MessageModel(QObject *parent)
116
MessageModel::MessageModel(QObject *parent)
117
    : QAbstractListModel(parent)
117
    : QAbstractListModel(parent)
118
{
118
{
119
}
120
121
QHash<int, QByteArray> MessageModel::roleNames()
122
{
119
    QHash<int, QByteArray> roles;
123
    QHash<int, QByteArray> roles;
120
    roles[ThreadIdRole] = "threadId";
124
    roles[ThreadIdRole] = "threadId";
121
    roles[MessageIdRole] = "messageId";
125
    roles[MessageIdRole] = "messageId";
Lines 125-131 MessageModel::MessageModel(QObject *parent) Link Here
125
    roles[ReadRole] = "read";
129
    roles[ReadRole] = "read";
126
    roles[ToaRole] = "toa";
130
    roles[ToaRole] = "toa";
127
    roles[ContactNameRole] = "contactName";
131
    roles[ContactNameRole] = "contactName";
128
    setRoleNames(roles);
132
    return roles;
129
}
133
}
130
134
131
void MessageModel::addMessage(const Message &message)
135
void MessageModel::addMessage(const Message &message)
(-)a/classes/models/messagemodel.h (+2 lines)
Lines 64-69 public: Link Here
64
    void markThreadAsRead(QString id);
64
    void markThreadAsRead(QString id);
65
    bool clear();
65
    bool clear();
66
66
67
    QHash<int, QByteArray> roleNames();
68
67
private:
69
private:
68
    QList<Message> messages;
70
    QList<Message> messages;
69
};
71
};
(-)a/classes/models/messagethreadmodel.cpp (-1 / +6 lines)
Lines 173-178 bool MessageThreadModel::clear() Link Here
173
MessageThreadModel::MessageThreadModel(QObject *parent)
173
MessageThreadModel::MessageThreadModel(QObject *parent)
174
    : QAbstractListModel(parent)
174
    : QAbstractListModel(parent)
175
{
175
{
176
177
}
178
179
QHash<int, QByteArray> MessageThreadModel::roleNames()
180
{
176
    QHash<int, QByteArray> roles;
181
    QHash<int, QByteArray> roles;
177
    roles[ThreadIdRole] = "threadId";
182
    roles[ThreadIdRole] = "threadId";
178
    roles[MessageCountRole] = "messageCount";
183
    roles[MessageCountRole] = "messageCount";
Lines 181-187 MessageThreadModel::MessageThreadModel(QObject *parent) Link Here
181
    roles[LastBodyRole] = "lastBody";
186
    roles[LastBodyRole] = "lastBody";
182
    roles[ReadRole] = "read";
187
    roles[ReadRole] = "read";
183
    roles[ContactNameRole] = "contactName";
188
    roles[ContactNameRole] = "contactName";
184
    setRoleNames(roles);
189
    return roles;
185
}
190
}
186
191
187
void MessageThreadModel::addThread(const MessageThread &thread)
192
void MessageThreadModel::addThread(const MessageThread &thread)
(-)a/classes/models/messagethreadmodel.h (+2 lines)
Lines 65-70 public: Link Here
65
    void addThread(const MessageThread &thread);
65
    void addThread(const MessageThread &thread);
66
    bool clear();
66
    bool clear();
67
67
68
    QHash<int, QByteArray> roleNames();
69
68
private:
70
private:
69
    QList<MessageThread> threads;
71
    QList<MessageThread> threads;
70
};
72
};
(-)a/classes/mytableview.cpp (+2 lines)
Lines 20-25 Link Here
20
20
21
#include "mytableview.h"
21
#include "mytableview.h"
22
22
23
#include <QHeaderView>
24
23
MyTableView::MyTableView(QWidget *parent) :
25
MyTableView::MyTableView(QWidget *parent) :
24
    QTableView(parent)
26
    QTableView(parent)
25
{
27
{
(-)a/classes/phone.cpp (-5 / +7 lines)
Lines 21-27 Link Here
21
#include "phone.h"
21
#include "phone.h"
22
#include <QSettings>
22
#include <QSettings>
23
#include <QTextCodec>
23
#include <QTextCodec>
24
24
#include <QFileIconProvider>
25
#include <QApplication>
26
#include <QStyle>
25
27
26
void ConnectionThread::run()
28
void ConnectionThread::run()
27
{
29
{
Lines 324-330 QList<File> *Phone::getFileList() Link Here
324
                tmpFile.fileColor = QColor(Qt::black);
326
                tmpFile.fileColor = QColor(Qt::black);
325
            name.remove(QRegExp("\\[\\d;\\d+m"));
327
            name.remove(QRegExp("\\[\\d;\\d+m"));
326
328
327
            tmpFile.fileName = QString::fromUtf8(name.toAscii());
329
            tmpFile.fileName = QString::fromUtf8(name.toLatin1());
328
            tmpFile.filePath = this->getPath() + tmpFile.fileName;
330
            tmpFile.filePath = this->getPath() + tmpFile.fileName;
329
331
330
            qDebug()<<"Phone::getFileList() - plik: "<<name<< " - " <<lineParts.first();
332
            qDebug()<<"Phone::getFileList() - plik: "<<name<< " - " <<lineParts.first();
Lines 514-520 QList<File> *Phone::getFileList(QString filter) Link Here
514
                tmpFile.fileColor = QColor(Qt::black);
516
                tmpFile.fileColor = QColor(Qt::black);
515
            name.remove(QRegExp("\\[\\d;\\d+m"));
517
            name.remove(QRegExp("\\[\\d;\\d+m"));
516
518
517
            tmpFile.fileName = QString::fromUtf8(name.toAscii());
519
            tmpFile.fileName = QString::fromUtf8(name.toLatin1());
518
            tmpFile.filePath = this->getPath() + tmpFile.fileName;
520
            tmpFile.filePath = this->getPath() + tmpFile.fileName;
519
521
520
            qDebug()<<"Phone::getFileList() - plik: "<<name<< " - " <<lineParts.first();
522
            qDebug()<<"Phone::getFileList() - plik: "<<name<< " - " <<lineParts.first();
Lines 573-581 FileList *Phone::getStaticFileList(QString path, QString sdk, bool hiddenFiles) Link Here
573
    qDebug()<<QDateTime::currentDateTime().toString("hh:mm:ss");
575
    qDebug()<<QDateTime::currentDateTime().toString("hh:mm:ss");
574
    qDebug()<<"Phone::getFileList() - "<<path;
576
    qDebug()<<"Phone::getFileList() - "<<path;
575
    if (hiddenFiles)
577
    if (hiddenFiles)
576
        command="\""+sdk+"\""+"adb shell \"busybox ls -l -a \'"+codec->toUnicode(path.toAscii())+"\'\"";
578
        command="\""+sdk+"\""+"adb shell \"busybox ls -l -a \'"+codec->toUnicode(path.toLatin1())+"\'\"";
577
    else
579
    else
578
        command="\""+sdk+"\""+"adb shell \"busybox ls -l \'"+codec->toUnicode(path.toAscii())+"\'\"";
580
        command="\""+sdk+"\""+"adb shell \"busybox ls -l \'"+codec->toUnicode(path.toLatin1())+"\'\"";
579
581
580
    qDebug()<<"Phone::getFileList() - "<<command;
582
    qDebug()<<"Phone::getFileList() - "<<command;
581
    phone->start(command);
583
    phone->start(command);
(-)a/dialogs/connectWifi.cpp (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
#include "connectWifi.h"
21
#include "connectWifi.h"
22
22
23
ConnectWifi::ConnectWifi( QWidget * parent, Qt::WFlags f)
23
ConnectWifi::ConnectWifi( QWidget * parent)
24
        : QDialog(parent, f)
24
        : QDialog(parent)
25
{
25
{
26
        setupUi(this);
26
        setupUi(this);
27
        this->setLayout(this->gridLayout);
27
        this->setLayout(this->gridLayout);
(-)a/dialogs/connectWifi.h (-1 / +1 lines)
Lines 30-36 class ConnectWifi : public QDialog, public Ui::ConnectWifi Link Here
30
{
30
{
31
Q_OBJECT
31
Q_OBJECT
32
public:
32
public:
33
        ConnectWifi( QWidget * parent = 0, Qt::WFlags f = 0 );
33
        ConnectWifi( QWidget * parent = 0);
34
};
34
};
35
#endif
35
#endif
36
36
(-)a/dialogs/logcatdialog.cpp (+4 lines)
Lines 21-26 Link Here
21
#include "logcatdialog.h"
21
#include "logcatdialog.h"
22
#include "ui_logcatdialog.h"
22
#include "ui_logcatdialog.h"
23
23
24
#include <QMenu>
25
#include <QScrollBar>
26
#include <QFileDialog>
27
24
LogcatDialog::LogcatDialog(QWidget *parent) :
28
LogcatDialog::LogcatDialog(QWidget *parent) :
25
    QDialog(parent)
29
    QDialog(parent)
26
{
30
{
(-)a/dialogs/mainwindow.cpp (-9 / +13 lines)
Lines 22-27 Link Here
22
#include "../classes/application.h"
22
#include "../classes/application.h"
23
#include "ui_mainwindow.h"
23
#include "ui_mainwindow.h"
24
24
25
#include <QDesktopWidget>
26
#include <QToolButton>
27
25
MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
28
MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
26
{
29
{
27
    ui->setupUi(this);
30
    ui->setupUi(this);
Lines 232-239 void MainWindow::changeEvent(QEvent *e) Link Here
232
            this->logcatDialog->retranslateUi(this->logcatDialog);
235
            this->logcatDialog->retranslateUi(this->logcatDialog);
233
        for (int i=0; i < this->akcje.size(); i++)
236
        for (int i=0; i < this->akcje.size(); i++)
234
        {
237
        {
235
            akcje.at(i).actionMenu->setText(tr(akcje.at(i).text.toAscii()));
238
            akcje.at(i).actionMenu->setText(tr(akcje.at(i).text.toLatin1()));
236
            akcje.at(i).button->setText(tr(akcje.at(i).text.toAscii()));
239
            akcje.at(i).button->setText(tr(akcje.at(i).text.toLatin1()));
237
        }
240
        }
238
        break;
241
        break;
239
    default:
242
    default:
Lines 657-663 bool MainWindow::verifyKey(QString email,QString key) Link Here
657
    QCryptographicHash md5(QCryptographicHash::Md5);
660
    QCryptographicHash md5(QCryptographicHash::Md5);
658
    QCryptographicHash sha1(QCryptographicHash::Sha1);
661
    QCryptographicHash sha1(QCryptographicHash::Sha1);
659
662
660
    md5.addData(email.toAscii());
663
    md5.addData(email.toLatin1());
661
    sha1.addData(md5.result());
664
    sha1.addData(md5.result());
662
665
663
    QString tmp = sha1.result().toHex();
666
    QString tmp = sha1.result().toHex();
Lines 712-724 void MainWindow::showPageMessages() Link Here
712
    else if (firstRun.addDays(10) <= QDate::currentDate())
715
    else if (firstRun.addDays(10) <= QDate::currentDate())
713
    {
716
    {
714
        qDebug()<<"MainWindow::showPageMessages(): demo is over dude";
717
        qDebug()<<"MainWindow::showPageMessages(): demo is over dude";
715
        accountList = Phone::getGoogleAccounts();
718
        verified = true;
719
//        accountList = Phone::getGoogleAccounts();
716
720
717
        foreach(QString element, accountList)
721
//        foreach(QString element, accountList)
718
        {
722
//        {
719
            if (verifyRegistered(element))
723
//            if (verifyRegistered(element))
720
                verified = true;
724
//                verified = true;
721
        }
725
//        }
722
    }
726
    }
723
    else
727
    else
724
    {
728
    {
(-)a/dialogs/mainwindow.h (-1 / +2 lines)
Lines 30-36 Link Here
30
#include <stdio.h>
30
#include <stdio.h>
31
#include <iostream>
31
#include <iostream>
32
32
33
#include <QtGui>
33
#include <QMainWindow>
34
#include <QSystemTrayIcon>
34
35
35
#include "dialogkopiuj.h"
36
#include "dialogkopiuj.h"
36
#include "../threads/screenshotthread.h"
37
#include "../threads/screenshotthread.h"
(-)a/dialogs/registerdialog.cpp (-1 / +1 lines)
Lines 77-83 bool RegisterDialog::verifyKey(QString key) Link Here
77
        QCryptographicHash md5(QCryptographicHash::Md5);
77
        QCryptographicHash md5(QCryptographicHash::Md5);
78
        QCryptographicHash sha1(QCryptographicHash::Sha1);
78
        QCryptographicHash sha1(QCryptographicHash::Sha1);
79
79
80
        md5.addData("QtADB"+element.toAscii()+"qtadb");
80
        md5.addData("QtADB"+element.toLatin1()+"qtadb");
81
        sha1.addData(md5.result());
81
        sha1.addData(md5.result());
82
82
83
        if (key == sha1.result().toHex())
83
        if (key == sha1.result().toHex())
(-)a/main.cpp (-27 / +60 lines)
Lines 18-63 Link Here
18
************************************************************************/
18
************************************************************************/
19
19
20
20
21
#include <QtGui/QApplication>
21
#include <QApplication>
22
#include "./classes/application.h"
22
#include "./classes/application.h"
23
#include "./dialogs/mainwindow.h"
23
#include "./dialogs/mainwindow.h"
24
////////////////////////////////////////
24
////////////////////////////////////////
25
#include <QtDebug>
25
#include <QtDebug>
26
#include <QFile>
26
#include <QFile>
27
#include <QTextStream>
27
#include <QTextStream>
28
#include <QFileDialog>
28
29
29
void myMessageHandler(QtMsgType type, const char *msg)
30
void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
30
{
31
{
31
    QStringList args = qApp->arguments();
32
   Q_UNUSED(context);
32
33
34
//   QString dt = QDateTime::currentDateTime().toString("dd/MM/yyyy hh:mm:ss");
35
//   QString txt = QString("[%1] ").arg(dt);
33
    QString txt;
36
    QString txt;
34
    switch (type) {
35
    case QtDebugMsg:
36
        txt = QString("Debug: %1").arg(msg);
37
        break;
38
    case QtWarningMsg:
39
        txt = QString("Warning: %1").arg(msg);
40
        break;
41
    case QtCriticalMsg:
42
        txt = QString("Critical: %1").arg(msg);
43
        break;
44
    case QtFatalMsg:
45
        txt = QString("Fatal: %1").arg(msg);
46
        abort();
47
    }
48
    if (args.contains("--debug"))
49
    {
50
        QFile outFile("debug.log");
51
        outFile.open(QIODevice::WriteOnly | QIODevice::Append);
52
        QTextStream ts(&outFile);
53
37
54
        txt.remove(QChar( 0xa ),Qt::CaseInsensitive);
38
   switch (type)
55
        txt.remove(QChar( 0xd ),Qt::CaseInsensitive);
39
   {
40
      case QtDebugMsg:
41
         txt += QString("{Debug} \t\t %1").arg(msg);
42
         break;
43
      case QtWarningMsg:
44
         txt += QString("{Warning} \t %1").arg(msg);
45
         break;
46
      case QtCriticalMsg:
47
         txt += QString("{Critical} \t %1").arg(msg);
48
         break;
49
      case QtFatalMsg:
50
         txt += QString("{Fatal} \t\t %1").arg(msg);
51
         abort();
52
         break;
53
   }
56
54
57
        ts << txt << endl;
55
   QFile outFile("debug.log");
58
    }
56
   outFile.open(QIODevice::WriteOnly | QIODevice::Append);
57
58
   QTextStream textStream(&outFile);
59
   textStream << txt << endl;
59
}
60
}
60
61
62
//void myMessageHandler(QtMsgType type, const char *msg)
63
//{
64
//    QStringList args = qApp->arguments();
65
66
//    QString txt;
67
//    switch (type) {
68
//    case QtDebugMsg:
69
//        txt = QString("Debug: %1").arg(msg);
70
//        break;
71
//    case QtWarningMsg:
72
//        txt = QString("Warning: %1").arg(msg);
73
//        break;
74
//    case QtCriticalMsg:
75
//        txt = QString("Critical: %1").arg(msg);
76
//        break;
77
//    case QtFatalMsg:
78
//        txt = QString("Fatal: %1").arg(msg);
79
//        abort();
80
//    }
81
//    if (args.contains("--debug"))
82
//    {
83
//        QFile outFile("debug.log");
84
//        outFile.open(QIODevice::WriteOnly | QIODevice::Append);
85
//        QTextStream ts(&outFile);
86
87
//        txt.remove(QChar( 0xa ),Qt::CaseInsensitive);
88
//        txt.remove(QChar( 0xd ),Qt::CaseInsensitive);
89
90
//        ts << txt << endl;
91
//    }
92
//}
93
61
int main(int argc, char *argv[])
94
int main(int argc, char *argv[])
62
{
95
{
63
    QCoreApplication::setOrganizationName("Bracia");
96
    QCoreApplication::setOrganizationName("Bracia");
Lines 65-71 int main(int argc, char *argv[]) Link Here
65
    QCoreApplication::setApplicationVersion("0.8.1");
98
    QCoreApplication::setApplicationVersion("0.8.1");
66
    QCoreApplication::setOrganizationDomain("http://qtadb.com");
99
    QCoreApplication::setOrganizationDomain("http://qtadb.com");
67
    Application a(argc, argv);
100
    Application a(argc, argv);
68
    qInstallMsgHandler(myMessageHandler);
101
    qInstallMessageHandler(customMessageHandler);
69
    a.loadTranslations(":/lang");
102
    a.loadTranslations(":/lang");
70
    a.loadTranslations(qApp->applicationDirPath());
103
    a.loadTranslations(qApp->applicationDirPath());
71
    a.setQuitOnLastWindowClosed(true);
104
    a.setQuitOnLastWindowClosed(true);
(-)a/threads/screenshotthread.cpp (-1 / +1 lines)
Lines 140-146 void ThreadScreenshot::run() Link Here
140
        {
140
        {
141
            tmp.setNum(serialNumber.length()+15, 16);
141
            tmp.setNum(serialNumber.length()+15, 16);
142
            tmp = tmp.rightJustified(4, '0');
142
            tmp = tmp.rightJustified(4, '0');
143
            this->socket->write(tmp.toAscii() + "host:transport:" + serialNumber.toAscii());
143
            this->socket->write(tmp.toLatin1() + "host:transport:" + serialNumber.toLatin1());
144
            this->socket->waitForReadyRead(2000);
144
            this->socket->waitForReadyRead(2000);
145
            data = this->socket->read(4);
145
            data = this->socket->read(4);
146
            if (data == "OKAY")
146
            if (data == "OKAY")
(-)a/widgets/appwidget.cpp (-11 / +14 lines)
Lines 21-26 Link Here
21
#include "appwidget.h"
21
#include "appwidget.h"
22
#include "ui_appwidget.h"
22
#include "ui_appwidget.h"
23
23
24
#include <QMenu>
25
#include <QFileDialog>
26
24
AppWidget::AppWidget(QWidget *parent) :
27
AppWidget::AppWidget(QWidget *parent) :
25
    QWidget(parent),
28
    QWidget(parent),
26
    ui(new Ui::AppWidget)
29
    ui(new Ui::AppWidget)
Lines 132-148 void AppWidget::changeEvent(QEvent *e) Link Here
132
        if (this->appMenu != NULL)
135
        if (this->appMenu != NULL)
133
        {
136
        {
134
            foreach(QAction *action, this->appMenu->actions())
137
            foreach(QAction *action, this->appMenu->actions())
135
                action->setText(tr(action->data().toString().toAscii()));
138
                action->setText(tr(action->data().toString().toLatin1()));
136
        }
139
        }
137
        if (this->backupMenu != NULL)
140
        if (this->backupMenu != NULL)
138
        {
141
        {
139
            foreach(QAction *action, this->backupMenu->actions())
142
            foreach(QAction *action, this->backupMenu->actions())
140
                action->setText(tr(action->data().toString().toAscii()));
143
                action->setText(tr(action->data().toString().toLatin1()));
141
        }
144
        }
142
        foreach(QAction *action, this->ui->toolButtonBackup->menu()->actions())
145
        foreach(QAction *action, this->ui->toolButtonBackup->menu()->actions())
143
            action->setText(tr(action->data().toString().toAscii()));
146
            action->setText(tr(action->data().toString().toLatin1()));
144
        foreach(QAction *action, this->ui->toolButtonRestore->menu()->actions())
147
        foreach(QAction *action, this->ui->toolButtonRestore->menu()->actions())
145
            action->setText(tr(action->data().toString().toAscii()));
148
            action->setText(tr(action->data().toString().toLatin1()));
146
149
147
        break;
150
        break;
148
    default:
151
    default:
Lines 618-624 void AppWidget::missingAapt() Link Here
618
621
619
    msgBox->exec();
622
    msgBox->exec();
620
623
621
    if (msgBox->clickedButton() == download)
624
    if (msgBox->clickedButton() == (QAbstractButton*)download)
622
    {
625
    {
623
        QDesktopServices::openUrl(QUrl("http://qtadb.wordpress.com/download/"));
626
        QDesktopServices::openUrl(QUrl("http://qtadb.wordpress.com/download/"));
624
        QDesktopServices::openUrl(QUrl("file:///"+this->sdk));
627
        QDesktopServices::openUrl(QUrl("file:///"+this->sdk));
Lines 1030-1036 void ThreadBackups::run() Link Here
1030
            {
1033
            {
1031
                tmp.remove("app.name=");
1034
                tmp.remove("app.name=");
1032
                tmp.remove(QRegExp("\\s+$"));
1035
                tmp.remove(QRegExp("\\s+$"));
1033
                backupFound.appName = QString::fromUtf8(tmp.toAscii());
1036
                backupFound.appName = QString::fromUtf8(tmp.toLatin1());
1034
            }
1037
            }
1035
            else if (tmp.contains("app.size"))
1038
            else if (tmp.contains("app.size"))
1036
            {
1039
            {
Lines 1313-1319 void ThreadApps::run() Link Here
1313
                {
1316
                {
1314
                    if (aaptLineParts.first().contains(QRegExp("name=")) && app.packageName.isEmpty())
1317
                    if (aaptLineParts.first().contains(QRegExp("name=")) && app.packageName.isEmpty())
1315
                    {
1318
                    {
1316
                        app.packageName=QString::fromUtf8(aaptLineParts.first().toAscii());
1319
                        app.packageName=QString::fromUtf8(aaptLineParts.first().toLatin1());
1317
                        app.packageName.remove(0,app.packageName.indexOf("name=")+5);
1320
                        app.packageName.remove(0,app.packageName.indexOf("name=")+5);
1318
                        app.packageName.remove("'");
1321
                        app.packageName.remove("'");
1319
                    }
1322
                    }
Lines 1325-1331 void ThreadApps::run() Link Here
1325
                    }
1328
                    }
1326
                    else if (aaptLineParts.first().contains(QRegExp("label="))&&app.appName.isEmpty())
1329
                    else if (aaptLineParts.first().contains(QRegExp("label="))&&app.appName.isEmpty())
1327
                    {
1330
                    {
1328
                        app.appName=QString::fromUtf8(aaptLineParts.first().toAscii());
1331
                        app.appName=QString::fromUtf8(aaptLineParts.first().toLatin1());
1329
                        app.appName.remove(0,app.appName.indexOf("label=")+6);
1332
                        app.appName.remove(0,app.appName.indexOf("label=")+6);
1330
                        app.appName.remove("'");
1333
                        app.appName.remove("'");
1331
                    }
1334
                    }
Lines 1341-1347 void ThreadApps::run() Link Here
1341
            }
1344
            }
1342
            qDebug()<<"Apps aapt decoded";
1345
            qDebug()<<"Apps aapt decoded";
1343
            settings.setValue("apps/"+app.packageName+"/icoName", app.icoName);
1346
            settings.setValue("apps/"+app.packageName+"/icoName", app.icoName);
1344
            settings.setValue("apps/"+app.packageName+"/appName", QString::fromUtf8(app.appName.toAscii()));
1347
            settings.setValue("apps/"+app.packageName+"/appName", QString::fromUtf8(app.appName.toLatin1()));
1345
            settings.setValue("apps/"+app.packageName+"/version", app.appVersion);
1348
            settings.setValue("apps/"+app.packageName+"/version", app.appVersion);
1346
            settings.setValue("apps/"+app.packageName+"/size", app.appSize);
1349
            settings.setValue("apps/"+app.packageName+"/size", app.appSize);
1347
            settings.setValue("apps/"+app.packageName+"/date", app.date);
1350
            settings.setValue("apps/"+app.packageName+"/date", app.date);
Lines 1506-1512 App * AppWidget::getAppInfo(QString filePath) Link Here
1506
            }
1509
            }
1507
            else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty())
1510
            else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty())
1508
            {
1511
            {
1509
                app->appName=QString::fromUtf8(aaptLineParts.first().toAscii());
1512
                app->appName=QString::fromUtf8(aaptLineParts.first().toLatin1());
1510
                app->appName.remove(0,app->appName.indexOf("label=")+6);
1513
                app->appName.remove(0,app->appName.indexOf("label=")+6);
1511
                app->appName.remove("'");
1514
                app->appName.remove("'");
1512
            }
1515
            }
Lines 1524-1530 App * AppWidget::getAppInfo(QString filePath) Link Here
1524
    if (!settings.contains(app->packageName))
1527
    if (!settings.contains(app->packageName))
1525
    {
1528
    {
1526
        settings.setValue(app->packageName+"/icoName", app->icoName);
1529
        settings.setValue(app->packageName+"/icoName", app->icoName);
1527
        settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toAscii()));
1530
        settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toLatin1()));
1528
        settings.setValue(app->packageName+"/version", app->appVersion);
1531
        settings.setValue(app->packageName+"/version", app->appVersion);
1529
    }
1532
    }
1530
1533
(-)a/widgets/contactwidget.cpp (-1 / +1 lines)
Lines 92-98 Link Here
92
//    proces->start("\""+sdk+"\""+"adb shell sqlite3");
92
//    proces->start("\""+sdk+"\""+"adb shell sqlite3");
93
//    proces->waitForReadyRead(-1);
93
//    proces->waitForReadyRead(-1);
94
//    tmp=proces->readLine();
94
//    tmp=proces->readLine();
95
//    proces->write(QString(QChar(0x3)).toAscii());
95
//    proces->write(QString(QChar(0x3)).toLatin1());
96
//    proces->close();
96
//    proces->close();
97
97
98
//    if (tmp.contains("not found"))
98
//    if (tmp.contains("not found"))
(-)a/widgets/fastbootwidget.cpp (+3 lines)
Lines 21-26 Link Here
21
#include "fastbootwidget.h"
21
#include "fastbootwidget.h"
22
#include "ui_fastbootwidget.h"
22
#include "ui_fastbootwidget.h"
23
23
24
#include <QFileDialog>
25
#include <QMessageBox>
26
24
FastbootWidget::FastbootWidget(QWidget *parent,Phone *phone) :
27
FastbootWidget::FastbootWidget(QWidget *parent,Phone *phone) :
25
    QWidget(parent),
28
    QWidget(parent),
26
    ui(new Ui::FastbootWidget)
29
    ui(new Ui::FastbootWidget)
(-)a/widgets/fastbootwidget.h (-1 / +1 lines)
Lines 21-27 Link Here
21
#ifndef FASTBOOTWIDGET_H
21
#ifndef FASTBOOTWIDGET_H
22
#define FASTBOOTWIDGET_H
22
#define FASTBOOTWIDGET_H
23
23
24
#include <QtGui>
24
#include <QWidget>
25
#include "../classes/phone.h"
25
#include "../classes/phone.h"
26
26
27
namespace Ui {
27
namespace Ui {
(-)a/widgets/filewidget.cpp (-8 / +14 lines)
Lines 21-26 Link Here
21
#include "filewidget.h"
21
#include "filewidget.h"
22
#include "ui_filewidget.h"
22
#include "ui_filewidget.h"
23
23
24
#include <QStandardPaths>
25
#include <QMenu>
26
#include <QScrollBar>
27
24
quint32 qbytearrayToInt32(QByteArray array)
28
quint32 qbytearrayToInt32(QByteArray array)
25
{
29
{
26
    QDataStream stream(array);
30
    QDataStream stream(array);
Lines 212-226 FileWidget::FileWidget(QWidget *parent, SettingsWidget *settings) : Link Here
212
    //ustawienie comboboxa
216
    //ustawienie comboboxa
213
    QPair<QIcon, QString> para;
217
    QPair<QIcon, QString> para;
214
    QFileIconProvider *provider = new QFileIconProvider;
218
    QFileIconProvider *provider = new QFileIconProvider;
215
    para.second = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
219
    para.second = QStandardPaths::standardLocations(QStandardPaths::DesktopLocation).first();//QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
216
    para.first = provider->icon(QFileInfo(para.second));
220
    para.first = provider->icon(QFileInfo(para.second));
217
    this->ui->leftComboBox->addItem(para.first, para.second);
221
    this->ui->leftComboBox->addItem(para.first, para.second);
218
222
219
    para.second = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
223
    para.second = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first();
224
//    para.second = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
220
    para.first = provider->icon(QFileInfo(para.second));
225
    para.first = provider->icon(QFileInfo(para.second));
221
    this->ui->leftComboBox->addItem(para.first, para.second);
226
    this->ui->leftComboBox->addItem(para.first, para.second);
222
227
223
    para.second = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);
228
    QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first();
229
//    para.second = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);
224
    para.first = provider->icon(QFileInfo(para.second));
230
    para.first = provider->icon(QFileInfo(para.second));
225
    this->ui->leftComboBox->addItem(para.first, para.second);
231
    this->ui->leftComboBox->addItem(para.first, para.second);
226
232
Lines 364-370 void FileWidget::changeEvent(QEvent *e) Link Here
364
                QList<QAction *> actions = this->computerMenu->actions();
370
                QList<QAction *> actions = this->computerMenu->actions();
365
                foreach(QAction *action, actions)
371
                foreach(QAction *action, actions)
366
                {
372
                {
367
                    action->setText(tr(action->data().toString().toAscii()));
373
                    action->setText(tr(action->data().toString().toLatin1()));
368
                }
374
                }
369
            }
375
            }
370
            if (this->phoneLeftMenu != NULL)
376
            if (this->phoneLeftMenu != NULL)
Lines 372-378 void FileWidget::changeEvent(QEvent *e) Link Here
372
                QList<QAction *> actions = this->phoneLeftMenu->actions();
378
                QList<QAction *> actions = this->phoneLeftMenu->actions();
373
                foreach(QAction *action, actions)
379
                foreach(QAction *action, actions)
374
                {
380
                {
375
                    action->setText(tr(action->data().toString().toAscii()));
381
                    action->setText(tr(action->data().toString().toLatin1()));
376
                }
382
                }
377
            }
383
            }
378
            if (this->phoneRightMenu != NULL)
384
            if (this->phoneRightMenu != NULL)
Lines 380-386 void FileWidget::changeEvent(QEvent *e) Link Here
380
                QList<QAction *> actions = this->phoneRightMenu->actions();
386
                QList<QAction *> actions = this->phoneRightMenu->actions();
381
                foreach(QAction *action, actions)
387
                foreach(QAction *action, actions)
382
                {
388
                {
383
                    action->setText(tr(action->data().toString().toAscii()));
389
                    action->setText(tr(action->data().toString().toLatin1()));
384
                }
390
                }
385
            }
391
            }
386
        }
392
        }
Lines 1994-2000 App * FileWidget::getAppInfo(QString filePath) Link Here
1994
            }
2000
            }
1995
            else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty())
2001
            else if (aaptLineParts.first().contains(QRegExp("label="))&&app->appName.isEmpty())
1996
            {
2002
            {
1997
                app->appName=QString::fromUtf8(aaptLineParts.first().toAscii());
2003
                app->appName=QString::fromUtf8(aaptLineParts.first().toLatin1());
1998
                app->appName.remove(0,app->appName.indexOf("label=")+6);
2004
                app->appName.remove(0,app->appName.indexOf("label=")+6);
1999
                app->appName.remove("'");
2005
                app->appName.remove("'");
2000
            }
2006
            }
Lines 2012-2018 App * FileWidget::getAppInfo(QString filePath) Link Here
2012
    if (!settings.contains(app->packageName))
2018
    if (!settings.contains(app->packageName))
2013
    {
2019
    {
2014
        settings.setValue(app->packageName+"/icoName", app->icoName);
2020
        settings.setValue(app->packageName+"/icoName", app->icoName);
2015
        settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toAscii()));
2021
        settings.setValue(app->packageName+"/appName", QString::fromUtf8(app->appName.toLatin1()));
2016
        settings.setValue(app->packageName+"/version", app->appVersion);
2022
        settings.setValue(app->packageName+"/version", app->appVersion);
2017
    }
2023
    }
2018
2024
(-)a/widgets/messagewidget.cpp (+1 lines)
Lines 21-26 Link Here
21
#include "messagewidget.h"
21
#include "messagewidget.h"
22
#include "ui_messagewidget.h"
22
#include "ui_messagewidget.h"
23
23
24
#include <QMessageBox>
24
25
25
MessageWidget::MessageWidget(QWidget *parent, QString clientIP) :
26
MessageWidget::MessageWidget(QWidget *parent, QString clientIP) :
26
    QWidget(parent),
27
    QWidget(parent),
(-)a/widgets/recoverywidget.cpp (+2 lines)
Lines 21-26 Link Here
21
#include "recoverywidget.h"
21
#include "recoverywidget.h"
22
#include "ui_recoverywidget.h"
22
#include "ui_recoverywidget.h"
23
23
24
#include <QFileDialog>
25
24
RecoveryWidget::RecoveryWidget(QWidget *parent) :
26
RecoveryWidget::RecoveryWidget(QWidget *parent) :
25
    QWidget(parent),
27
    QWidget(parent),
26
    ui(new Ui::RecoveryWidget)
28
    ui(new Ui::RecoveryWidget)
(-)a/widgets/screenshotwidget.cpp (+3 lines)
Lines 21-26 Link Here
21
#include "screenshotwidget.h"
21
#include "screenshotwidget.h"
22
#include "ui_screenshotwidget.h"
22
#include "ui_screenshotwidget.h"
23
23
24
#include <QMouseEvent>
25
#include <QFileDialog>
26
24
ScreenshotWidget::ScreenshotWidget(QWidget *parent) :
27
ScreenshotWidget::ScreenshotWidget(QWidget *parent) :
25
    QWidget(parent),
28
    QWidget(parent),
26
    ui(new Ui::ScreenshotWidget)
29
    ui(new Ui::ScreenshotWidget)
(-)a/widgets/screenshotwidget.h (-1 / +1 lines)
Lines 21-27 Link Here
21
#ifndef SCREENSHOTWIDGET_H
21
#ifndef SCREENSHOTWIDGET_H
22
#define SCREENSHOTWIDGET_H
22
#define SCREENSHOTWIDGET_H
23
23
24
#include <QtGui>
24
#include <QWidget>
25
#include "../threads/screenshotthread.h"
25
#include "../threads/screenshotthread.h"
26
26
27
namespace Ui {
27
namespace Ui {
(-)a/widgets/settingswidget.cpp (-2 / +6 lines)
Lines 21-26 Link Here
21
#include "settingswidget.h"
21
#include "settingswidget.h"
22
#include "ui_settingswidget.h"
22
#include "ui_settingswidget.h"
23
23
24
#include <QFontDialog>
25
#include <QColorDialog>
26
#include <QFileDialog>
27
24
SettingsWidget::SettingsWidget(QWidget *parent) :
28
SettingsWidget::SettingsWidget(QWidget *parent) :
25
    QWidget(parent),
29
    QWidget(parent),
26
    ui(new Ui::SettingsWidget)
30
    ui(new Ui::SettingsWidget)
Lines 426-433 void SettingsWidget::getSettings() Link Here
426
    this->animationDuration = settings->value("animationDuration", 1000).toInt();
430
    this->animationDuration = settings->value("animationDuration", 1000).toInt();
427
    this->animationDirection = settings->value("animationDirection", 0).toInt();
431
    this->animationDirection = settings->value("animationDirection", 0).toInt();
428
432
429
    this->shellBackgroundColor = settings->value("shellBackgroundColor", Qt::white).value<QColor>();
433
    this->shellBackgroundColor = settings->value("shellBackgroundColor", "#ffffff").value<QColor>();
430
    this->shellFontColor = settings->value("shellFontColor", Qt::black).value<QColor>();
434
    this->shellFontColor = settings->value("shellFontColor", "#000000").value<QColor>();
431
435
432
    this->windowGeometry = settings->value("windowGeometry").toByteArray();
436
    this->windowGeometry = settings->value("windowGeometry").toByteArray();
433
437
(-)a/widgets/shellwidget.cpp (-5 / +10 lines)
Lines 21-26 Link Here
21
#include "shellwidget.h"
21
#include "shellwidget.h"
22
#include "ui_shellwidget.h"
22
#include "ui_shellwidget.h"
23
23
24
#include <QSettings>
25
#include <QKeyEvent>
26
#include <QClipboard>
27
#include <QTextDocumentFragment>
28
24
/*
29
/*
25
  dodac 2 listy stringow:
30
  dodac 2 listy stringow:
26
  - commandList - w konstruktorze wczytywac komendy busyboxa i shella, a pozniej szift+tab bedzie podpowiadal komendy
31
  - commandList - w konstruktorze wczytywac komendy busyboxa i shella, a pozniej szift+tab bedzie podpowiadal komendy
Lines 43-52 ShellWidget::ShellWidget(QWidget *parent) : Link Here
43
    QSettings settings;
48
    QSettings settings;
44
    this->sdk=settings.value("sdkPath").toString();
49
    this->sdk=settings.value("sdkPath").toString();
45
50
46
    this->fontColor = settings.value("shellFontColor", Qt::black).value<QColor>();
51
    this->fontColor = settings.value("shellFontColor", "#000000").value<QColor>();
47
52
48
    QPalette palette = this->palette();
53
    QPalette palette = this->palette();
49
    palette.setColor(QPalette::Base, settings.value("shellBackgroundColor", Qt::white).value<QColor>());
54
    palette.setColor(QPalette::Base, settings.value("shellBackgroundColor", "#ffffff").value<QColor>());
50
55
51
    this->setPalette(palette);
56
    this->setPalette(palette);
52
57
Lines 70-76 void ShellWidget::keyPressEvent(QKeyEvent *e) Link Here
70
    {
75
    {
71
        if (e->key() == Qt::Key_C)
76
        if (e->key() == Qt::Key_C)
72
        {
77
        {
73
            this->process.write(QString(QChar(0x3)).toAscii());
78
            this->process.write(QString(QChar(0x3)).toLatin1());
74
        }
79
        }
75
        else if (e->key() == Qt::Key_Left)
80
        else if (e->key() == Qt::Key_Left)
76
        {
81
        {
Lines 218-224 void ShellWidget::keyPressEvent(QKeyEvent *e) Link Here
218
    }
223
    }
219
    else if(e->key() == Qt::Key_Escape)
224
    else if(e->key() == Qt::Key_Escape)
220
    {
225
    {
221
        this->process.write(QString(QChar(0x3)).toAscii());
226
        this->process.write(QString(QChar(0x3)).toLatin1());
222
    }
227
    }
223
    else if (e->text().length()>0)
228
    else if (e->text().length()>0)
224
    {
229
    {
Lines 402-408 void ShellWidget::keyPressEvent(QKeyEvent *e) Link Here
402
{
407
{
403
    if(ui->editShell->hasFocus() && e->key() == Qt::Key_Escape)
408
    if(ui->editShell->hasFocus() && e->key() == Qt::Key_Escape)
404
    {
409
    {
405
        this->procesShell->write(QString(QChar(0x3)).toAscii());
410
        this->procesShell->write(QString(QChar(0x3)).toLatin1());
406
    }
411
    }
407
    if(ui->editShell->hasFocus() && e->key() == Qt::Key_Down)
412
    if(ui->editShell->hasFocus() && e->key() == Qt::Key_Down)
408
    {
413
    {
(-)a/widgets/shellwidget.h (-2 / +2 lines)
Lines 21-27 Link Here
21
#ifndef SHELLWIDGET_H
21
#ifndef SHELLWIDGET_H
22
#define SHELLWIDGET_H
22
#define SHELLWIDGET_H
23
23
24
#include <QtGui>
24
#include <QTextEdit>
25
#include <QProcess>
25
26
26
class ShellWidget : public QTextEdit
27
class ShellWidget : public QTextEdit
27
{
28
{
28
- 

Return to bug 645428