Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Runtime
Commits
f712c093
Commit
f712c093
authored
Jun 27, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QStringLitera
parent
7042a369
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
45 deletions
+44
-45
agents/migration/autotests/dummymigrator.cpp
agents/migration/autotests/dummymigrator.cpp
+1
-1
agents/migration/autotests/schedulertest.cpp
agents/migration/autotests/schedulertest.cpp
+1
-1
migration/kmigratorbase.cpp
migration/kmigratorbase.cpp
+5
-5
resources/akonotes/akonotesresource.cpp
resources/akonotes/akonotesresource.cpp
+2
-2
resources/dav/common/davprincipalhomesetsfetchjob.cpp
resources/dav/common/davprincipalhomesetsfetchjob.cpp
+4
-4
resources/imap/autotests/imaptestbase.cpp
resources/imap/autotests/imaptestbase.cpp
+2
-2
resources/imap/resourcestateinterface.cpp
resources/imap/resourcestateinterface.cpp
+1
-1
resources/imap/settings.cpp
resources/imap/settings.cpp
+1
-1
resources/imap/setupserver.cpp
resources/imap/setupserver.cpp
+6
-6
resources/kolab/kolabhelpers.cpp
resources/kolab/kolabhelpers.cpp
+3
-3
resources/openxchange/oxa/davutils.cpp
resources/openxchange/oxa/davutils.cpp
+2
-2
resources/openxchange/oxa/objectutils.cpp
resources/openxchange/oxa/objectutils.cpp
+3
-3
resources/pop3/accountdialog.cpp
resources/pop3/accountdialog.cpp
+0
-1
resources/pop3/jobs.cpp
resources/pop3/jobs.cpp
+8
-8
resources/shared/singlefileresource/autotests/imapaclattributetest.cpp
...red/singlefileresource/autotests/imapaclattributetest.cpp
+1
-2
resources/shared/singlefileresource/imapaclattribute.cpp
resources/shared/singlefileresource/imapaclattribute.cpp
+2
-2
resources/vcard/vcardresource.cpp
resources/vcard/vcardresource.cpp
+2
-1
No files found.
agents/migration/autotests/dummymigrator.cpp
View file @
f712c093
...
...
@@ -29,7 +29,7 @@ DummyMigrator::DummyMigrator(const QString &identifier)
QString
DummyMigrator
::
displayName
()
const
{
return
Q
Latin1
String
(
"dummymigrator"
);
return
QString
Literal
(
"dummymigrator"
);
}
void
DummyMigrator
::
startWork
()
...
...
agents/migration/autotests/schedulertest.cpp
View file @
f712c093
...
...
@@ -39,7 +39,7 @@ public:
QString
displayName
()
const
Q_DECL_OVERRIDE
{
return
Q
Latin1
String
(
"name"
);
return
QString
Literal
(
"name"
);
}
void
startWork
()
Q_DECL_OVERRIDE
...
...
migration/kmigratorbase.cpp
View file @
f712c093
...
...
@@ -45,11 +45,11 @@ namespace
QString
messageTypeToString
(
KMigratorBase
::
MessageType
type
)
{
switch
(
type
)
{
case
KMigratorBase
::
Success
:
return
Q
Latin1
String
(
"Success"
);
case
KMigratorBase
::
Skip
:
return
Q
Latin1
String
(
"Skipped"
);
case
KMigratorBase
::
Info
:
return
Q
Latin1
String
(
"Info "
);
case
KMigratorBase
::
Warning
:
return
Q
Latin1
String
(
"WARNING"
);
case
KMigratorBase
::
Error
:
return
Q
Latin1
String
(
"ERROR "
);
case
KMigratorBase
::
Success
:
return
QString
Literal
(
"Success"
);
case
KMigratorBase
::
Skip
:
return
QString
Literal
(
"Skipped"
);
case
KMigratorBase
::
Info
:
return
QString
Literal
(
"Info "
);
case
KMigratorBase
::
Warning
:
return
QString
Literal
(
"WARNING"
);
case
KMigratorBase
::
Error
:
return
QString
Literal
(
"ERROR "
);
}
Q_ASSERT
(
false
);
return
QString
();
...
...
resources/akonotes/akonotesresource.cpp
View file @
f712c093
...
...
@@ -32,7 +32,7 @@ AkonotesResource::~AkonotesResource()
QString
AkonotesResource
::
itemMimeType
()
const
{
return
Q
Latin1
String
(
"text/x-vnd.akonadi.note"
);
return
QString
Literal
(
"text/x-vnd.akonadi.note"
);
}
void
AkonotesResource
::
configure
(
WId
windowId
)
...
...
@@ -43,7 +43,7 @@ void AkonotesResource::configure(WId windowId)
QString
AkonotesResource
::
defaultResourceType
()
{
return
Q
Latin1
String
(
"notes"
);
return
QString
Literal
(
"notes"
);
}
AKONADI_RESOURCE_MAIN
(
AkonotesResource
)
resources/dav/common/davprincipalhomesetsfetchjob.cpp
View file @
f712c093
...
...
@@ -39,10 +39,10 @@ void DavPrincipalHomeSetsFetchJob::fetchHomeSets(bool homeSetsOnly)
{
QDomDocument
document
;
QDomElement
propfindElement
=
document
.
createElementNS
(
Q
Latin1
String
(
"DAV:"
),
QStringLiteral
(
"propfind"
));
QDomElement
propfindElement
=
document
.
createElementNS
(
QString
Literal
(
"DAV:"
),
QStringLiteral
(
"propfind"
));
document
.
appendChild
(
propfindElement
);
QDomElement
propElement
=
document
.
createElementNS
(
Q
Latin1
String
(
"DAV:"
),
QStringLiteral
(
"prop"
));
QDomElement
propElement
=
document
.
createElementNS
(
QString
Literal
(
"DAV:"
),
QStringLiteral
(
"prop"
));
propfindElement
.
appendChild
(
propElement
);
const
QString
homeSet
=
DavManager
::
self
()
->
davProtocol
(
mUrl
.
protocol
())
->
principalHomeSet
();
...
...
@@ -50,8 +50,8 @@ void DavPrincipalHomeSetsFetchJob::fetchHomeSets(bool homeSetsOnly)
propElement
.
appendChild
(
document
.
createElementNS
(
homeSetNS
,
homeSet
));
if
(
!
homeSetsOnly
)
{
propElement
.
appendChild
(
document
.
createElementNS
(
Q
Latin1
String
(
"DAV:"
),
QStringLiteral
(
"current-user-principal"
)));
propElement
.
appendChild
(
document
.
createElementNS
(
Q
Latin1
String
(
"DAV:"
),
QStringLiteral
(
"principal-URL"
)));
propElement
.
appendChild
(
document
.
createElementNS
(
QString
Literal
(
"DAV:"
),
QStringLiteral
(
"current-user-principal"
)));
propElement
.
appendChild
(
document
.
createElementNS
(
QString
Literal
(
"DAV:"
),
QStringLiteral
(
"principal-URL"
)));
}
KIO
::
DavJob
*
job
=
DavManager
::
self
()
->
createPropFindJob
(
mUrl
.
url
(),
document
,
QStringLiteral
(
"0"
));
...
...
resources/imap/autotests/imaptestbase.cpp
View file @
f712c093
...
...
@@ -29,12 +29,12 @@ ImapTestBase::ImapTestBase(QObject *parent)
QString
ImapTestBase
::
defaultUserName
()
const
{
return
Q
Latin1
String
(
"test@kdab.com"
);
return
QString
Literal
(
"test@kdab.com"
);
}
QString
ImapTestBase
::
defaultPassword
()
const
{
return
Q
Latin1
String
(
"foobar"
);
return
QString
Literal
(
"foobar"
);
}
ImapAccount
*
ImapTestBase
::
createDefaultAccount
()
const
...
...
resources/imap/resourcestateinterface.cpp
View file @
f712c093
...
...
@@ -40,7 +40,7 @@ QString ResourceStateInterface::mailBoxForCollection(const Akonadi::Collection &
/*if ( showWarnings && collection.remoteId() != rootRemoteId())
qCWarning(IMAPRESOURCE_LOG) << "RID mismatch, is " << collection.remoteId() << " expected " << rootRemoteId();
*/
return
Q
Latin1
String
(
""
);
// see below, this intentionally not just QString()!
return
QString
Literal
(
""
);
// see below, this intentionally not just QString()!
}
const
QString
parentMailbox
=
mailBoxForCollection
(
collection
.
parentCollection
());
if
(
parentMailbox
.
isNull
())
{
// invalid, != isEmpty() here!
...
...
resources/imap/settings.cpp
View file @
f712c093
...
...
@@ -309,7 +309,7 @@ void Settings::loadAccount(ImapAccount *account) const
QString
Settings
::
rootRemoteId
()
const
{
return
Q
Latin1
String
(
"imap://"
)
+
userName
()
+
QLatin1Char
(
'@'
)
+
imapServer
()
+
QLatin1Char
(
'/'
);
return
QString
Literal
(
"imap://"
)
+
userName
()
+
QLatin1Char
(
'@'
)
+
imapServer
()
+
QLatin1Char
(
'/'
);
}
void
Settings
::
renameRootCollection
(
const
QString
&
newName
)
...
...
resources/imap/setupserver.cpp
View file @
f712c093
...
...
@@ -72,17 +72,17 @@ static QString authenticationModeString(MailTransport::Transport::EnumAuthentica
{
switch
(
mode
)
{
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
LOGIN
:
return
Q
Latin1
String
(
"LOGIN"
);
return
QString
Literal
(
"LOGIN"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
PLAIN
:
return
Q
Latin1
String
(
"PLAIN"
);
return
QString
Literal
(
"PLAIN"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
CRAM_MD5
:
return
Q
Latin1
String
(
"CRAM-MD5"
);
return
QString
Literal
(
"CRAM-MD5"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
DIGEST_MD5
:
return
Q
Latin1
String
(
"DIGEST-MD5"
);
return
QString
Literal
(
"DIGEST-MD5"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
GSSAPI
:
return
Q
Latin1
String
(
"GSSAPI"
);
return
QString
Literal
(
"GSSAPI"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
NTLM
:
return
Q
Latin1
String
(
"NTLM"
);
return
QString
Literal
(
"NTLM"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
CLEAR
:
return
i18nc
(
"Authentication method"
,
"Clear text"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
ANONYMOUS
:
...
...
resources/kolab/kolabhelpers.cpp
View file @
f712c093
...
...
@@ -428,11 +428,11 @@ QString KolabHelpers::getIcon(Kolab::FolderType type)
case
Kolab
::
EventType
:
case
Kolab
::
TaskType
:
case
Kolab
::
JournalType
:
return
Q
Latin1
String
(
"view-calendar"
);
return
QString
Literal
(
"view-calendar"
);
case
Kolab
::
ContactType
:
return
Q
Latin1
String
(
"view-pim-contacts"
);
return
QString
Literal
(
"view-pim-contacts"
);
case
Kolab
::
NoteType
:
return
Q
Latin1
String
(
"view-pim-notes"
);
return
QString
Literal
(
"view-pim-notes"
);
case
Kolab
::
MailType
:
case
Kolab
::
ConfigurationType
:
case
Kolab
::
FreebusyType
:
...
...
resources/openxchange/oxa/davutils.cpp
View file @
f712c093
...
...
@@ -25,7 +25,7 @@ using namespace OXA;
QDomElement
DAVUtils
::
addDavElement
(
QDomDocument
&
document
,
QDomNode
&
parentNode
,
const
QString
&
tag
)
{
const
QDomElement
element
=
document
.
createElementNS
(
Q
Latin1
String
(
"DAV:"
),
QStringLiteral
(
"D:"
)
+
tag
);
const
QDomElement
element
=
document
.
createElementNS
(
QString
Literal
(
"DAV:"
),
QStringLiteral
(
"D:"
)
+
tag
);
parentNode
.
appendChild
(
element
);
return
element
;
...
...
@@ -33,7 +33,7 @@ QDomElement DAVUtils::addDavElement(QDomDocument &document, QDomNode &parentNode
QDomElement
DAVUtils
::
addOxElement
(
QDomDocument
&
document
,
QDomNode
&
parentNode
,
const
QString
&
tag
,
const
QString
&
text
)
{
QDomElement
element
=
document
.
createElementNS
(
Q
Latin1
String
(
"http://www.open-xchange.org"
),
QStringLiteral
(
"ox:"
)
+
tag
);
QDomElement
element
=
document
.
createElementNS
(
QString
Literal
(
"http://www.open-xchange.org"
),
QStringLiteral
(
"ox:"
)
+
tag
);
if
(
!
text
.
isEmpty
())
{
const
QDomText
textNode
=
document
.
createTextNode
(
text
);
...
...
resources/openxchange/oxa/objectutils.cpp
View file @
f712c093
...
...
@@ -123,9 +123,9 @@ void *OXA::ObjectUtils::preloadData(const Object &object, KJob *job)
QString
OXA
::
ObjectUtils
::
davPath
(
Folder
::
Module
module
)
{
switch
(
module
)
{
case
Folder
::
Contacts
:
return
Q
Latin1
String
(
"/servlet/webdav.contacts"
);
break
;
case
Folder
::
Calendar
:
return
Q
Latin1
String
(
"/servlet/webdav.calendar"
);
break
;
case
Folder
::
Tasks
:
return
Q
Latin1
String
(
"/servlet/webdav.tasks"
);
break
;
case
Folder
::
Contacts
:
return
QString
Literal
(
"/servlet/webdav.contacts"
);
break
;
case
Folder
::
Calendar
:
return
QString
Literal
(
"/servlet/webdav.calendar"
);
break
;
case
Folder
::
Tasks
:
return
QString
Literal
(
"/servlet/webdav.tasks"
);
break
;
case
Folder
::
Unbound
:
Q_ASSERT
(
false
);
return
QString
();
break
;
}
...
...
resources/pop3/accountdialog.cpp
View file @
f712c093
...
...
@@ -155,7 +155,6 @@ void AccountDialog::setupWidgets()
connect
(
usePipeliningCheck
,
&
QCheckBox
::
clicked
,
this
,
&
AccountDialog
::
slotPipeliningClicked
);
// FIXME: Hide widgets which are not supported yet
filterOnServerCheck
->
hide
();
filterOnServerSizeSpin
->
hide
();
...
...
resources/pop3/jobs.cpp
View file @
f712c093
...
...
@@ -105,21 +105,21 @@ QString POPSession::authenticationToString(int type) const
{
switch
(
type
)
{
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
LOGIN
:
return
Q
Latin1
String
(
"LOGIN"
);
return
QString
Literal
(
"LOGIN"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
PLAIN
:
return
Q
Latin1
String
(
"PLAIN"
);
return
QString
Literal
(
"PLAIN"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
CRAM_MD5
:
return
Q
Latin1
String
(
"CRAM-MD5"
);
return
QString
Literal
(
"CRAM-MD5"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
DIGEST_MD5
:
return
Q
Latin1
String
(
"DIGEST-MD5"
);
return
QString
Literal
(
"DIGEST-MD5"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
GSSAPI
:
return
Q
Latin1
String
(
"GSSAPI"
);
return
QString
Literal
(
"GSSAPI"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
NTLM
:
return
Q
Latin1
String
(
"NTLM"
);
return
QString
Literal
(
"NTLM"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
CLEAR
:
return
Q
Latin1
String
(
"USER"
);
return
QString
Literal
(
"USER"
);
case
MailTransport
::
Transport
::
EnumAuthenticationType
::
APOP
:
return
Q
Latin1
String
(
"APOP"
);
return
QString
Literal
(
"APOP"
);
default:
break
;
}
...
...
resources/shared/singlefileresource/autotests/imapaclattributetest.cpp
View file @
f712c093
...
...
@@ -41,7 +41,6 @@ private Q_SLOTS:
QVERIFY
(
!
attr
.
myRights
());
}
void
shouldBuildAttribute
()
{
QMap
<
QByteArray
,
KIMAP
::
Acl
::
Rights
>
right
;
...
...
@@ -197,7 +196,7 @@ private Q_SLOTS:
<<
QByteArray
(
"testme@host l %% otheruser@host lr % user@host lr"
);
QTest
::
newRow
(
"myrights"
)
<<
acl
<<
KIMAP
::
Acl
::
rightsFromString
(
"lrswipckxtdaen"
)
<<
QByteArray
(
"otheruser@host lr % user@host lr %% %% lrswipckxtdaen"
)
<<
QByteArray
(
"testme@host l %% otheruser@host lr % user@host lr %% lrswipckxtdaen"
);
<<
QByteArray
(
"testme@host l %% otheruser@host lr % user@host lr %% lrswipckxtdaen"
);
}
void
testSerializeDeserialize
()
...
...
resources/shared/singlefileresource/imapaclattribute.cpp
View file @
f712c093
...
...
@@ -158,6 +158,6 @@ void ImapAclAttribute::deserialize(const QByteArray &data)
bool
ImapAclAttribute
::
operator
==
(
const
ImapAclAttribute
&
other
)
const
{
return
(
oldRights
()
==
other
.
oldRights
())
&&
(
rights
()
==
other
.
rights
())
&&
(
myRights
()
==
other
.
myRights
());
&&
(
rights
()
==
other
.
rights
())
&&
(
myRights
()
==
other
.
myRights
());
}
resources/vcard/vcardresource.cpp
View file @
f712c093
...
...
@@ -182,8 +182,9 @@ bool VCardResource::writeToFile(const QString &fileName)
QVector
<
KContacts
::
Addressee
>
v
;
v
.
reserve
(
mAddressees
.
size
());
foreach
(
const
KContacts
::
Addressee
&
addressee
,
mAddressees
)
foreach
(
const
KContacts
::
Addressee
&
addressee
,
mAddressees
)
{
v
.
push_back
(
addressee
);
}
const
QByteArray
data
=
mConverter
.
createVCards
(
v
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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