Update the database in a different thread so it doesn't freeze the main

thread.
Show PIN in a dialog instead of a notification popup.
Translations updated.
This commit is contained in:
codestation
2013-08-30 11:10:43 -04:30
parent b46156b507
commit 04853712d0
27 changed files with 772 additions and 133 deletions

View File

@@ -41,16 +41,6 @@ void noMessageOutput(QtMsgType type, const char *msg)
Q_UNUSED(msg);
}
void loadTranslation(QApplication &app)
{
QTranslator* translator = new QTranslator();
QString locale = QLocale().system().name();
qDebug() << "Current locale:" << locale;
if(translator->load("qcma." + locale, ":/main/resources/translations")) {
app.installTranslator(translator);
}
}
int main(int argc, char *argv[])
{
if(SingleApplication::sendMessage(QObject::tr("A instance of QCMA is already running"))) {
@@ -59,7 +49,12 @@ int main(int argc, char *argv[])
SingleApplication app(argc, argv);
loadTranslation(app);
QTranslator translator;
QString locale = QLocale().system().name();
qDebug() << "Current locale:" << locale;
if(translator.load("qcma." + locale, ":/main/resources/translations")) {
app.installTranslator(&translator);
}
#ifndef Q_OS_WIN32
// FIXME: libmtp sends SIGPIPE if a socket write fails crashing the whole app