summaryrefslogtreecommitdiff
path: root/noncore/net/mail/accountview.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index 7938d4f..297f553 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -122,49 +122,49 @@ RecBody AccountView::fetchBody(const RecMail&aMail)
122 AccountViewItem *view = static_cast<AccountViewItem *>(item); 122 AccountViewItem *view = static_cast<AccountViewItem *>(item);
123 return view->fetchBody(aMail); 123 return view->fetchBody(aMail);
124} 124}
125 125
126void AccountView::setupFolderselect(Selectstore*sels) 126void AccountView::setupFolderselect(Selectstore*sels)
127{ 127{
128 QPEApplication::showDialog( sels ); 128 QPEApplication::showDialog( sels );
129 QStringList sFolders; 129 QStringList sFolders;
130 unsigned int i = 0; 130 unsigned int i = 0;
131 for (i=0; i < mhAccounts.count();++i) 131 for (i=0; i < mhAccounts.count();++i)
132 { 132 {
133 mhAccounts[i]->refresh(false); 133 mhAccounts[i]->refresh(false);
134 sFolders = mhAccounts[i]->subFolders(); 134 sFolders = mhAccounts[i]->subFolders();
135 sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders); 135 sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders);
136 } 136 }
137 for (i=0; i < imapAccounts.count();++i) 137 for (i=0; i < imapAccounts.count();++i)
138 { 138 {
139 if (imapAccounts[i]->offline()) 139 if (imapAccounts[i]->offline())
140 continue; 140 continue;
141 imapAccounts[i]->refreshFolders(false); 141 imapAccounts[i]->refreshFolders(false);
142 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); 142 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders());
143 } 143 }
144} 144}
145 145
146void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper) 146void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper)
147{ 147{
148 AbstractMail*targetMail = 0; 148 AbstractMail*targetMail = 0;
149 QString targetFolder = ""; 149 QString targetFolder = "";
150 Selectstore sels; 150 Selectstore sels;
151 setupFolderselect(&sels); 151 setupFolderselect(&sels);
152 if (!sels.exec()) return; 152 if (!sels.exec()) return;
153 targetMail = sels.currentMail(); 153 targetMail = sels.currentMail();
154 targetFolder = sels.currentFolder(); 154 targetFolder = sels.currentFolder();
155 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || 155 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
156 targetFolder.isEmpty()) 156 targetFolder.isEmpty())
157 { 157 {
158 return; 158 return;
159 } 159 }
160 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 160 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
161 { 161 {
162 QMessageBox::critical(0,tr("Error creating new Folder"), 162 QMessageBox::critical(0,tr("Error creating new Folder"),
163 tr("<center>Error while creating<br>new folder - breaking.</center>")); 163 tr("<center>Error while creating<br>new folder - breaking.</center>"));
164 return; 164 return;
165 } 165 }
166 qDebug("Targetfolder: %s",targetFolder.latin1()); 166 qDebug("Targetfolder: %s",targetFolder.latin1());
167 qDebug("Fromfolder: %s",fromFolder->getName().latin1()); 167 qDebug("Fromfolder: %s",fromFolder->getName().latin1());
168 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); 168 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails());
169 refreshCurrent(); 169 refreshCurrent();
170} 170}