author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/customproperties.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'libkcal/customproperties.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkcal/customproperties.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index adc1710..16f4a28 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp | |||
@@ -21,2 +21,4 @@ | |||
21 | #include "customproperties.h" | 21 | #include "customproperties.h" |
22 | //Added by qt3to4: | ||
23 | #include <Q3CString> | ||
22 | 24 | ||
@@ -37,3 +39,3 @@ CustomProperties::~CustomProperties() | |||
37 | 39 | ||
38 | void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, | 40 | void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key, |
39 | const QString &value) | 41 | const QString &value) |
@@ -42,3 +44,3 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke | |||
42 | return; | 44 | return; |
43 | QCString property = "X-KDE-" + app + "-" + key; | 45 | Q3CString property = "X-KDE-" + app + "-" + key; |
44 | if (!checkName(property)) | 46 | if (!checkName(property)) |
@@ -48,13 +50,13 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke | |||
48 | 50 | ||
49 | void CustomProperties::removeCustomProperty(const QCString &app, const QCString &key) | 51 | void CustomProperties::removeCustomProperty(const Q3CString &app, const Q3CString &key) |
50 | { | 52 | { |
51 | removeNonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); | 53 | removeNonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); |
52 | } | 54 | } |
53 | 55 | ||
54 | QString CustomProperties::customProperty(const QCString &app, const QCString &key) const | 56 | QString CustomProperties::customProperty(const Q3CString &app, const Q3CString &key) const |
55 | { | 57 | { |
56 | return nonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); | 58 | return nonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); |
57 | } | 59 | } |
58 | 60 | ||
59 | void CustomProperties::setNonKDECustomProperty(const QCString &name, const QString &value) | 61 | void CustomProperties::setNonKDECustomProperty(const Q3CString &name, const QString &value) |
60 | { | 62 | { |
@@ -65,5 +67,5 @@ void CustomProperties::setNonKDECustomProperty(const QCString &name, const QStri | |||
65 | 67 | ||
66 | void CustomProperties::removeNonKDECustomProperty(const QCString &name) | 68 | void CustomProperties::removeNonKDECustomProperty(const Q3CString &name) |
67 | { | 69 | { |
68 | QMap<QCString, QString>::Iterator it = mProperties.find(name); | 70 | QMap<Q3CString, QString>::Iterator it = mProperties.find(name); |
69 | if (it != mProperties.end()) | 71 | if (it != mProperties.end()) |
@@ -72,5 +74,5 @@ void CustomProperties::removeNonKDECustomProperty(const QCString &name) | |||
72 | 74 | ||
73 | QString CustomProperties::nonKDECustomProperty(const QCString &name) const | 75 | QString CustomProperties::nonKDECustomProperty(const Q3CString &name) const |
74 | { | 76 | { |
75 | QMap<QCString, QString>::ConstIterator it = mProperties.find(name); | 77 | QMap<Q3CString, QString>::ConstIterator it = mProperties.find(name); |
76 | if (it == mProperties.end()) | 78 | if (it == mProperties.end()) |
@@ -80,5 +82,5 @@ QString CustomProperties::nonKDECustomProperty(const QCString &name) const | |||
80 | 82 | ||
81 | void CustomProperties::setCustomProperties(const QMap<QCString, QString> &properties) | 83 | void CustomProperties::setCustomProperties(const QMap<Q3CString, QString> &properties) |
82 | { | 84 | { |
83 | for (QMap<QCString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { | 85 | for (QMap<Q3CString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { |
84 | // Validate the property name and convert any null string to empty string | 86 | // Validate the property name and convert any null string to empty string |
@@ -90,3 +92,3 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper | |||
90 | 92 | ||
91 | QMap<QCString, QString> CustomProperties::customProperties() const | 93 | QMap<Q3CString, QString> CustomProperties::customProperties() const |
92 | { | 94 | { |
@@ -95,3 +97,3 @@ QMap<QCString, QString> CustomProperties::customProperties() const | |||
95 | 97 | ||
96 | bool CustomProperties::checkName(const QCString &name) | 98 | bool CustomProperties::checkName(const Q3CString &name) |
97 | { | 99 | { |