Merged upstream changes
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
qcma.pro.user*
|
||||
*.qm
|
||||
.directory
|
||||
*.qm
|
@@ -608,9 +608,12 @@ void CmaEvent::vitaEventGetSettingInfo(vita_event_t *event, int eventId)
|
||||
qDebug("Current account id: %s", settingsinfo->current_account.accountId);
|
||||
|
||||
QSettings settings;
|
||||
|
||||
// Always refresh the account name
|
||||
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
||||
|
||||
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
|
||||
db->setUUID(settingsinfo->current_account.accountId);
|
||||
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
|
||||
db->setUUID(settingsinfo->current_account.accountId);
|
||||
// set the database to be updated ASAP
|
||||
emit refreshDatabase();
|
||||
}
|
||||
|
@@ -99,6 +99,10 @@ void CMARootObject::initObject(const QString &path)
|
||||
this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid);
|
||||
num_filters = 0;
|
||||
}
|
||||
|
||||
// create the backup directories
|
||||
QDir dir(this->path);
|
||||
dir.mkpath(dir.absolutePath());
|
||||
}
|
||||
|
||||
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 <QStyle>
|
||||
#include <QIcon>
|
||||
#include <QStyle>
|
||||
|
||||
FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
||||
QLineEdit(parent)
|
||||
@@ -18,16 +37,18 @@ FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
||||
|
||||
void FilterLineEdit::updateCloseButton(const QString& text)
|
||||
{
|
||||
if(text.isEmpty() || text == tr("Filter"))
|
||||
if(text.isEmpty() || text == tr("Filter")) {
|
||||
clearButton->setVisible(false);
|
||||
else
|
||||
} else {
|
||||
clearButton->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
void FilterLineEdit::focusInEvent(QFocusEvent *e)
|
||||
{
|
||||
if(this->styleSheet() == "color:gray;font-style:italic")
|
||||
if(this->styleSheet() == "color:gray;font-style:italic") {
|
||||
this->clear();
|
||||
}
|
||||
|
||||
this->setStyleSheet(QString("color:black;font-style:normal;padding-right:%1").arg(clearButton->sizeHint().width()));
|
||||
|
||||
@@ -47,7 +68,7 @@ void FilterLineEdit::focusOutEvent(QFocusEvent *e)
|
||||
void FilterLineEdit::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
QSize sz = clearButton->sizeHint();
|
||||
clearButton->move(rect().right() - sz.width(), (rect().bottom() - sz.height())/2);
|
||||
clearButton->move(rect().right() - sz.width(), (rect().bottom() - sz.height()) / 2);
|
||||
|
||||
QLineEdit::resizeEvent(e);
|
||||
}
|
||||
|
@@ -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
|
||||
#define FILTERLINEEDIT_H
|
||||
|
||||
@@ -7,25 +26,21 @@
|
||||
class FilterLineEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FilterLineEdit(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
private slots:
|
||||
void updateCloseButton(const QString &text);
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
QToolButton *clearButton;
|
||||
|
||||
|
||||
private slots:
|
||||
void updateCloseButton(const QString &text);
|
||||
|
||||
};
|
||||
|
||||
#endif // FILTERLINEEDIT_H
|
||||
|
8
main.cpp
8
main.cpp
@@ -74,13 +74,15 @@ int main(int argc, char *argv[])
|
||||
QTranslator translator;
|
||||
QString locale = QLocale().system().name();
|
||||
qDebug("Current locale: %s", locale.toUtf8().data());
|
||||
|
||||
if(app.arguments().contains("--set-locale")) {
|
||||
int index = app.arguments().indexOf("--set-locale");
|
||||
if(index+1 < app.arguments().length()) {
|
||||
qDebug("Enforcing locale: %s", app.arguments().at(index+1).toUtf8().data());
|
||||
locale = app.arguments().at(index+1);
|
||||
if(index + 1 < app.arguments().length()) {
|
||||
qDebug("Enforcing locale: %s", app.arguments().at(index + 1).toUtf8().data());
|
||||
locale = app.arguments().at(index + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if(translator.load("qcma." + locale, ":/main/resources/translations")) {
|
||||
app.installTranslator(&translator);
|
||||
}
|
||||
|
@@ -75,7 +75,7 @@
|
||||
<location filename="../../backupmanagerform.ui" line="122"/>
|
||||
<location filename="../../backupmanagerform.cpp" line="210"/>
|
||||
<source>Filter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Filtro</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../backupmanagerform.cpp" line="55"/>
|
||||
@@ -302,10 +302,10 @@
|
||||
<context>
|
||||
<name>FilterLineEdit</name>
|
||||
<message>
|
||||
<location filename="../../filterlineedit.cpp" line="21"/>
|
||||
<location filename="../../filterlineedit.cpp" line="40"/>
|
||||
<location filename="../../filterlineedit.cpp" line="61"/>
|
||||
<source>Filter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Filtro</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@@ -303,8 +303,8 @@
|
||||
<context>
|
||||
<name>FilterLineEdit</name>
|
||||
<message>
|
||||
<location filename="../../filterlineedit.cpp" line="21"/>
|
||||
<location filename="../../filterlineedit.cpp" line="40"/>
|
||||
<location filename="../../filterlineedit.cpp" line="61"/>
|
||||
<source>Filter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
Reference in New Issue
Block a user