Remove QT_NO_URL_CAST_FROM_STRING

wilder
Montel Laurent 10 years ago
parent 6a0df44bda
commit 9c07299b79
  1. 1
      CMakeLists.txt
  2. 8
      src/filter/filteractions/filteractionaddtag.cpp
  3. 2
      src/filter/filterimporterexporter.cpp

@ -76,7 +76,6 @@ set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libx
remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
remove_definitions( -DQT_NO_CAST_FROM_ASCII )
remove_definitions( -DQT_NO_CAST_TO_ASCII )
remove_definitions("-DQT_NO_URL_CAST_FROM_STRING")
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailCommon")

@ -106,7 +106,7 @@ bool FilterActionAddTag::argsFromStringInteractive(const QString &argsStr, const
if (mList.isEmpty()) {
return needUpdate;
}
const bool index = mList.contains(mParameter);
const bool index = mList.contains(QUrl(mParameter));
if (!index) {
QPointer<FilterActionMissingTagDialog> dlg = new FilterActionMissingTagDialog(mList, filterName, argsStr);
if (dlg->exec()) {
@ -120,10 +120,10 @@ bool FilterActionAddTag::argsFromStringInteractive(const QString &argsStr, const
FilterAction::ReturnCode FilterActionAddTag::process(ItemContext &context, bool) const
{
if (!mList.contains(mParameter)) {
if (!mList.contains(QUrl(mParameter))) {
return ErrorButGoOn;
}
context.item().setTag(Akonadi::Tag::fromUrl(mParameter));
context.item().setTag(Akonadi::Tag::fromUrl(QUrl(mParameter)));
context.setNeedsFlagStore();
return GoOn;
@ -140,7 +140,7 @@ void FilterActionAddTag::argsFromString(const QString &argsStr)
mParameter = argsStr;
return;
}
if (mList.contains(argsStr)) {
if (mList.contains(QUrl(argsStr))) {
mParameter = argsStr;
return;
}

@ -348,7 +348,7 @@ void FilterImporterExporter::exportFilters(const QList<MailFilter *> &filters, c
{
QUrl saveUrl;
if (fileName.isEmpty()) {
saveUrl = QFileDialog::getSaveFileUrl(d->mParent, i18n("Export Filters"), QDir::homePath());
saveUrl = QFileDialog::getSaveFileUrl(d->mParent, i18n("Export Filters"), QUrl::fromLocalFile(QDir::homePath()));
if (saveUrl.isEmpty() ||
!MessageViewer::Util::checkOverwrite(saveUrl, d->mParent)) {

Loading…
Cancel
Save