Svuota il cestino: la voce chiede al motore, non alla vista (0.22.4)
folderType() legge folders(), che e' la vista e puo' non contenere la cartella aperta: la voce spariva. eCestino() chiede il nome al motore.
This commit is contained in:
1 parent
8655990b9a
commit
3037df9e96
5 files changed
+28
-4
No files matched your search
@@ -559,6 +559,24 @@ bool EngineBridge::isUnread(int folder, int row)
|
||||
return unreadMark(cell(folder, row, Status));
|
||||
}
|
||||
|
||||
// Se una cartella è un cestino, chiesto direttamente al motore. Non passa per
|
||||
// folders(): quella è la vista, e se per un attimo nasconde una cartella la
|
||||
// voce "Svuota il cestino" sparisce senza che sia cambiato niente.
|
||||
bool EngineBridge::eCestino(int folder)
|
||||
{
|
||||
if (!s_folder) return false;
|
||||
char buf[512];
|
||||
int depth = 0;
|
||||
for (int i = 0; i < 500; i++) {
|
||||
memset(buf, 0, sizeof buf);
|
||||
const int n = s_folder(i, &depth, buf, int(sizeof buf) - 1);
|
||||
if (n < 0) break;
|
||||
if (i == folder)
|
||||
return testoMotore(buf, n) == QLatin1String("Trash");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString EngineBridge::folderType(int folder)
|
||||
{
|
||||
const QVariantList elenco = folders();
|
||||
|
||||
Reference in new issue
Block a user