Merged upstream changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
|||||||
qcma.pro.user*
|
qcma.pro.user*
|
||||||
*.qm
|
*.qm
|
||||||
.directory
|
|
@@ -608,9 +608,12 @@ void CmaEvent::vitaEventGetSettingInfo(vita_event_t *event, int eventId)
|
|||||||
qDebug("Current account id: %s", settingsinfo->current_account.accountId);
|
qDebug("Current account id: %s", settingsinfo->current_account.accountId);
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
|
// Always refresh the account name
|
||||||
|
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
||||||
|
|
||||||
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
|
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
|
||||||
db->setUUID(settingsinfo->current_account.accountId);
|
db->setUUID(settingsinfo->current_account.accountId);
|
||||||
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
|
||||||
// set the database to be updated ASAP
|
// set the database to be updated ASAP
|
||||||
emit refreshDatabase();
|
emit refreshDatabase();
|
||||||
}
|
}
|
||||||
|
@@ -99,6 +99,10 @@ void CMARootObject::initObject(const QString &path)
|
|||||||
this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid);
|
this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid);
|
||||||
num_filters = 0;
|
num_filters = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create the backup directories
|
||||||
|
QDir dir(this->path);
|
||||||
|
dir.mkpath(dir.absolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
CMARootObject::~CMARootObject()
|
CMARootObject::~CMARootObject()
|
||||||
|
@@ -1,7 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* QCMA: Cross-platform content manager assistant for the PS Vita
|
||||||
|
*
|
||||||
|
* Copyright (C) 2013 Xian Nox
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "filterlineedit.h"
|
#include "filterlineedit.h"
|
||||||
|
|
||||||
#include <QStyle>
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QStyle>
|
||||||
|
|
||||||
FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
||||||
QLineEdit(parent)
|
QLineEdit(parent)
|
||||||
@@ -18,16 +37,18 @@ FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
|||||||
|
|
||||||
void FilterLineEdit::updateCloseButton(const QString& text)
|
void FilterLineEdit::updateCloseButton(const QString& text)
|
||||||
{
|
{
|
||||||
if(text.isEmpty() || text == tr("Filter"))
|
if(text.isEmpty() || text == tr("Filter")) {
|
||||||
clearButton->setVisible(false);
|
clearButton->setVisible(false);
|
||||||
else
|
} else {
|
||||||
clearButton->setVisible(true);
|
clearButton->setVisible(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FilterLineEdit::focusInEvent(QFocusEvent *e)
|
void FilterLineEdit::focusInEvent(QFocusEvent *e)
|
||||||
{
|
{
|
||||||
if(this->styleSheet() == "color:gray;font-style:italic")
|
if(this->styleSheet() == "color:gray;font-style:italic") {
|
||||||
this->clear();
|
this->clear();
|
||||||
|
}
|
||||||
|
|
||||||
this->setStyleSheet(QString("color:black;font-style:normal;padding-right:%1").arg(clearButton->sizeHint().width()));
|
this->setStyleSheet(QString("color:black;font-style:normal;padding-right:%1").arg(clearButton->sizeHint().width()));
|
||||||
|
|
||||||
|
@@ -1,3 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* QCMA: Cross-platform content manager assistant for the PS Vita
|
||||||
|
*
|
||||||
|
* Copyright (C) 2013 Xian Nox
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef FILTERLINEEDIT_H
|
#ifndef FILTERLINEEDIT_H
|
||||||
#define FILTERLINEEDIT_H
|
#define FILTERLINEEDIT_H
|
||||||
|
|
||||||
@@ -7,25 +26,21 @@
|
|||||||
class FilterLineEdit : public QLineEdit
|
class FilterLineEdit : public QLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FilterLineEdit(QWidget *parent = 0);
|
explicit FilterLineEdit(QWidget *parent = 0);
|
||||||
|
|
||||||
signals:
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void updateCloseButton(const QString &text);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void focusInEvent(QFocusEvent *e);
|
void focusInEvent(QFocusEvent *e);
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QToolButton *clearButton;
|
QToolButton *clearButton;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void updateCloseButton(const QString &text);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FILTERLINEEDIT_H
|
#endif // FILTERLINEEDIT_H
|
||||||
|
2
main.cpp
2
main.cpp
@@ -74,6 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
QString locale = QLocale().system().name();
|
QString locale = QLocale().system().name();
|
||||||
qDebug("Current locale: %s", locale.toUtf8().data());
|
qDebug("Current locale: %s", locale.toUtf8().data());
|
||||||
|
|
||||||
if(app.arguments().contains("--set-locale")) {
|
if(app.arguments().contains("--set-locale")) {
|
||||||
int index = app.arguments().indexOf("--set-locale");
|
int index = app.arguments().indexOf("--set-locale");
|
||||||
if(index + 1 < app.arguments().length()) {
|
if(index + 1 < app.arguments().length()) {
|
||||||
@@ -81,6 +82,7 @@ int main(int argc, char *argv[])
|
|||||||
locale = app.arguments().at(index + 1);
|
locale = app.arguments().at(index + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(translator.load("qcma." + locale, ":/main/resources/translations")) {
|
if(translator.load("qcma." + locale, ":/main/resources/translations")) {
|
||||||
app.installTranslator(&translator);
|
app.installTranslator(&translator);
|
||||||
}
|
}
|
||||||
|
@@ -75,7 +75,7 @@
|
|||||||
<location filename="../../backupmanagerform.ui" line="122"/>
|
<location filename="../../backupmanagerform.ui" line="122"/>
|
||||||
<location filename="../../backupmanagerform.cpp" line="210"/>
|
<location filename="../../backupmanagerform.cpp" line="210"/>
|
||||||
<source>Filter</source>
|
<source>Filter</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Filtro</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../backupmanagerform.cpp" line="55"/>
|
<location filename="../../backupmanagerform.cpp" line="55"/>
|
||||||
@@ -302,10 +302,10 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>FilterLineEdit</name>
|
<name>FilterLineEdit</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../filterlineedit.cpp" line="21"/>
|
|
||||||
<location filename="../../filterlineedit.cpp" line="40"/>
|
<location filename="../../filterlineedit.cpp" line="40"/>
|
||||||
|
<location filename="../../filterlineedit.cpp" line="61"/>
|
||||||
<source>Filter</source>
|
<source>Filter</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Filtro</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@@ -303,8 +303,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>FilterLineEdit</name>
|
<name>FilterLineEdit</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../filterlineedit.cpp" line="21"/>
|
|
||||||
<location filename="../../filterlineedit.cpp" line="40"/>
|
<location filename="../../filterlineedit.cpp" line="40"/>
|
||||||
|
<location filename="../../filterlineedit.cpp" line="61"/>
|
||||||
<source>Filter</source>
|
<source>Filter</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
Reference in New Issue
Block a user