Avanzamento del controllo della posta a schermo (0.4.1)
Il motore manda una riga per cartella (persona, cartella, quanti): il bridge le usava solo alla fine, lasciando il comando su Controllo in corso senza dire nulla. Ora ogni riga aggiorna il riquadro.
This commit is contained in:
1 parent
5e1f73774f
commit
7fa30ca1e1
5 files changed
+25
-6
No files matched your search
@@ -147,6 +147,7 @@ Page {
|
|||||||
// Poll ("! problema", "+ copiati", "* cartella creata").
|
// Poll ("! problema", "+ copiati", "* cartella creata").
|
||||||
Connections {
|
Connections {
|
||||||
target: engine
|
target: engine
|
||||||
|
onLastResultChanged: avviso.text = engine.lastResult
|
||||||
onMailChecked: {
|
onMailChecked: {
|
||||||
avviso.text = engine.lastResult;
|
avviso.text = engine.lastResult;
|
||||||
avvisoTimer.restart();
|
avvisoTimer.restart();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name: harbour-grumpydove
|
Name: harbour-grumpydove
|
||||||
Summary: Eudora-style mail interface, mobile prototype
|
Summary: Eudora-style mail interface, mobile prototype
|
||||||
Version: 0.4.0
|
Version: 0.4.1
|
||||||
Release: 1
|
Release: 1
|
||||||
Group: Qt/Qt
|
Group: Qt/Qt
|
||||||
# Codice EUPL-1.2; le icone vengono dagli sprite di Eudora, BSD 3-Clause
|
# Codice EUPL-1.2; le icone vengono dagli sprite di Eudora, BSD 3-Clause
|
||||||
@@ -27,6 +27,9 @@ Icons come from the original project's Eudora bitmaps (BSD 3-Clause,
|
|||||||
Computer History Museum).
|
Computer History Museum).
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 11 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.4.1-1
|
||||||
|
- Controllo della posta: l'avanzamento a schermo (cartella e quanti
|
||||||
|
messaggi) invece di restare su "Controllo in corso" senza dire nulla
|
||||||
* Wed Nov 11 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.4.0-1
|
* Wed Nov 11 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.4.0-1
|
||||||
- Allegati: elenco nella pagina del messaggio (nome e dimensione), un tocco
|
- Allegati: elenco nella pagina del messaggio (nome e dimensione), un tocco
|
||||||
li salva in Download e li apre con l'app associata; il nome del mittente
|
li salva in Download e li apre con l'app associata; il nome del mittente
|
||||||
|
|||||||
+15
-2
@@ -108,10 +108,22 @@ void EngineBridge::pollMail()
|
|||||||
const QString riga = lines.at(i);
|
const QString riga = lines.at(i);
|
||||||
// "! testo" = problema; "+ persona cartella quanti" = copiati;
|
// "! testo" = problema; "+ persona cartella quanti" = copiati;
|
||||||
// "* cartella" = cartella creata
|
// "* cartella" = cartella creata
|
||||||
if (riga.startsWith(QLatin1String("!")))
|
if (riga.startsWith(QLatin1String("!"))) {
|
||||||
m_lastResult = riga.mid(2).trimmed();
|
m_lastResult = riga.mid(2).trimmed();
|
||||||
else if (riga.startsWith(QLatin1String("+")))
|
} else if (riga.startsWith(QLatin1String("+"))) {
|
||||||
|
// persona, cartella, quanti: si mostra l'avanzamento invece di
|
||||||
|
// lasciare "controllo in corso" senza dire nulla
|
||||||
|
const QStringList campi = riga.mid(2).split('\t');
|
||||||
|
if (campi.size() >= 3)
|
||||||
|
m_lastResult = QString("%1: %2 messaggi").arg(campi.at(1), campi.at(2));
|
||||||
|
else
|
||||||
m_lastResult = tr("Posta scaricata");
|
m_lastResult = tr("Posta scaricata");
|
||||||
|
} else if (riga.startsWith(QLatin1String("*"))) {
|
||||||
|
m_lastResult = QString("Cartella %1").arg(riga.mid(2).trimmed());
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
emit lastResultChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,6 +133,7 @@ void EngineBridge::pollMail()
|
|||||||
if (m_lastResult.isEmpty()) m_lastResult = tr("Nessun messaggio nuovo");
|
if (m_lastResult.isEmpty()) m_lastResult = tr("Nessun messaggio nuovo");
|
||||||
if (s_rescan) s_rescan(); // le cartelle possono essere nuove
|
if (s_rescan) s_rescan(); // le cartelle possono essere nuove
|
||||||
emit checkingChanged();
|
emit checkingChanged();
|
||||||
|
emit lastResultChanged();
|
||||||
emit ready(); // la QML ricarica
|
emit ready(); // la QML ricarica
|
||||||
emit mailChecked();
|
emit mailChecked();
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -18,7 +18,7 @@ class EngineBridge : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool checking READ checking NOTIFY checkingChanged)
|
Q_PROPERTY(bool checking READ checking NOTIFY checkingChanged)
|
||||||
Q_PROPERTY(QString lastResult READ lastResult NOTIFY mailChecked)
|
Q_PROPERTY(QString lastResult READ lastResult NOTIFY lastResultChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EngineBridge(QObject *parent = nullptr);
|
explicit EngineBridge(QObject *parent = nullptr);
|
||||||
@@ -53,6 +53,8 @@ signals:
|
|||||||
void ready();
|
void ready();
|
||||||
void checkingChanged();
|
void checkingChanged();
|
||||||
void mailChecked();
|
void mailChecked();
|
||||||
|
// a ogni riga di avanzamento che il motore manda durante il controllo
|
||||||
|
void lastResultChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void pollMail();
|
void pollMail();
|
||||||
|
|||||||
+2
-2
@@ -21,9 +21,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
|||||||
|
|
||||||
app->setOrganizationName(QStringLiteral("harbour"));
|
app->setOrganizationName(QStringLiteral("harbour"));
|
||||||
app->setApplicationName(QStringLiteral("grumpydove"));
|
app->setApplicationName(QStringLiteral("grumpydove"));
|
||||||
app->setApplicationVersion(QStringLiteral("0.4.0"));
|
app->setApplicationVersion(QStringLiteral("0.4.1"));
|
||||||
|
|
||||||
qDebug() << "harbour-grumpydove v0.4.0 build" << __DATE__ << __TIME__;
|
qDebug() << "harbour-grumpydove v0.4.1 build" << __DATE__ << __TIME__;
|
||||||
|
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
if (translator.load(QLocale(), QStringLiteral("harbour-grumpydove"),
|
if (translator.load(QLocale(), QStringLiteral("harbour-grumpydove"),
|
||||||
|
|||||||
Reference in new issue
Block a user