summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-07 11:34:09 +0200
committerMontel Laurent <[email protected]>2017-05-07 11:34:09 +0200
commit9196ba482fa8d9dfb0755561e1b90344bb9f5302 (patch)
treeb51482ec00cb6071a1f835afde927068aec3e57f
parentc695dcab92ffb55cb540fb200077133c0944d3f7 (diff)
Make it compile with QT_NO_CAST_FROM_BYTEARRAY
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/mailimporter/filters/filterevolution.cpp6
-rw-r--r--src/mailimporter/filters/filterevolution_v2.cpp6
-rw-r--r--src/mailimporter/filters/filtermailapp.cpp6
-rw-r--r--src/mailimporter/filters/filtermailmangzip.cpp6
-rw-r--r--src/mailimporter/filters/filtermbox.cpp6
-rw-r--r--src/mailimporter/filters/filteropera.cpp6
-rw-r--r--src/mailimporter/filters/filterpmail.cpp2
-rw-r--r--src/mailimporter/filters/filterthebat.cpp2
-rw-r--r--src/mailimporter/filters/filterthunderbird.cpp6
10 files changed, 23 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 715a915..9564ebe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,6 @@ find_package(KF5Libkdepim ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions( -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT )
-remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
add_definitions( -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 )
########### CMake Config Files ###########
diff --git a/src/mailimporter/filters/filterevolution.cpp b/src/mailimporter/filters/filterevolution.cpp
index f847ce0..4c4cc2a 100644
--- a/src/mailimporter/filters/filterevolution.cpp
+++ b/src/mailimporter/filters/filterevolution.cpp
@@ -175,13 +175,13 @@ void FilterEvolution::importMBox(const QString &mboxName, const QString &rootDir
QByteArray separate;
if (!first_msg) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = mbox.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
while (! mbox.atEnd() && (l = mbox.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
tmp.flush();
first_msg = false;
diff --git a/src/mailimporter/filters/filterevolution_v2.cpp b/src/mailimporter/filters/filterevolution_v2.cpp
index 0fb633c..f9428f2 100644
--- a/src/mailimporter/filters/filterevolution_v2.cpp
+++ b/src/mailimporter/filters/filterevolution_v2.cpp
@@ -230,13 +230,13 @@ void FilterEvolution_v2::importMBox(const QString &mboxName, const QString &root
QByteArray separate;
if (!first_msg) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = mbox.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
while (! mbox.atEnd() && (l = mbox.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
tmp.flush();
first_msg = false;
diff --git a/src/mailimporter/filters/filtermailapp.cpp b/src/mailimporter/filters/filtermailapp.cpp
index 8ab7416..8bef532 100644
--- a/src/mailimporter/filters/filtermailapp.cpp
+++ b/src/mailimporter/filters/filtermailapp.cpp
@@ -110,13 +110,13 @@ void FilterMailApp::importMails(const QString &maildir)
QByteArray separate;
if (!first_msg) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = mbox.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
while (! mbox.atEnd() && (l = mbox.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
tmp.flush();
first_msg = false;
diff --git a/src/mailimporter/filters/filtermailmangzip.cpp b/src/mailimporter/filters/filtermailmangzip.cpp
index 6975070..4b222a9 100644
--- a/src/mailimporter/filters/filtermailmangzip.cpp
+++ b/src/mailimporter/filters/filtermailmangzip.cpp
@@ -94,18 +94,18 @@ void FilterMailmanGzip::importMails(const QStringList &filenames)
/* check if the first line start with "From " (and not "From: ") and discard the line
* in this case because some IMAP servers (e.g. Cyrus) don't accept this header line */
if (!first_msg && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = device->readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
if ((separate = input.data()).left(5) != "From ") {
separate.replace(" at ", "@");
- tmp.write(separate, separate.length());
+ tmp.write(separate.constData(), separate.length());
}
while (! device->atEnd() && (l = device->readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
// workaround to fix hang if a corrupted mbox contains some
// binary data, for more see bug #106796
diff --git a/src/mailimporter/filters/filtermbox.cpp b/src/mailimporter/filters/filtermbox.cpp
index a205450..810fc7e 100644
--- a/src/mailimporter/filters/filtermbox.cpp
+++ b/src/mailimporter/filters/filtermbox.cpp
@@ -92,17 +92,17 @@ void FilterMBox::importMails(const QStringList &filenames)
/* check if the first line start with "From " (and not "From: ") and discard the line
* in this case because some IMAP servers (e.g. Cyrus) don't accept this header line */
if (!first_msg && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = mbox.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
if ((separate = input.data()).left(5) != "From ") {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
while (! mbox.atEnd() && (l = mbox.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
// workaround to fix hang if a corrupted mbox contains some
// binary data, for more see bug #106796
diff --git a/src/mailimporter/filters/filteropera.cpp b/src/mailimporter/filters/filteropera.cpp
index 66e567f..5285858 100644
--- a/src/mailimporter/filters/filteropera.cpp
+++ b/src/mailimporter/filters/filteropera.cpp
@@ -107,15 +107,15 @@ void FilterOpera::importBox(const QDir &importDir, const QStringList &files, con
QByteArray separate;
if (!first_msg) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = operaArchiv.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
while (! operaArchiv.atEnd() && (l = operaArchiv.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
/** remove in KMail unneeded Flags from Opera (for example: X-Opera-Status)*/
if (separate.left(8) != "X-Opera-") {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
}
tmp.flush();
diff --git a/src/mailimporter/filters/filterpmail.cpp b/src/mailimporter/filters/filterpmail.cpp
index 3c5ec10..928910f 100644
--- a/src/mailimporter/filters/filterpmail.cpp
+++ b/src/mailimporter/filters/filterpmail.cpp
@@ -188,7 +188,7 @@ void FilterPMail::importMailFolder(const QString &file)
if (input.at(0) == 0x1a) {
break;
} else {
- tempfile.write(input, l);
+ tempfile.write(input.constData(), l);
}
}
tempfile.flush();
diff --git a/src/mailimporter/filters/filterthebat.cpp b/src/mailimporter/filters/filterthebat.cpp
index ff439b4..9c21574 100644
--- a/src/mailimporter/filters/filterthebat.cpp
+++ b/src/mailimporter/filters/filterthebat.cpp
@@ -243,7 +243,7 @@ void FilterTheBat::importFiles(const QString &FileName)
QTemporaryFile tmp;
tmp.open();
- tmp.write(input, endPos - lastPos);
+ tmp.write(input.constData(), endPos - lastPos);
tmp.flush();
importMessage(_path, tmp.fileName(), filterInfo()->removeDupMessage());
diff --git a/src/mailimporter/filters/filterthunderbird.cpp b/src/mailimporter/filters/filterthunderbird.cpp
index 1550b47..198a366 100644
--- a/src/mailimporter/filters/filterthunderbird.cpp
+++ b/src/mailimporter/filters/filterthunderbird.cpp
@@ -298,13 +298,13 @@ void FilterThunderbird::importMBox(const QString &mboxName, const QString &rootD
QByteArray separate;
if (!first_msg) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
l = mbox.readLine(input.data(), MAX_LINE); // read the first line, prevent "From "
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
while (! mbox.atEnd() && (l = mbox.readLine(input.data(), MAX_LINE)) && ((separate = input.data()).left(5) != "From ")) {
- tmp.write(input, l);
+ tmp.write(input.constData(), l);
}
tmp.flush();
first_msg = false;