[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kio/kio=3A_Implemented_the_req?=
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-04-24 18:00:41
Message-ID: 20110424180041.8A281A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 5bc40921e72dd26e2228145b03591a9feb675666 by Dawit Alemayehu.
Committed on 24/04/2011 at 19:41.
Pushed by adawit into branch 'KDE/4.6'.
Implemented the required copy constructor and assignment operator for ExtraFields since it used
in a Qt container (QMap).
CCBUG: 256712
CCBUG: 198396
M +22 -8 kio/kio/authinfo.cpp
M +3 -2 kio/kio/authinfo.h
http://commits.kde.org/kdelibs/5bc40921e72dd26e2228145b03591a9feb675666
diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp
index 54501b6..9290279 100644
--- a/kio/kio/authinfo.cpp
+++ b/kio/kio/authinfo.cpp
@@ -47,12 +47,29 @@ using namespace KIO;
class ExtraField
{
-public:
+public:
+ ExtraField()
+ : flags(AuthInfo::ExtraFieldNoFlags)
+ {
+ }
+
+ ExtraField(const ExtraField& other)
+ : customTitle(other.customTitle),
+ flags (other.flags),
+ value (other.value)
+ {
+ }
+
+ ExtraField& operator=(const ExtraField& other)
+ {
+ customTitle = other.customTitle;
+ flags = other.flags;
+ value = other.value;
+ }
+
QString customTitle; // reserved for future use
AuthInfo::FieldFlags flags;
QVariant value;
-
- ExtraField() : flags(AuthInfo::ExtraFieldNoFlags) {}
};
Q_DECLARE_METATYPE(ExtraField)
@@ -87,7 +104,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, ExtraField &extra
{
QDBusVariant value;
int flag;
-
+
argument.beginStructure();
argument >> extraField.customTitle >> flag >> value;
argument.endStructure();
@@ -100,9 +117,6 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, ExtraField &extra
class KIO::AuthInfoPrivate
{
public:
- AuthInfoPrivate()
- {}
-
QMap<QString, ExtraField> extraFields;
};
@@ -143,7 +157,7 @@ AuthInfo& AuthInfo::operator= ( const AuthInfo& info )
readOnly = info.readOnly;
keepPassword = info.keepPassword;
modified = info.modified;
- d->extraFields = info.d->extraFields;
+ d->extraFields = info.d->extraFields;
return *this;
}
diff --git a/kio/kio/authinfo.h b/kio/kio/authinfo.h
index 6e1d02a..d0d30e6 100644
--- a/kio/kio/authinfo.h
+++ b/kio/kio/authinfo.h
@@ -230,7 +230,7 @@ public:
* it has been closed.
*/
bool keepPassword;
-
+
/**
* Flags for extra fields
* @since 4.1
@@ -279,9 +279,10 @@ public:
* @since 4.3
*/
static void registerMetaTypes();
-
+
protected:
bool modified;
+
private:
friend class ::KIO::AuthInfoPrivate;
AuthInfoPrivate * const d;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic