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 |
|