~ubuntu-branches/ubuntu/vivid/kdepim/vivid

« back to all changes in this revision

Viewing changes to importwizard/opera/operaimportdata.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Rohan Garg, Scott Kitterman
  • Date: 2012-11-21 13:12:36 UTC
  • mfrom: (0.2.33)
  • Revision ID: package-import@ubuntu.com-20121121131236-32ijw9a2txrar80k
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release

[ Rohan Garg ]
* Add nepomuk-core-dev to build-deps

[ Scott Kitterman ]
* Add new package, libpimcommon4
  - Add libpimcommon4.install
  - Add to debian/control, including kdepim-dbg and kdepim-dev depends
  - Add to kdepim-dev.install
* Remove usr/bin/backupmail and related files from kmail.install as they are
  not provided by upstream anymore
* Add usr/bin/pimsettingexporter and related files to kmail.install
* Add libnepomukwidgets-dev to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
*/
17
17
 
18
18
#include "opera/operaimportdata.h"
 
19
#include "opera/operaaddressbook.h"
 
20
#include "opera/operasettings.h"
19
21
#include "mailimporter/filter_opera.h"
20
22
#include "mailimporter/filterinfo.h"
21
23
#include "importfilterinfogui.h"
30
32
OperaImportData::OperaImportData(ImportWizard*parent)
31
33
  :AbstractImporter(parent)
32
34
{
33
 
  mPath = MailImporter::FilterOpera::defaultPath();
 
35
  mPath = MailImporter::FilterOpera::defaultSettingsPath();
34
36
}
35
37
 
36
38
OperaImportData::~OperaImportData()
58
60
  MailImporter::FilterOpera opera;
59
61
  opera.setFilterInfo( info );
60
62
  info->setStatusMessage(i18n("Import in progress"));
61
 
  QDir directory(mPath);
 
63
  const QString mailPath(mPath+ QLatin1String("mail/store/"));
 
64
  QDir directory(mailPath);
62
65
  if(directory.exists())
63
 
    opera.importMails(mPath);
 
66
    opera.importMails(mailPath);
64
67
  else
65
68
    opera.import();
66
69
  info->setStatusMessage(i18n("Import finished"));
69
72
  return true;
70
73
}
71
74
 
 
75
bool OperaImportData::importAddressBook()
 
76
{
 
77
  const QString addressbookFile(mPath+QLatin1String("bookmarks.adr"));
 
78
  OperaAddressBook addressbook(addressbookFile,mImportWizard);
 
79
  return true;
 
80
}
 
81
 
 
82
bool OperaImportData::importSettings()
 
83
{
 
84
  const QString settingFile(mPath+QLatin1String("mail/accounts.ini"));
 
85
  OperaSettings settings(settingFile,mImportWizard);
 
86
  return true;
 
87
}
 
88
 
72
89
AbstractImporter::TypeSupportedOptions OperaImportData::supportedOption()
73
90
{
74
91
  TypeSupportedOptions options;
75
92
  options |=AbstractImporter::Mails;
 
93
  options |=AbstractImporter::AddressBooks;
 
94
  options |=AbstractImporter::Settings;
76
95
  return options;
77
96
}