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 Add-ons
Commits
41887e8a
Commit
41887e8a
authored
Sep 07, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const'ify + modernize code
parent
7b7cd675
Pipeline
#33347
failed with stage
in 60 minutes and 44 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
9 deletions
+8
-9
kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
...ssbook/importexportplugins/csv/import/csvimportdialog.cpp
+2
-3
kaddressbook/importexportplugins/csv/import/qcsvmodel.cpp
kaddressbook/importexportplugins/csv/import/qcsvmodel.cpp
+1
-1
kaddressbook/importexportplugins/csv/import/qcsvmodel_p.h
kaddressbook/importexportplugins/csv/import/qcsvmodel_p.h
+1
-1
kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
+1
-1
kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp
...ortexportplugins/ldap/ldapimportexportplugininterface.cpp
+1
-1
kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
...ortexportplugins/ldif/ldifimportexportplugininterface.cpp
+1
-1
kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
...exportplugins/vcards/vcardimportexportplugininterface.cpp
+1
-1
No files found.
kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
View file @
41887e8a
...
...
@@ -100,7 +100,7 @@ private:
KAddressBookImportExport
::
KAddressBookImportExportContactFields
::
Fields
fields
=
KAddressBookImportExport
::
KAddressBookImportExportContactFields
::
allFields
();
fields
.
remove
(
KAddressBookImportExport
::
KAddressBookImportExportContactFields
::
Undefined
);
for
(
int
i
=
0
;
i
<
fields
.
count
();
++
i
)
{
for
(
int
i
=
0
,
total
=
fields
.
count
();
i
<
total
;
++
i
)
{
mFieldMap
.
insert
(
KAddressBookImportExport
::
KAddressBookImportExportContactFields
::
label
(
fields
.
at
(
i
)),
fields
.
at
(
i
));
}
}
...
...
@@ -165,7 +165,6 @@ public:
CSVImportDialog
::
CSVImportDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mDevice
(
nullptr
)
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"CSV Import Dialog"
));
setModal
(
true
);
...
...
@@ -511,7 +510,7 @@ void CSVImportDialog::reloadCodecs()
mCodecCombo
->
addItem
(
i18nc
(
"@item:inlistbox Codec setting"
,
"Unicode"
),
Uni
);
mCodecCombo
->
addItem
(
i18nc
(
"@item:inlistbox Codec setting"
,
"Microsoft Unicode"
),
MSBug
);
for
(
int
i
=
0
;
i
<
mCodecs
.
count
();
++
i
)
{
for
(
int
i
=
0
,
total
=
mCodecs
.
count
();
i
<
total
;
++
i
)
{
mCodecCombo
->
addItem
(
QLatin1String
(
mCodecs
.
at
(
i
)
->
name
()),
Codec
+
i
);
}
}
...
...
kaddressbook/importexportplugins/csv/import/qcsvmodel.cpp
View file @
41887e8a
...
...
@@ -12,8 +12,8 @@
CsvParser
::
CsvParser
(
QObject
*
parent
)
:
QThread
(
parent
)
,
mReader
(
new
QCsvReader
(
this
))
{
mReader
=
new
QCsvReader
(
this
);
}
CsvParser
::~
CsvParser
()
...
...
kaddressbook/importexportplugins/csv/import/qcsvmodel_p.h
View file @
41887e8a
...
...
@@ -43,7 +43,7 @@ protected:
void
run
()
override
;
private:
QCsvReader
*
mReade
r
=
nullpt
r
;
QCsvReader
*
const
mReader
;
QIODevice
*
mDevice
=
nullptr
;
int
mRowCount
=
0
;
int
mColumnCount
=
0
;
...
...
kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
View file @
41887e8a
...
...
@@ -29,7 +29,7 @@ public:
void
emitEndLine
(
uint
row
);
void
emitField
(
const
QString
&
data
,
int
row
,
int
column
);
QCsvBuilderInterface
*
mBuilder
=
nullptr
;
QCsvBuilderInterface
*
const
mBuilder
;
QTextCodec
*
mCodec
=
nullptr
;
QChar
mTextQuote
=
QLatin1Char
(
'"'
);
QChar
mDelimiter
=
QLatin1Char
(
' '
);
...
...
kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp
View file @
41887e8a
...
...
@@ -26,7 +26,7 @@ void LDapImportExportPluginInterface::createAction(KActionCollection *ac)
QAction
*
action
=
ac
->
addAction
(
QStringLiteral
(
"file_import_ldap"
));
action
->
setText
(
i18n
(
"Import From LDAP server..."
));
action
->
setWhatsThis
(
i18n
(
"Import contacts from an LDAP server."
));
setImportActions
(
QList
<
QAction
*>
()
<<
action
);
setImportActions
(
{
action
}
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
&
LDapImportExportPluginInterface
::
slotImportLdap
);
}
...
...
kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
View file @
41887e8a
...
...
@@ -180,7 +180,7 @@ void LDifImportExportPluginInterface::exportLdif()
QFile
file
(
fileName
);
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
))
{
QString
txt
=
i18n
(
"<qt>Unable to open file <b>%1</b>.</qt>"
,
fileName
);
const
QString
txt
=
i18n
(
"<qt>Unable to open file <b>%1</b>.</qt>"
,
fileName
);
KMessageBox
::
error
(
parentWidget
(),
txt
);
return
;
}
...
...
kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
View file @
41887e8a
...
...
@@ -111,7 +111,7 @@ void VCardImportExportPluginInterface::importVCard()
{
KContacts
::
Addressee
::
List
addrList
;
const
QString
filter
=
i18n
(
"vCard (*.vcf *.vcard *.vct *.gcrd);;All files (*)"
);
QList
<
QUrl
>
urls
const
QList
<
QUrl
>
urls
=
QFileDialog
::
getOpenFileUrls
(
parentWidget
(),
i18nc
(
"@title:window"
,
"Select vCard to Import"
),
QUrl
(),
filter
);
...
...
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