summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/csv.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/csv.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/csv.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/pwmanager/pwmanager/csv.cpp b/pwmanager/pwmanager/csv.cpp
index 194edf2..226cc08 100644
--- a/pwmanager/pwmanager/csv.cpp
+++ b/pwmanager/pwmanager/csv.cpp
@@ -25,2 +25,4 @@
#include <klocale.h>
+//Added by qt3to4:
+#include <Q3CString>
@@ -44,3 +46,3 @@ bool Csv::importData(const QString &filepath,
QFile f(filepath);
- if (!f.open(IO_ReadOnly)) {
+ if (!f.open(QIODevice::ReadOnly)) {
KMessageBox::error(parent,
@@ -91,3 +93,3 @@ bool Csv::doImport(const QByteArray &d,
int ret;
- QCString s, curCat;
+ Q3CString s, curCat;
int fieldIndex = 0;
@@ -123,3 +125,3 @@ bool Csv::doImport(const QByteArray &d,
case 1: // desc
- di.desc = s;
+ di.desc = std::string(s);
++fieldIndex;
@@ -127,3 +129,3 @@ bool Csv::doImport(const QByteArray &d,
case 2: // name
- di.name = s;
+ di.name = std::string(s);
++fieldIndex;
@@ -131,3 +133,3 @@ bool Csv::doImport(const QByteArray &d,
case 3: // pw
- di.pw = s;
+ di.pw = std::string(s);
++fieldIndex;
@@ -135,3 +137,3 @@ bool Csv::doImport(const QByteArray &d,
case 4: // url
- di.url = s;
+ di.url = std::string(s);
++fieldIndex;
@@ -139,3 +141,3 @@ bool Csv::doImport(const QByteArray &d,
case 5: // launcher
- di.launcher = s;
+ di.launcher = std::string(s);
++fieldIndex;
@@ -143,3 +145,3 @@ bool Csv::doImport(const QByteArray &d,
case 6: // comment
- di.comment = s;
+ di.comment = std::string(s);
++fieldIndex;
@@ -156,3 +158,3 @@ bool Csv::doImport(const QByteArray &d,
if (fieldIndex == 6)
- di.comment = s;
+ di.comment = std::string(s);
inRecord = false;
@@ -177,3 +179,3 @@ bool Csv::doImport(const QByteArray &d,
-int Csv::nextField(QCString *ret,
+int Csv::nextField(Q3CString *ret,
const QByteArray &in,
@@ -355,3 +357,3 @@ bool Csv::exportData(const QString &filepath,
QFile f(filepath);
- if (!f.open(IO_ReadWrite)) {
+ if (!f.open(QIODevice::ReadWrite)) {
KMessageBox::error(parent,
@@ -378,3 +380,3 @@ bool Csv::doExport(QFile &f,
PwMDataItem d;
- QCString s, catName;
+ Q3CString s, catName;
QByteArray b;
@@ -403,3 +405,3 @@ bool Csv::doExport(QFile &f,
#ifndef PWM_EMBEDDED
- b.resize(b.size() - 1, QGArray::SpeedOptim);
+ b.resize(b.size() - 1, Q3GArray::SpeedOptim);
#else
@@ -414,7 +416,7 @@ bool Csv::doExport(QFile &f,
-QCString Csv::newField(QCString s)
+Q3CString Csv::newField(Q3CString s)
{
if (s.isEmpty())
- return QCString();
- QCString ret("\"");
+ return Q3CString();
+ Q3CString ret("\"");
#ifndef PWM_EMBEDDED
@@ -422,3 +424,3 @@ QCString Csv::newField(QCString s)
#else
- s.replace(QRegExp("\""), "\"\"");
+ s.replace("\"", "\"\"");
#endif