diff options
author | MattV <[email protected]> | 2009-04-03 10:18:23 +1000 |
---|---|---|
committer | MattV <[email protected]> | 2009-04-03 10:18:23 +1000 |
commit | f4892d2e0675ea1094c3463cbedffb4362e95a18 (patch) | |
tree | d6e73ed9352b5569b3f97e918f03616591b92f6b /src/plugins/viewers/generic/genericviewer.cpp | |
parent | 21956800f38b8a90b0dda7e8dc6d441b84617494 (diff) |
Progressively download text/plain messages and parts.
Diffstat (limited to 'src/plugins/viewers/generic/genericviewer.cpp')
-rw-r--r-- | src/plugins/viewers/generic/genericviewer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/viewers/generic/genericviewer.cpp b/src/plugins/viewers/generic/genericviewer.cpp index c008e475..a9473822 100644 --- a/src/plugins/viewers/generic/genericviewer.cpp +++ b/src/plugins/viewers/generic/genericviewer.cpp @@ -150,14 +150,23 @@ void GenericViewer::linkClicked(const QUrl& link) attachmentDialog->setAttachment(message->partAt(partLocation)); connect(attachmentDialog, SIGNAL(retrieve(QMailMessagePart)), this, SIGNAL(retrieveMessagePart(QMailMessagePart))); + connect(attachmentDialog, SIGNAL(retrievePortion(QMailMessagePart, uint)), this, SIGNAL(retrieveMessagePartPortion(QMailMessagePart, uint))); connect(attachmentDialog, SIGNAL(finished(int)), this, SLOT(dialogFinished(int))); attachmentDialog->exec(); return; } } - } else if (command == "download") { - emit completeMessage(); + } else if (command.startsWith("download")) { + QRegExp splitter("download(?:;(\\d+))?"); + if (splitter.exactMatch(command)) { + QString bytes = splitter.cap(1); + if (!bytes.isEmpty()) { + emit retrieveMessagePortion(bytes.toUInt()); + } else { + emit retrieveMessage(); + } + } } emit anchorClicked(link); |