Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Libraries
Commits
5bc40921
Commit
5bc40921
authored
Apr 24, 2011
by
Dawit Alemayehu
Browse files
Implemented the required copy constructor and assignment operator for ExtraFields since it used
in a Qt container (QMap). CCBUG: 256712 CCBUG: 198396
parent
4a346543
Changes
2
Hide whitespace changes
Inline
Side-by-side
kio/kio/authinfo.cpp
View file @
5bc40921
...
...
@@ -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
;
}
...
...
kio/kio/authinfo.h
View file @
5bc40921
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment