summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-10-13 06:54:18 +0200
committerMontel Laurent <[email protected]>2015-10-13 06:54:18 +0200
commit3287251777e66c1b13e18ee7d961f6f279a53b83 (patch)
tree432da0cca7a97b6e47619ab6a453b3b1a64d7975
parentac55fa06a7bca3e0318cf270f13dd0e6a4d207b4 (diff)
Astyle kdelibs
-rw-r--r--accountwizard/global.cpp4
-rw-r--r--accountwizard/ispdb/autotests/autoconfigkolabfreebusy.cpp2
-rw-r--r--accountwizard/ispdb/autotests/autoconfigkolabldaptest.cpp2
-rw-r--r--accountwizard/ispdb/autotests/autoconfigkolabmailtest.cpp2
-rw-r--r--accountwizard/ldap.cpp2
-rw-r--r--accountwizard/main.cpp2
-rw-r--r--agents/archivemailagent/archivemailinfo.cpp4
-rw-r--r--agents/archivemailagent/archivemailmanager.cpp4
-rw-r--r--agents/archivemailagent/archivemailwidget.cpp2
-rw-r--r--agents/followupreminderagent/followupreminderinfowidget.cpp2
-rw-r--r--agents/followupreminderagent/followupremindermanager.cpp2
-rw-r--r--agents/mailfilteragent/filtermanager.cpp6
-rw-r--r--agents/notesagent/notesmanager.cpp2
-rw-r--r--agents/sendlateragent/sendlaterconfigurewidget.cpp2
-rw-r--r--agents/sendlateragent/sendlatermanager.cpp2
-rw-r--r--akonadiconsole/browserwidget.cpp2
-rw-r--r--akonadiconsole/monitorsmodel.h2
-rw-r--r--akregator/configuration/akregator_config_appearance.cpp8
-rw-r--r--akregator/export/akregatorstorageexporter.cpp2
-rw-r--r--akregator/plugins/mk4storage/metakit/src/column.cpp6
-rw-r--r--akregator/plugins/mk4storage/metakit/src/fileio.cpp8
-rw-r--r--akregator/plugins/mk4storage/metakit/src/format.cpp8
-rw-r--r--akregator/plugins/mk4storage/metakit/src/persist.cpp20
-rw-r--r--akregator/plugins/mk4storage/metakit/src/string.cpp2
-rw-r--r--akregator/plugins/mk4storage/storagemk4impl.cpp10
-rw-r--r--akregator/src/articleformatter.cpp2
-rw-r--r--akregator/src/articleviewer.cpp2
-rw-r--r--akregator/src/feed.cpp2
-rw-r--r--akregator/src/notificationmanager.cpp6
-rw-r--r--akregator/src/subscriptionlistmodel.cpp2
-rw-r--r--akregator/src/tabwidget.cpp2
-rw-r--r--blogilo/src/addeditblog.cpp4
-rw-r--r--blogilo/src/backend.cpp4
-rw-r--r--blogilo/src/dbman.cpp2
-rw-r--r--blogilo/src/mainwindow.cpp2
-rw-r--r--blogilo/src/toolbox.cpp4
-rw-r--r--blogilo/src/uploadmediadialog.cpp2
-rw-r--r--calendarsupport/src/freebusymodel/freebusyitemmodel.cpp2
-rw-r--r--composereditor-ng/src/widgets/findreplacebar.cpp2
-rw-r--r--console/konsolekalendar/konsolekalendar.cpp2
-rw-r--r--eventviews/src/agenda/agenda.cpp10
-rw-r--r--eventviews/src/agenda/agendaitem.cpp18
-rw-r--r--eventviews/src/agenda/agendaview.cpp6
-rw-r--r--eventviews/src/agenda/alternatelabel.cpp2
-rw-r--r--eventviews/src/agenda/alternatelabel.h1
-rw-r--r--eventviews/src/agenda/timelabels.cpp6
-rw-r--r--eventviews/src/agenda/timelabels.h1
-rw-r--r--eventviews/src/agenda/timelabelszone.cpp2
-rw-r--r--eventviews/src/agenda/timelabelszone.h1
-rw-r--r--eventviews/src/eventview.cpp2
-rw-r--r--eventviews/src/helper.cpp2
-rw-r--r--eventviews/src/helper.h4
-rw-r--r--eventviews/src/list/listview.cpp2
-rw-r--r--eventviews/src/month/monthgraphicsitems.cpp2
-rw-r--r--eventviews/src/multiagenda/multiagendaview.cpp7
-rw-r--r--eventviews/src/prefs.cpp2
-rw-r--r--eventviews/src/prefs.h1
-rw-r--r--eventviews/src/timeline/timelineview.cpp2
-rw-r--r--eventviews/src/timeline/timelineview_p.cpp2
-rw-r--r--eventviews/src/todo/todoview.cpp6
-rw-r--r--eventviews/src/viewerapp/main.cpp2
-rw-r--r--eventviews/src/viewerapp/mainwindow.h1
-rw-r--r--examples/coisceim/tripmodel.h2
-rw-r--r--examples/mailreader/mailreaderview.cpp2
-rw-r--r--grantleeeditor/grantleethemeeditor/desktopfilepage.cpp4
-rw-r--r--grantleetheme/src/grantleetheme.cpp2
-rw-r--r--grantleetheme/src/grantleethememanager.h2
-rw-r--r--importwizard/autodetect/abstractbase.cpp2
-rw-r--r--importwizard/autodetect/abstractbase.h2
-rw-r--r--importwizard/autodetect/abstractsettings.h2
-rw-r--r--importwizard/autodetect/balsa/balsaaddressbook.cpp2
-rw-r--r--importwizard/autodetect/sylpheed/sylpheedsettings.cpp12
-rw-r--r--importwizard/autodetect/sylpheed/sylpheedsettings.h6
-rw-r--r--incidenceeditor-ng/autotests/conflictresolvertest.h2
-rw-r--r--incidenceeditor-ng/src/attendeecomboboxdelegate.cpp2
-rw-r--r--incidenceeditor-ng/src/attendeelineeditdelegate.cpp2
-rw-r--r--incidenceeditor-ng/src/editoritemmanager.cpp2
-rw-r--r--incidenceeditor-ng/src/incidencedatetime.cpp2
-rw-r--r--incidenceeditor-ng/src/visualfreebusywidget.cpp2
-rw-r--r--incidenceeditor-ng/src/visualfreebusywidget.h2
-rw-r--r--kaddressbook/main.cpp4
-rw-r--r--kaddressbook/merge/autotests/mergecontactstest.cpp2
-rw-r--r--kaddressbook/xxport/csv/csv_xxport.cpp2
-rw-r--r--kaddressbook/xxport/csv/csvimportdialog.cpp1
-rw-r--r--kaddressbook/xxport/gmx/gmx_xxport.cpp2
-rw-r--r--kaddressbook/xxport/gmx/gmx_xxport.h2
-rw-r--r--kaddressbook/xxport/ldap/ldap_xxport.h2
-rw-r--r--kaddressbook/xxport/ldif/ldif_xxport.cpp2
-rw-r--r--kaddressbook/xxport/ldif/ldif_xxport.h2
-rw-r--r--kaddressbookgrantlee/src/printing/autotests/grantleeprinttest.cpp10
-rw-r--r--kdgantt2/src/kdganttgraphicsitem.cpp8
-rw-r--r--kdgantt2/src/kdganttgraphicsscene.cpp4
-rw-r--r--kdgantt2/src/kdganttlegend.h3
-rw-r--r--kleopatra/aboutdata.cpp18
-rw-r--r--kleopatra/commands/changeroottrustcommand.cpp2
-rw-r--r--kleopatra/commands/clearcrlcachecommand.cpp2
-rw-r--r--kleopatra/commands/command_p.h6
-rw-r--r--kleopatra/commands/decryptverifyclipboardcommand.cpp2
-rw-r--r--kleopatra/commands/deletecertificatescommand.cpp6
-rw-r--r--kleopatra/commands/exportcertificatecommand.cpp4
-rw-r--r--kleopatra/commands/exportopenpgpcertstoservercommand.cpp2
-rw-r--r--kleopatra/commands/exportsecretkeycommand.cpp2
-rw-r--r--kleopatra/commands/importcertificatescommand.cpp8
-rw-r--r--kleopatra/commands/learncardkeyscommand.cpp2
-rw-r--r--kleopatra/commands/lookupcertificatescommand.cpp4
-rw-r--r--kleopatra/commands/refreshopenpgpcertscommand.cpp2
-rw-r--r--kleopatra/commands/refreshx509certscommand.cpp2
-rw-r--r--kleopatra/commands/selftestcommand.cpp2
-rw-r--r--kleopatra/commands/signencryptfilescommand.cpp12
-rw-r--r--kleopatra/conf/appearanceconfigwidget.cpp20
-rw-r--r--kleopatra/conf/smimevalidationconfigurationwidget.cpp2
-rw-r--r--kleopatra/crypto/certificateresolver.cpp4
-rw-r--r--kleopatra/crypto/createchecksumscontroller.cpp10
-rw-r--r--kleopatra/crypto/decryptverifyemailcontroller.cpp5
-rw-r--r--kleopatra/crypto/decryptverifyfilescontroller.cpp4
-rw-r--r--kleopatra/crypto/encryptemailcontroller.cpp2
-rw-r--r--kleopatra/crypto/gui/decryptverifyfileswizard.cpp2
-rw-r--r--kleopatra/crypto/gui/decryptverifyoperationwidget.cpp2
-rw-r--r--kleopatra/crypto/gui/newsignencryptfileswizard.cpp124
-rw-r--r--kleopatra/crypto/gui/signencryptemailconflictdialog.cpp26
-rw-r--r--kleopatra/crypto/gui/verifychecksumsdialog.cpp12
-rw-r--r--kleopatra/crypto/newsignencryptemailcontroller.cpp4
-rw-r--r--kleopatra/crypto/recipient.cpp8
-rw-r--r--kleopatra/crypto/recipient.h2
-rw-r--r--kleopatra/crypto/sender.cpp10
-rw-r--r--kleopatra/crypto/signemailcontroller.cpp2
-rw-r--r--kleopatra/crypto/signemailtask.cpp2
-rw-r--r--kleopatra/crypto/signencryptfilescontroller.cpp8
-rw-r--r--kleopatra/crypto/signencryptfilestask.cpp4
-rw-r--r--kleopatra/crypto/task_p.h3
-rw-r--r--kleopatra/crypto/verifychecksumscontroller.cpp16
-rw-r--r--kleopatra/dialogs/adduseriddialog.cpp10
-rw-r--r--kleopatra/dialogs/certificatedetailsdialog.cpp10
-rw-r--r--kleopatra/dialogs/certificateselectiondialog.cpp4
-rw-r--r--kleopatra/dialogs/certifycertificatedialog.cpp6
-rw-r--r--kleopatra/dialogs/expirydialog.cpp2
-rw-r--r--kleopatra/dialogs/exportsecretkeydialog.cpp6
-rw-r--r--kleopatra/dialogs/selftestdialog.cpp6
-rw-r--r--kleopatra/dialogs/setinitialpindialog.cpp8
-rw-r--r--kleopatra/kleopatra_options.h29
-rw-r--r--kleopatra/kleopatraapplication.cpp14
-rw-r--r--kleopatra/kleopatraapplication.h6
-rw-r--r--kleopatra/kwatchgnupg/aboutdata.cpp2
-rw-r--r--kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp5
-rw-r--r--kleopatra/libkleopatraclient/core/command.cpp6
-rw-r--r--kleopatra/libkleopatraclient/core/selectcertificatecommand.cpp2
-rw-r--r--kleopatra/libkleopatraclient/gui/certificaterequester.cpp2
-rw-r--r--kleopatra/libkleopatraclient/tests/test_util.h2
-rw-r--r--kleopatra/main.cpp10
-rw-r--r--kleopatra/mainwindow_desktop.cpp6
-rw-r--r--kleopatra/models/keycache.cpp6
-rw-r--r--kleopatra/models/keylistmodel.cpp20
-rw-r--r--kleopatra/models/keylistsortfilterproxymodel.cpp2
-rw-r--r--kleopatra/models/subkeylistmodel.cpp6
-rw-r--r--kleopatra/models/useridlistmodel.cpp8
-rw-r--r--kleopatra/newcertificatewizard/listwidget.cpp2
-rw-r--r--kleopatra/newcertificatewizard/newcertificatewizard.cpp78
-rw-r--r--kleopatra/selftest/enginecheck.cpp8
-rw-r--r--kleopatra/selftest/gpgconfcheck.cpp8
-rw-r--r--kleopatra/selftest/selftest.h2
-rw-r--r--kleopatra/smartcard/readerstatus.cpp10
-rw-r--r--kleopatra/tests/test_keylistmodels.cpp2
-rw-r--r--kleopatra/tests/test_uiserver.cpp16
-rw-r--r--kleopatra/uiserver/assuanserverconnection.cpp14
-rw-r--r--kleopatra/uiserver/selectcertificatecommand.cpp2
-rw-r--r--kleopatra/uiserver/signencryptfilescommand.h2
-rw-r--r--kleopatra/uiserver/uiserver.cpp4
-rw-r--r--kleopatra/utils/action_data.cpp6
-rw-r--r--kleopatra/utils/archivedefinition.cpp4
-rw-r--r--kleopatra/utils/classify.cpp8
-rw-r--r--kleopatra/utils/formatting.cpp10
-rw-r--r--kleopatra/utils/gnupg-helper.cpp2
-rw-r--r--kleopatra/utils/gui-helper.h2
-rw-r--r--kleopatra/utils/headerview.cpp14
-rw-r--r--kleopatra/utils/hex.cpp4
-rw-r--r--kleopatra/utils/input.cpp2
-rw-r--r--kleopatra/utils/kdlogtextwidget.cpp16
-rw-r--r--kleopatra/utils/kdpipeiodevice.cpp14
-rw-r--r--kleopatra/utils/log.cpp2
-rw-r--r--kleopatra/utils/output.cpp57
-rw-r--r--kleopatra/utils/systemtrayicon.cpp4
-rw-r--r--kleopatra/utils/validation.cpp4
-rw-r--r--kleopatra/view/keylistcontroller.cpp6
-rw-r--r--kleopatra/view/keylistcontroller.h2
-rw-r--r--kleopatra/view/keytreeview.cpp6
-rw-r--r--kleopatra/view/keytreeview.h2
-rw-r--r--kleopatra/view/tabwidget.cpp50
-rw-r--r--kmail/aboutdata.cpp6
-rw-r--r--kmail/antispam-virus/antispamwizard.cpp2
-rw-r--r--kmail/collectionpage/collectionmailinglistpage.cpp2
-rw-r--r--kmail/configuredialog/configureappearancepage.cpp18
-rw-r--r--kmail/configuredialog/configurecomposerpage.cpp8
-rw-r--r--kmail/configuredialog/configuredialog_p.cpp4
-rw-r--r--kmail/configuredialog/configuremiscpage.cpp8
-rw-r--r--kmail/configuredialog/configuresecuritypage.cpp6
-rw-r--r--kmail/dialog/archivefolderdialog.cpp2
-rw-r--r--kmail/dialog/kmknotify.cpp2
-rw-r--r--kmail/editor/kmcomposewin.cpp6
-rw-r--r--kmail/editor/kmcomposewin.h4
-rw-r--r--kmail/identity/identitydialog.cpp2
-rw-r--r--kmail/identity/identitypage.cpp4
-rw-r--r--kmail/identity/xfaceconfigurator.cpp2
-rw-r--r--kmail/job/createfollowupreminderonexistingmessagejob.cpp2
-rw-r--r--kmail/job/createnewcontactjob.cpp2
-rw-r--r--kmail/kmcommands.cpp8
-rw-r--r--kmail/kmcommands.h2
-rw-r--r--kmail/kmkernel.cpp10
-rw-r--r--kmail/kmkernel.h4
-rw-r--r--kmail/kmmainwidget.cpp6
-rw-r--r--kmail/kmmainwidget.h4
-rw-r--r--kmail/kmreadermainwin.cpp4
-rw-r--r--kmail/kmreadermainwin.h2
-rw-r--r--kmail/kmreaderwin.cpp10
-rw-r--r--kmail/kmstartup.cpp2
-rw-r--r--kmail/kmsystemtray.cpp6
-rw-r--r--kmail/kmsystemtray.h2
-rw-r--r--kmail/messageactions.cpp2
-rw-r--r--kmail/messageactions.h2
-rw-r--r--kmail/searchdialog/searchdescriptionattribute.h2
-rw-r--r--kmail/searchdialog/searchwindow.cpp2
-rw-r--r--knotes/apps/knotesapp.cpp6
-rw-r--r--knotes/configdialog/knotedisplayconfigwidget.h2
-rw-r--r--knotes/configdialog/knoteeditorconfigwidget.h2
-rw-r--r--knotes/finddialog/knotefinddialog.h4
-rw-r--r--knotes/knoteedit.cpp2
-rw-r--r--knotes/kontactplugin/knotes_part.cpp4
-rw-r--r--knotes/kontactplugin/knotes_plugin.cpp2
-rw-r--r--knotes/kontactplugin/knotesiconview.cpp4
-rw-r--r--knotes/kontactplugin/knotesiconview.h2
-rw-r--r--knotes/print/knoteprinter.cpp4
-rw-r--r--kontact/plugins/summary/summaryview_part.cpp36
-rw-r--r--korgac/korgacmain.cpp2
-rw-r--r--korgac/mailclient.cpp2
-rw-r--r--korganizer/actionmanager.cpp4
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/kodaymatrix.cpp2
-rw-r--r--korganizer/kontactplugin/korganizer/autotests/summaryeventtest.cpp8
-rw-r--r--korganizer/korganizer.cpp3
-rw-r--r--korganizer/prefs/koprefsdialog.cpp4
-rw-r--r--korganizer/views/collectionview/autotests/modeltest.cpp4
-rw-r--r--korganizer/views/multiagendaview/multiagendaview.cpp2
-rw-r--r--ktnef/attachpropertydialog.cpp2
-rw-r--r--ktnef/ktnefmain.cpp8
-rw-r--r--ktnef/messagepropertydialog.cpp4
-rw-r--r--ktnef/qwmf.cpp22
-rw-r--r--ktnef/qwmf.h2
-rw-r--r--libgravatar/src/misc/gravatarcache.cpp8
-rw-r--r--libkdepim/src/addressline/addresslineedit/addresseelineeditstatic.cpp2
-rw-r--r--libkdepim/src/addressline/recentaddress/recentaddresswidget.cpp2
-rw-r--r--libkdepim/src/job/addemailaddressjob.cpp2
-rw-r--r--libkdepim/src/job/addemaildisplayjob.cpp2
-rw-r--r--libkdepim/src/ldap/ldapclientsearch.cpp2
-rw-r--r--libkdepim/src/ldap/ldapsearchdialog.cpp2
-rw-r--r--libkdepim/src/progresswidget/progressmanager.cpp2
-rw-r--r--libkdepim/src/widgets/kwidgetlister.cpp4
-rw-r--r--libkdepim/tests/testldapclient.cpp4
-rw-r--r--libkdepimdbusinterfaces/src/dbusinterfaces/kmkernel.h4
-rw-r--r--libkleo/src/backends/chiasmus/chiasmusbackend.cpp59
-rw-r--r--libkleo/src/backends/chiasmus/chiasmusjob.cpp2
-rw-r--r--libkleo/src/backends/chiasmus/chiasmuslibrary.cpp2
-rw-r--r--libkleo/src/backends/chiasmus/config_data.c2
-rw-r--r--libkleo/src/backends/chiasmus/obtainkeysjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmecryptoconfig.cpp10
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmecryptoconfig.h4
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmeencryptjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmekeygenerationjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmekeylistjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmelistallkeysjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmenewcryptoconfig.cpp17
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmeprogresstokenmapper.cpp4
-rw-r--r--libkleo/src/backends/qgpgme/qgpgmesignencryptjob.cpp2
-rw-r--r--libkleo/src/backends/qgpgme/threadedjobmixin.h6
-rw-r--r--libkleo/src/kleo/checksumdefinition.cpp6
-rw-r--r--libkleo/src/kleo/cryptobackendfactory.cpp16
-rw-r--r--libkleo/src/kleo/dn.cpp34
-rw-r--r--libkleo/src/kleo/enum.cpp12
-rw-r--r--libkleo/src/kleo/hierarchicalkeylistjob.cpp2
-rw-r--r--libkleo/src/kleo/job.cpp2
-rw-r--r--libkleo/src/kleo/kconfigbasedkeyfilter.cpp22
-rw-r--r--libkleo/src/kleo/keyfiltermanager.cpp4
-rw-r--r--libkleo/src/kleo/predicates.h2
-rw-r--r--libkleo/src/kleo/stl_util.h6
-rw-r--r--libkleo/src/tests/test_cryptoconfig.cpp8
-rw-r--r--libkleo/src/tests/test_gnupgprocessbase.cpp6
-rw-r--r--libkleo/src/tests/test_jobs.cpp2
-rw-r--r--libkleo/src/tests/test_keygen.cpp6
-rw-r--r--libkleo/src/tests/test_keyselectiondialog.cpp2
-rw-r--r--libkleo/src/ui/auditlogviewer.cpp8
-rw-r--r--libkleo/src/ui/cryptoconfigmodule.cpp20
-rw-r--r--libkleo/src/ui/directoryserviceswidget.cpp64
-rw-r--r--libkleo/src/ui/dnattributeorderconfigwidget.cpp8
-rw-r--r--libkleo/src/ui/keyapprovaldialog.cpp4
-rw-r--r--libkleo/src/ui/keylistview.cpp18
-rw-r--r--libkleo/src/ui/keylistview.h4
-rw-r--r--libkleo/src/ui/keyrequester.cpp16
-rw-r--r--libkleo/src/ui/keyselectiondialog.cpp40
-rw-r--r--libkleo/src/ui/messagebox.cpp4
-rw-r--r--libksieve/autotests/lexertest.cpp6
-rw-r--r--libksieve/autotests/parsertest.cpp8
-rw-r--r--libksieve/src/impl/lexer.h12
-rw-r--r--libksieve/src/impl/parser.h4
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp18
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp4
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp2
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp4
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveglobalvariablewidget.cpp4
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sieveincludewidget.cpp4
-rw-r--r--libksieve/src/ksieveui/autocreatescripts/sievescriptlistbox.cpp2
-rw-r--r--libksieve/src/ksieveui/managesievescriptsdialog.cpp2
-rw-r--r--libksieve/src/ksieveui/managesievescriptsdialog.h2
-rw-r--r--libksieve/src/ksieveui/scriptsparsing/xmlprintingscriptbuilder.cpp4
-rw-r--r--libksieve/src/ksieveui/vacation/vacationeditwidget.cpp8
-rw-r--r--libksieve/src/ksieveui/vacation/vacationhelperjob.h1
-rw-r--r--libksieve/src/ksieveui/vacation/vacationscriptextractor.h46
-rw-r--r--libksieve/src/ksieveui/vacation/vacationutils.cpp22
-rw-r--r--libksieve/src/ksieveui/widgets/sievetreewidgetitem.cpp2
-rw-r--r--libksieve/src/parser/lexer.cpp12
-rw-r--r--libksieve/src/parser/parser.cpp16
-rw-r--r--libksieve/src/parser/utf8validator.cpp10
-rw-r--r--mailcommon/src/collectionpage/autotests/contenttypewidgettest.cpp4
-rw-r--r--mailcommon/src/collectionpage/autotests/incidencesforwidgettest.cpp2
-rw-r--r--mailcommon/src/collectionpage/collectiongeneralpage.cpp2
-rw-r--r--mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp2
-rw-r--r--mailcommon/src/filter/autotests/filteractionwithurltest.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionaddheader.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionaddtag.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionaddtoaddressbook.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractioncopy.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractiondelete.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractiondict.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionexec.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionforward.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionmove.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionpipethrough.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionredirect.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionremoveheader.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionreplyto.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionrewriteheader.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionsendfakedisposition.cpp5
-rw-r--r--mailcommon/src/filter/filteractions/filteractionsendreceipt.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionsetidentity.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionsetstatus.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionsettransport.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionstatus.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionunsetstatus.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionwidget.cpp8
-rw-r--r--mailcommon/src/filter/filteractions/filteractionwithcommand.cpp2
-rw-r--r--mailcommon/src/filter/filteractions/filteractionwithfolder.cpp2
-rw-r--r--mailcommon/src/filter/filterimporter/filterimporterthunderbird.cpp4
-rw-r--r--mailcommon/src/filter/filterimporterexporter.h2
-rw-r--r--mailcommon/src/filter/kmfilterlistbox.h2
-rw-r--r--mailcommon/src/filter/mailfilter.cpp18
-rw-r--r--mailcommon/src/filter/mailfilter.h2
-rw-r--r--mailcommon/src/filter/soundtestwidget.cpp2
-rw-r--r--mailcommon/src/folder/accountconfigorderdialog.cpp2
-rw-r--r--mailcommon/src/folder/folderrequester.cpp2
-rw-r--r--mailcommon/src/folder/folderrequester.h2
-rw-r--r--mailcommon/src/search/searchpatternedit.cpp6
-rw-r--r--mailcommon/src/search/searchrule/searchrulestatus.h2
-rw-r--r--mailcommon/src/search/searchrule/searchrulestring.cpp4
-rw-r--r--mailcommon/src/search/widgethandler/daterulewidgethandler.h2
-rw-r--r--mailcommon/src/search/widgethandler/headersrulerwidgethandler.h4
-rw-r--r--mailcommon/src/search/widgethandler/messagerulewidgethandler.h4
-rw-r--r--mailcommon/src/search/widgethandler/numericdoublerulewidgethandler.h2
-rw-r--r--mailcommon/src/search/widgethandler/numericrulewidgethandler.h2
-rw-r--r--mailcommon/src/search/widgethandler/statusrulewidgethandler.h2
-rw-r--r--mailcommon/src/search/widgethandler/tagrulewidgethandler.h4
-rw-r--r--mailcommon/src/search/widgethandler/textrulerwidgethandler.h4
-rw-r--r--mailcommon/src/tag/tagwidget.cpp9
-rw-r--r--mailimporter/src/filterbalsa.cpp6
-rw-r--r--mailimporter/src/filterevolution.cpp4
-rw-r--r--mailimporter/src/filterevolution_v2.cpp8
-rw-r--r--mailimporter/src/filterevolution_v3.cpp8
-rw-r--r--mailimporter/src/filterkmail_maildir.cpp6
-rw-r--r--mailimporter/src/filterkmailarchive.cpp2
-rw-r--r--mailimporter/src/filterlnotes.cpp2
-rw-r--r--mailimporter/src/filtermailapp.cpp2
-rw-r--r--mailimporter/src/filteropera.cpp2
-rw-r--r--mailimporter/src/filters.cpp4
-rw-r--r--mailimporter/src/filtersylpheed.cpp4
-rw-r--r--mailimporter/src/filterthebat.cpp6
-rw-r--r--mailimporter/src/filterthunderbird.cpp8
-rw-r--r--messagecomposer/autotests/cryptocomposertest.cpp4
-rw-r--r--messagecomposer/autotests/cryptofunctions.cpp2
-rw-r--r--messagecomposer/autotests/messagefactorytest.cpp4
-rw-r--r--messagecomposer/src/attachment/attachmentcontrollerbase.cpp2
-rw-r--r--messagecomposer/src/composer-ng/autotests/richtextcomposeractionstest.cpp2
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposeractions.cpp1
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposercontroler.cpp2
-rw-r--r--messagecomposer/src/composer-ng/richtextcomposersignatures.cpp46
-rw-r--r--messagecomposer/src/composer/composer.cpp2
-rw-r--r--messagecomposer/src/composer/composer.h2
-rw-r--r--messagecomposer/src/composer/composerlineedit.cpp2
-rw-r--r--messagecomposer/src/composer/composerviewbase.cpp10
-rw-r--r--messagecomposer/src/composer/composerviewbase.h6
-rw-r--r--messagecomposer/src/composer/keyresolver.cpp86
-rw-r--r--messagecomposer/src/composer/keyresolver.h24
-rw-r--r--messagecomposer/src/helper/messagefactory.h2
-rw-r--r--messagecomposer/src/helper/messagehelper.cpp4
-rw-r--r--messagecomposer/src/sender/akonadisender.cpp2
-rw-r--r--messagecomposer/src/utils/kleo_util.h14
-rw-r--r--messagecore/src/helpers/nodehelper.cpp2
-rw-r--r--messagecore/src/messagecoreutil.cpp3
-rw-r--r--messagecore/src/messagecoreutil.h6
-rw-r--r--messagecore/src/utils/stringutil.cpp6
-rw-r--r--messagecore/src/utils/stringutil.h2
-rw-r--r--messagelist/src/core/item.cpp6
-rw-r--r--messagelist/src/core/manager.cpp2
-rw-r--r--messagelist/src/core/model.cpp4
-rw-r--r--messagelist/src/core/modelinvariantindex.h1
-rw-r--r--messagelist/src/core/modelinvariantrowmapper.h1
-rw-r--r--messagelist/src/core/theme.cpp44
-rw-r--r--messagelist/src/core/theme.h1
-rw-r--r--messagelist/src/core/themedelegate.cpp40
-rw-r--r--messagelist/src/core/view.cpp2
-rw-r--r--messagelist/src/core/view.h1
-rw-r--r--messagelist/src/core/widgets/quicksearchline.cpp2
-rw-r--r--messagelist/src/core/widgets/quicksearchwarning.cpp1
-rw-r--r--messagelist/src/pane.cpp14
-rw-r--r--messagelist/src/storagemodel.cpp6
-rw-r--r--messagelist/src/storagemodel.h5
-rw-r--r--messagelist/src/utils/configureaggregationsdialog.h1
-rw-r--r--messagelist/src/utils/themeeditor.cpp1
-rw-r--r--messageviewer/autotests/testcsshelper.cpp4
-rw-r--r--messageviewer/autotests/viewertest.cpp1
-rw-r--r--messageviewer/src/adblock/adblockmanager.cpp2
-rw-r--r--messageviewer/src/adblock/adblockshowlistdialog.cpp2
-rw-r--r--messageviewer/src/adblock/networkaccessmanager.cpp2
-rw-r--r--messageviewer/src/antispam/antispamconfig.cpp2
-rw-r--r--messageviewer/src/header/contactdisplaymessagememento.cpp2
-rw-r--r--messageviewer/src/header/customheaderstyleplugin/customheaderstrategy.cpp2
-rw-r--r--messageviewer/src/header/customheaderstyleplugin/customheaderstyle.h2
-rw-r--r--messageviewer/src/header/grantleeheaderformatter.cpp24
-rw-r--r--messageviewer/src/header/headerstrategy.cpp2
-rw-r--r--messageviewer/src/header/headerstyle_util.cpp2
-rw-r--r--messageviewer/src/htmlwriter/queuehtmlwriter.cpp8
-rw-r--r--messageviewer/src/htmlwriter/queuehtmlwriter.h2
-rw-r--r--messageviewer/src/job/attachmentencryptwithchiasmusjob.cpp2
-rw-r--r--messageviewer/src/utils/autoqpointer.h2
-rw-r--r--messageviewer/src/utils/messageviewerutil.cpp8
-rw-r--r--messageviewer/src/viewer/bodypartformatterfactory.cpp6
-rw-r--r--messageviewer/src/viewer/csshelper.cpp4
-rw-r--r--messageviewer/src/viewer/csshelperbase.cpp10
-rw-r--r--messageviewer/src/viewer/htmlquotecolorer.h2
-rw-r--r--messageviewer/src/viewer/mailwebview_webkit.cpp2
-rw-r--r--messageviewer/src/viewer/messagepart.cpp79
-rw-r--r--messageviewer/src/viewer/messagepart.h17
-rw-r--r--messageviewer/src/viewer/nodehelper.cpp4
-rw-r--r--messageviewer/src/viewer/objecttreeparser.cpp52
-rw-r--r--messageviewer/src/viewer/objecttreeparser.h4
-rw-r--r--messageviewer/src/viewer/partnodebodypart.cpp2
-rw-r--r--messageviewer/src/viewer/pluginloaderbase.cpp4
-rw-r--r--messageviewer/src/viewer/stl_util.h4
-rw-r--r--messageviewer/src/viewer/urlhandlermanager.cpp22
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp4
-rw-r--r--messageviewer/src/viewer/viewer_p.h2
-rw-r--r--messageviewer/src/widgets/htmlstatusbar.cpp2
-rw-r--r--messageviewer/tests/viewertest_gui.cpp3
-rw-r--r--noteshared/src/network/notesnetworkreceiver.cpp4
-rw-r--r--noteshared/src/widget/notelistwidget.cpp1
-rw-r--r--pimcommon/src/autocorrection/autocorrectionlanguage.cpp2
-rw-r--r--pimcommon/src/autocorrection/autocorrectionwidget.cpp4
-rw-r--r--pimcommon/src/autocorrection/import/importkmailautocorrection.cpp2
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/shorturlengineplugin.h1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/triopabshorturlengineplugin/triopabshorturlengineinterface.cpp1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/triopabshorturlengineplugin/triopabshorturlengineplugin.cpp1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/ur1cashorturlengineplugin/triopabshorturlengineplugin.cpp1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/ur1cashorturlengineplugin/ur1cashorturlengineinterface.cpp1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlengineplugin/ur1cashorturlengineplugin/ur1cashorturlengineplugin.cpp1
-rw-r--r--pimcommon/src/customtools/shorturlplugin/shorturl/shorturlwidgetng.cpp2
-rw-r--r--pimcommon/src/storageservice/storageserviceplugin.cpp1
-rw-r--r--pimcommon/src/storageservice/storageserviceplugin.h1
-rw-r--r--pimcommon/src/storageservice/storageservicepluginmanager.cpp1
-rw-r--r--pimcommon/src/storageservice/tests/servicetestwidget.cpp2
-rw-r--r--pimcommon/src/storageservice/webdav/protocol/webdav_url_info.cpp8
-rw-r--r--pimcommon/src/storageservice/webdav/webdavjob.h2
-rw-r--r--pimcommon/src/storageservice/webdav/webdavjob_p.cpp4
-rw-r--r--pimcommon/src/templatewidgets/templatemanager.cpp2
-rw-r--r--pimcommon/src/translator/googletranslator.cpp1
-rw-r--r--pimcommon/src/util/createresource.h2
-rw-r--r--pimcommon/src/widgets/renamefiledialog.cpp2
-rw-r--r--pimsettingexporter/core/addressbook/importaddressbookjob.cpp2
-rw-r--r--pimsettingexporter/core/akregator/exportakregatorjob.cpp2
-rw-r--r--pimsettingexporter/core/alarm/importalarmjob.cpp2
-rw-r--r--pimsettingexporter/core/blogilo/exportblogilojob.cpp2
-rw-r--r--pimsettingexporter/core/calendar/exportcalendarjob.cpp4
-rw-r--r--pimsettingexporter/core/calendar/importcalendarjob.cpp4
-rw-r--r--pimsettingexporter/core/mail/exportmailjob.cpp12
-rw-r--r--pimsettingexporter/core/mail/importmailjob.cpp4
-rw-r--r--pimsettingexporter/core/notes/exportnotesjob.cpp6
-rw-r--r--pimsettingexporter/core/utils.cpp4
-rw-r--r--plugins/kaddressbook/editorpages/cryptopageplugin.cpp12
-rw-r--r--plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp18
-rw-r--r--plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.cpp4
-rw-r--r--plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp6
-rw-r--r--plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp6
-rw-r--r--sieveeditor/serversievesettingsdialog.cpp1
-rw-r--r--sieveeditor/sieveeditormainwindow.cpp1
-rw-r--r--sieveeditor/sieveeditorpagewidget.cpp2
-rw-r--r--storageservicemanager/storageservicepage.cpp2
-rw-r--r--storageservicemanager/storageservicetabwidget.cpp8
-rw-r--r--templateparser/src/customtemplates.cpp2
519 files changed, 1577 insertions, 1643 deletions
diff --git a/accountwizard/global.cpp b/accountwizard/global.cpp
index 6b4db7f..ac06289 100644
--- a/accountwizard/global.cpp
+++ b/accountwizard/global.cpp
@@ -100,7 +100,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
localPackageFile = remotePackageUrl.path();
} else {
QString remoteFileName = QFileInfo(remotePackageUrl.path()).fileName();
- localPackageFile = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1String("/accountwizard/") + remoteFileName ;
+ localPackageFile = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1String("/accountwizard/") + remoteFileName;
KIO::Job *job = KIO::copy(remotePackageUrl, QUrl::fromLocalFile(localPackageFile), KIO::Overwrite | KIO::HideProgressInfo);
qCDebug(ACCOUNTWIZARD_LOG) << "downloading remote URL" << remotePackageUrl << "to" << localPackageFile;
if (!job->exec()) {
@@ -111,7 +111,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
const QUrl file(QLatin1String("tar://") + localPackageFile);
const QFileInfo fi(localPackageFile);
const QString assistant = fi.baseName();
- const QString dest = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/") ;
+ const QString dest = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1String("/");
QDir().mkpath(dest + file.fileName());
KIO::Job *getJob = KIO::copy(file, QUrl::fromLocalFile(dest), KIO::Overwrite | KIO::HideProgressInfo);
if (getJob->exec()) {
diff --git a/accountwizard/ispdb/autotests/autoconfigkolabfreebusy.cpp b/accountwizard/ispdb/autotests/autoconfigkolabfreebusy.cpp
index 873e3cf..3943dec 100644
--- a/accountwizard/ispdb/autotests/autoconfigkolabfreebusy.cpp
+++ b/accountwizard/ispdb/autotests/autoconfigkolabfreebusy.cpp
@@ -48,7 +48,7 @@ public:
AutoconfigKolabFreebusy *execIspdb(const QString &file)
{
const QString filePath = QStringLiteral(AUTOCONFIG_DATA_DIR) + QLatin1Char('/') + file;
- [](const QString &file) {
+ [](const QString & file) {
QVERIFY(QFile(file).exists());
}(filePath);
diff --git a/accountwizard/ispdb/autotests/autoconfigkolabldaptest.cpp b/accountwizard/ispdb/autotests/autoconfigkolabldaptest.cpp
index 9e0b361..362c3a1 100644
--- a/accountwizard/ispdb/autotests/autoconfigkolabldaptest.cpp
+++ b/accountwizard/ispdb/autotests/autoconfigkolabldaptest.cpp
@@ -48,7 +48,7 @@ public:
AutoconfigKolabLdap *execIspdb(const QString &file)
{
const QString filePath = QStringLiteral(AUTOCONFIG_DATA_DIR) + QLatin1Char('/') + file;
- [](const QString &file) {
+ [](const QString & file) {
QVERIFY(QFile(file).exists());
}(filePath);
diff --git a/accountwizard/ispdb/autotests/autoconfigkolabmailtest.cpp b/accountwizard/ispdb/autotests/autoconfigkolabmailtest.cpp
index 96c5e23..7a39836 100644
--- a/accountwizard/ispdb/autotests/autoconfigkolabmailtest.cpp
+++ b/accountwizard/ispdb/autotests/autoconfigkolabmailtest.cpp
@@ -54,7 +54,7 @@ public:
AutoconfigKolabMail *execIspdb(const QString &file)
{
const QString filePath = QStringLiteral(AUTOCONFIG_DATA_DIR) + QLatin1Char('/') + file;
- [](const QString &file) {
+ [](const QString & file) {
QVERIFY(QFile(file).exists());
}(filePath);
diff --git a/accountwizard/ldap.cpp b/accountwizard/ldap.cpp
index 23d4291..6141220 100644
--- a/accountwizard/ldap.cpp
+++ b/accountwizard/ldap.cpp
@@ -98,7 +98,7 @@ void Ldap::create()
KConfigGroup group = c->group(QStringLiteral("LDAP"));
bool hasMyServer = false;
uint selHosts = group.readEntry("NumSelectedHosts", 0);
- for (uint i = 0 ; i < selHosts && !hasMyServer; ++i) {
+ for (uint i = 0; i < selHosts && !hasMyServer; ++i) {
if (group.readEntry(QStringLiteral("SelectedHost%1").arg(i), QString()) == host) {
hasMyServer = true;
m_entry = i;
diff --git a/accountwizard/main.cpp b/accountwizard/main.cpp
index d6ace85..74bc9ee 100644
--- a/accountwizard/main.cpp
+++ b/accountwizard/main.cpp
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
i18n("(c) 2009-2015 the Akonadi developers"),
QStringLiteral("http://pim.kde.org/akonadi/"));
aboutData.addAuthor(i18n("Volker Krause"), i18n("Author"), QStringLiteral("[email protected]"));
- aboutData.addAuthor(i18n("Laurent Montel"), QString() , QStringLiteral("[email protected]"));
+ aboutData.addAuthor(i18n("Laurent Montel"), QString(), QStringLiteral("[email protected]"));
app.setOrganizationDomain(QStringLiteral("kde.org"));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("akonadi")));
diff --git a/agents/archivemailagent/archivemailinfo.cpp b/agents/archivemailagent/archivemailinfo.cpp
index 3510d0b..17426ba 100644
--- a/agents/archivemailagent/archivemailinfo.cpp
+++ b/agents/archivemailagent/archivemailinfo.cpp
@@ -104,7 +104,7 @@ QUrl ArchiveMailInfo::realUrl(const QString &folderName, bool &dirExist) const
const char *extensions[numExtensions] = { ".zip", ".tar", ".tar.bz2", ".tar.gz" };
const QString dirPath = dirArchive(dirExist);
- const QString path = dirPath + QLatin1Char('/') + i18nc("Start of the filename for a mail archive file" , "Archive")
+ const QString path = dirPath + QLatin1Char('/') + i18nc("Start of the filename for a mail archive file", "Archive")
+ QLatin1Char('_') + normalizeFolderName(folderName) + QLatin1Char('_')
+ QDate::currentDate().toString(Qt::ISODate) + QString::fromLatin1(extensions[mArchiveType]);
QUrl real(QUrl::fromLocalFile(path));
@@ -121,7 +121,7 @@ QStringList ArchiveMailInfo::listOfArchive(const QString &folderName, bool &dirE
QDir dir(dirPath);
QStringList nameFilters;
- nameFilters << i18nc("Start of the filename for a mail archive file" , "Archive") + QLatin1Char('_') +
+ nameFilters << i18nc("Start of the filename for a mail archive file", "Archive") + QLatin1Char('_') +
normalizeFolderName(folderName) + QLatin1Char('_') + QLatin1String("*") + QString::fromLatin1(extensions[mArchiveType]);
const QStringList lst = dir.entryList(nameFilters, QDir::Files | QDir::NoDotAndDotDot, QDir::Time | QDir::Reversed);
return lst;
diff --git a/agents/archivemailagent/archivemailmanager.cpp b/agents/archivemailagent/archivemailmanager.cpp
index 01dff26..e236f31 100644
--- a/agents/archivemailagent/archivemailmanager.cpp
+++ b/agents/archivemailagent/archivemailmanager.cpp
@@ -64,7 +64,7 @@ void ArchiveMailManager::load()
const QStringList collectionList = mConfig->groupList().filter(QRegExp(QStringLiteral("ArchiveMailCollection \\d+")));
const int numberOfCollection = collectionList.count();
- for (int i = 0 ; i < numberOfCollection; ++i) {
+ for (int i = 0; i < numberOfCollection; ++i) {
KConfigGroup group = mConfig->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(group);
@@ -189,7 +189,7 @@ QString ArchiveMailManager::printArchiveListInfo()
QString infoStr;
const QStringList collectionList = mConfig->groupList().filter(QRegExp(QStringLiteral("ArchiveMailCollection \\d+")));
const int numberOfCollection = collectionList.count();
- for (int i = 0 ; i < numberOfCollection; ++i) {
+ for (int i = 0; i < numberOfCollection; ++i) {
KConfigGroup group = mConfig->group(collectionList.at(i));
ArchiveMailInfo info(group);
if (!infoStr.isEmpty()) {
diff --git a/agents/archivemailagent/archivemailwidget.cpp b/agents/archivemailagent/archivemailwidget.cpp
index 823e0f2..892532c 100644
--- a/agents/archivemailagent/archivemailwidget.cpp
+++ b/agents/archivemailagent/archivemailwidget.cpp
@@ -147,7 +147,7 @@ void ArchiveMailWidget::load()
KSharedConfig::Ptr config = KSharedConfig::openConfig();
const QStringList collectionList = config->groupList().filter(QRegExp(archiveMailCollectionPattern()));
const int numberOfCollection = collectionList.count();
- for (int i = 0 ; i < numberOfCollection; ++i) {
+ for (int i = 0; i < numberOfCollection; ++i) {
KConfigGroup group = config->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(group);
if (info->isValid()) {
diff --git a/agents/followupreminderagent/followupreminderinfowidget.cpp b/agents/followupreminderagent/followupreminderinfowidget.cpp
index 464dc47..c485ed1 100644
--- a/agents/followupreminderagent/followupreminderinfowidget.cpp
+++ b/agents/followupreminderagent/followupreminderinfowidget.cpp
@@ -111,7 +111,7 @@ void FollowUpReminderInfoWidget::load()
KSharedConfig::Ptr config = KSharedConfig::openConfig();
const QStringList filterGroups = config->groupList().filter(QRegExp(followUpItemPattern()));
const int numberOfItem = filterGroups.count();
- for (int i = 0 ; i < numberOfItem; ++i) {
+ for (int i = 0; i < numberOfItem; ++i) {
KConfigGroup group = config->group(filterGroups.at(i));
FollowUpReminder::FollowUpReminderInfo *info = new FollowUpReminder::FollowUpReminderInfo(group);
diff --git a/agents/followupreminderagent/followupremindermanager.cpp b/agents/followupreminderagent/followupremindermanager.cpp
index 1f8c223..9758e04 100644
--- a/agents/followupreminderagent/followupremindermanager.cpp
+++ b/agents/followupreminderagent/followupremindermanager.cpp
@@ -54,7 +54,7 @@ void FollowUpReminderManager::load(bool forceReloadConfig)
const QStringList itemList = mConfig->groupList().filter(QRegExp(QStringLiteral("FollowupReminderItem \\d+")));
const int numberOfItems = itemList.count();
QList<FollowUpReminder::FollowUpReminderInfo *> noAnswerList;
- for (int i = 0 ; i < numberOfItems; ++i) {
+ for (int i = 0; i < numberOfItems; ++i) {
KConfigGroup group = mConfig->group(itemList.at(i));
diff --git a/agents/mailfilteragent/filtermanager.cpp b/agents/mailfilteragent/filtermanager.cpp
index 1fdba24..5b0e02b 100644
--- a/agents/mailfilteragent/filtermanager.cpp
+++ b/agents/mailfilteragent/filtermanager.cpp
@@ -353,7 +353,7 @@ void FilterManager::mailCollectionRemoved(const Akonadi::Collection &collection)
{
QList<MailCommon::MailFilter *>::const_iterator end(d->mFilters.constEnd());
for (QList<MailCommon::MailFilter *>::const_iterator it = d->mFilters.constBegin();
- it != end ; ++it) {
+ it != end; ++it) {
(*it)->folderRemoved(collection, Akonadi::Collection());
}
}
@@ -496,7 +496,7 @@ bool FilterManager::process(const QList< MailFilter * > &mailFilters, const Akon
const bool applyOnOutbound = ((set & Outbound) || (set & BeforeOutbound));
for (QList<MailCommon::MailFilter *>::const_iterator it = mailFilters.constBegin();
- !stopIt && it != end ; ++it) {
+ !stopIt && it != end; ++it) {
if ((*it)->isEnabled()) {
const bool inboundOk = ((set & Inbound) && (*it)->applyOnInbound());
@@ -561,7 +561,7 @@ MailCommon::SearchRule::RequiredPart FilterManager::requiredPart(const QString &
if (id.isEmpty()) {
return d->mRequiredPartsBasedOnAll;
}
- return d->mRequiredParts.contains(id) ? d->mRequiredParts[id] : SearchRule::Envelope ;
+ return d->mRequiredParts.contains(id) ? d->mRequiredParts[id] : SearchRule::Envelope;
}
#ifndef NDEBUG
diff --git a/agents/notesagent/notesmanager.cpp b/agents/notesagent/notesmanager.cpp
index 4e9ef76..0cebfe5 100644
--- a/agents/notesagent/notesmanager.cpp
+++ b/agents/notesagent/notesmanager.cpp
@@ -190,7 +190,7 @@ void NotesManager::updateNetworkListener()
if (NoteShared::NoteSharedGlobalConfig::receiveNotes()) {
// create the socket and start listening for connections
- mListener = KSocketFactory::listen(QStringLiteral("knotes") , QHostAddress::Any,
+ mListener = KSocketFactory::listen(QStringLiteral("knotes"), QHostAddress::Any,
NoteShared::NoteSharedGlobalConfig::port());
connect(mListener, &QTcpServer::newConnection, this, &NotesManager::slotAcceptConnection);
}
diff --git a/agents/sendlateragent/sendlaterconfigurewidget.cpp b/agents/sendlateragent/sendlaterconfigurewidget.cpp
index a807ca0..2f32d87 100644
--- a/agents/sendlateragent/sendlaterconfigurewidget.cpp
+++ b/agents/sendlateragent/sendlaterconfigurewidget.cpp
@@ -152,7 +152,7 @@ void SendLaterWidget::load()
KSharedConfig::Ptr config = KSharedConfig::openConfig();
const QStringList filterGroups = config->groupList().filter(QRegExp(sendLaterItemPattern()));
const int numberOfItem = filterGroups.count();
- for (int i = 0 ; i < numberOfItem; ++i) {
+ for (int i = 0; i < numberOfItem; ++i) {
KConfigGroup group = config->group(filterGroups.at(i));
SendLater::SendLaterInfo *info = new SendLater::SendLaterInfo(group);
if (info->isValid()) {
diff --git a/agents/sendlateragent/sendlatermanager.cpp b/agents/sendlateragent/sendlatermanager.cpp
index 8231238..c20804d 100644
--- a/agents/sendlateragent/sendlatermanager.cpp
+++ b/agents/sendlateragent/sendlatermanager.cpp
@@ -66,7 +66,7 @@ void SendLaterManager::load(bool forcereload)
const QStringList itemList = mConfig->groupList().filter(QRegExp(QStringLiteral("SendLaterItem \\d+")));
const int numberOfItems = itemList.count();
- for (int i = 0 ; i < numberOfItems; ++i) {
+ for (int i = 0; i < numberOfItems; ++i) {
KConfigGroup group = mConfig->group(itemList.at(i));
SendLater::SendLaterInfo *info = new SendLater::SendLaterInfo(group);
if (info->isValid()) {
diff --git a/akonadiconsole/browserwidget.cpp b/akonadiconsole/browserwidget.cpp
index 896bef5..8e08fbd 100644
--- a/akonadiconsole/browserwidget.cpp
+++ b/akonadiconsole/browserwidget.cpp
@@ -465,7 +465,7 @@ void BrowserWidget::dumpToXml()
if (!root.isValid()) {
return;
}
- const QString fileName = QFileDialog::getSaveFileName(this, QStringLiteral("Select XML file") , QString(), QStringLiteral("*.xml"));
+ const QString fileName = QFileDialog::getSaveFileName(this, QStringLiteral("Select XML file"), QString(), QStringLiteral("*.xml"));
if (fileName.isEmpty()) {
return;
}
diff --git a/akonadiconsole/monitorsmodel.h b/akonadiconsole/monitorsmodel.h
index ca6bd4f..dc6f675 100644
--- a/akonadiconsole/monitorsmodel.h
+++ b/akonadiconsole/monitorsmodel.h
@@ -34,7 +34,7 @@ class MonitorsModel : public QAbstractItemModel
public:
enum Column {
IdentifierColumn = 0,
- IsAllMonitoredColumn ,
+ IsAllMonitoredColumn,
MonitoredCollectionsColumn,
MonitoredItemsColumn,
MonitoredResourcesColumn,
diff --git a/akregator/configuration/akregator_config_appearance.cpp b/akregator/configuration/akregator_config_appearance.cpp
index 2f7903a..7dfd297 100644
--- a/akregator/configuration/akregator_config_appearance.cpp
+++ b/akregator/configuration/akregator_config_appearance.cpp
@@ -47,11 +47,11 @@ KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, cons
connect(m_ui.kcfg_UseCustomColors, &QAbstractButton::toggled, m_ui.lbl_newArticles, &QWidget::setEnabled);
connect(m_ui.kcfg_UseCustomColors, &QAbstractButton::toggled, m_ui.lbl_unreadArticles, &QWidget::setEnabled);
- connect(m_ui.slider_minimumFontSize, &QAbstractSlider::valueChanged, m_ui.kcfg_MinimumFontSize , &QSpinBox::setValue);
- connect(m_ui.slider_mediumFontSize, &QAbstractSlider::valueChanged, m_ui.kcfg_MediumFontSize , &QSpinBox::setValue);
+ connect(m_ui.slider_minimumFontSize, &QAbstractSlider::valueChanged, m_ui.kcfg_MinimumFontSize, &QSpinBox::setValue);
+ connect(m_ui.slider_mediumFontSize, &QAbstractSlider::valueChanged, m_ui.kcfg_MediumFontSize, &QSpinBox::setValue);
- connect(m_ui.slider_minimumFontSize, &QAbstractSlider::sliderMoved, m_ui.kcfg_MinimumFontSize , &QSpinBox::setValue);
- connect(m_ui.slider_mediumFontSize, &QAbstractSlider::sliderMoved, m_ui.kcfg_MediumFontSize , &QSpinBox::setValue);
+ connect(m_ui.slider_minimumFontSize, &QAbstractSlider::sliderMoved, m_ui.kcfg_MinimumFontSize, &QSpinBox::setValue);
+ connect(m_ui.slider_mediumFontSize, &QAbstractSlider::sliderMoved, m_ui.kcfg_MediumFontSize, &QSpinBox::setValue);
connect(m_ui.kcfg_MinimumFontSize, SIGNAL(valueChanged(int)), m_ui.slider_minimumFontSize, SLOT(setValue(int)));
connect(m_ui.kcfg_MediumFontSize, SIGNAL(valueChanged(int)), m_ui.slider_mediumFontSize, SLOT(setValue(int)));
diff --git a/akregator/export/akregatorstorageexporter.cpp b/akregator/export/akregatorstorageexporter.cpp
index a70f46c..d2b4d1d 100644
--- a/akregator/export/akregatorstorageexporter.cpp
+++ b/akregator/export/akregatorstorageexporter.cpp
@@ -88,7 +88,7 @@ public:
}
}
- void write(const QVariant &value , QXmlStreamWriter &writer, TextMode mode = PlainText) const
+ void write(const QVariant &value, QXmlStreamWriter &writer, TextMode mode = PlainText) const
{
const QVariant qv(value);
Q_ASSERT(qv.canConvert(QVariant::String));
diff --git a/akregator/plugins/mk4storage/metakit/src/column.cpp b/akregator/plugins/mk4storage/metakit/src/column.cpp
index 96d5b7c..41ce71e 100644
--- a/akregator/plugins/mk4storage/metakit/src/column.cpp
+++ b/akregator/plugins/mk4storage/metakit/src/column.cpp
@@ -51,7 +51,7 @@ void c4_Column::Validate()const
d4_assert(0 <= _slack && _slack < kSegMax);
if (_segments.GetSize() == 0) {
- return ;
+ return;
}
// ok, not initialized
@@ -1353,7 +1353,7 @@ void c4_ColOfInts::Set(int index_, const c4_Bytes &buf_)
d4_assert(buf_.Size() == _dataWidth);
if ((this->*_setter)(index_, buf_.Contents())) {
- return ;
+ return;
}
d4_assert(buf_.Size() == sizeof(t4_i32));
@@ -1479,7 +1479,7 @@ void c4_ColOfInts::ResizeData(int index_, int count_, bool clear_)
} else {
RemoveData(index_ * w, - count_ * w);
}
- return ;
+ return;
}
d4_assert(_currWidth == 1 || _currWidth == 2 || _currWidth == 4);
diff --git a/akregator/plugins/mk4storage/metakit/src/fileio.cpp b/akregator/plugins/mk4storage/metakit/src/fileio.cpp
index f0c1430..d80ddd0 100644
--- a/akregator/plugins/mk4storage/metakit/src/fileio.cpp
+++ b/akregator/plugins/mk4storage/metakit/src/fileio.cpp
@@ -97,7 +97,7 @@ static int(*my_munmap)(char *, t4_u32) = fake_munmap;
static void InitializeIO()
{
if (sfwRefCount++) {
- return ;
+ return;
}
// race condition, infinitesimal risk
@@ -115,7 +115,7 @@ static void InitializeIO()
}
}
if (!systemFramework || !CFBundleLoadExecutable(systemFramework)) {
- return ;
+ return;
}
#define F(x) CFBundleGetFunctionPointerForName(systemFramework, CFSTR(#x))
my_fopen = (FILE * (*)(const char *, const char *))F(fopen);
@@ -138,7 +138,7 @@ static void InitializeIO()
static void FinalizeIO()
{
if (--sfwRefCount) {
- return ;
+ return;
}
// race condition, infinitesimal risk
@@ -447,7 +447,7 @@ void c4_FileStrategy::DataCommit(t4_i32 limit_)
_failure = ferror(_file);
d4_assert(_failure != 0);
d4_assert(true); // always force an assertion failure in debug mode
- return ;
+ return;
}
if (limit_ > 0) {
diff --git a/akregator/plugins/mk4storage/metakit/src/format.cpp b/akregator/plugins/mk4storage/metakit/src/format.cpp
index 52f99fe..097bcb7 100644
--- a/akregator/plugins/mk4storage/metakit/src/format.cpp
+++ b/akregator/plugins/mk4storage/metakit/src/format.cpp
@@ -658,7 +658,7 @@ void c4_FormatB::SetOne(int index_, const c4_Bytes &xbuf_, bool ignoreMemos_)
} else if (n < 0) {
cp->Shrink(start, - n);
} else if (m == 0) {
- return ;
+ return;
}
// no size change and no contents
@@ -922,7 +922,7 @@ void c4_FormatS::Set(int index_, const c4_Bytes &buf_)
d4_assert(buf_.Contents()[m] == 0);
if (m == 0) {
SetOne(index_, c4_Bytes()); // don't store data for empty strings
- return ;
+ return;
}
}
@@ -946,7 +946,7 @@ void c4_FormatS::Insert(int index_, const c4_Bytes &buf_, int count_)
d4_assert(buf_.Contents()[m] == 0);
if (m == 0) {
c4_FormatB::Insert(index_, c4_Bytes(), count_);
- return ;
+ return;
}
}
@@ -1141,7 +1141,7 @@ void c4_FormatV::Replace(int index_, c4_HandlerSeq *seq_)
c4_HandlerSeq *&curr = (c4_HandlerSeq *&)_subSeqs.ElementAt(index_);
if (seq_ == curr) {
- return ;
+ return;
}
if (curr != 0) {
diff --git a/akregator/plugins/mk4storage/metakit/src/persist.cpp b/akregator/plugins/mk4storage/metakit/src/persist.cpp
index 96f8a09..5ad11c8 100644
--- a/akregator/plugins/mk4storage/metakit/src/persist.cpp
+++ b/akregator/plugins/mk4storage/metakit/src/persist.cpp
@@ -298,7 +298,7 @@ void c4_Allocator::InsertPair(int i_, t4_i32 from_, t4_i32 to_)
//!d4_assert(to_ < GetAt(i_));
if (to_ >= (t4_i32)GetAt(i_)) {
- return ;
+ return;
}
// ignore 2nd allocation of used area
@@ -624,7 +624,7 @@ void c4_SaveContext::Write(const void *buf_, int len_)
void c4_SaveContext::StoreValue(t4_i32 v_)
{
if (_walk == 0) {
- return ;
+ return;
}
if (_curr + 10 >= _limit) {
@@ -642,7 +642,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
const t4_i32 size = _strategy.FileSize();
if (_strategy._failure != 0) {
- return ;
+ return;
}
const t4_i32 end = _fullScan ? 0 : size - _strategy._baseOffset;
@@ -690,7 +690,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
if (limit < 0) {
// 2006-01-12 #2: catch file size exceeding 2 Gb
_strategy._failure = - 1; // unusual non-zero value flags this case
- return ;
+ return;
}
bool changed = _fullScan || tempWalk != rootWalk_;
@@ -708,7 +708,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
}
if (!changed) {
- return ;
+ return;
}
//AllocDump("b1", false);
@@ -717,7 +717,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
if (_differ != 0) {
int n = _differ->NewDiffID();
_differ->CreateDiff(n, walk);
- return ;
+ return;
}
d4_assert(_mode != 0 || _fullScan);
@@ -741,7 +741,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
_strategy.DataWrite(limit, &mark1, sizeof mark1);
_strategy.DataCommit(0);
if (_strategy._failure != 0) {
- return ;
+ return;
}
}
@@ -802,7 +802,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
_strategy.DataWrite(_strategy.FileSize() - _strategy._baseOffset, &mark2,
sizeof mark2);
- return ;
+ return;
}
if (inPlace) {
@@ -815,7 +815,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq &root_, c4_Allocator **spacePtr_,
}
if (walk.Position() == 0 || _strategy._failure != 0) {
- return ;
+ return;
}
_strategy.DataCommit(0);
@@ -1095,7 +1095,7 @@ void c4_Persist::LoadAll()
{
c4_Column walk(this);
if (!LoadIt(walk)) {
- return ;
+ return;
}
if (_strategy._rootLen < 0) {
diff --git a/akregator/plugins/mk4storage/metakit/src/string.cpp b/akregator/plugins/mk4storage/metakit/src/string.cpp
index 7d5cde6..df0e67a 100644
--- a/akregator/plugins/mk4storage/metakit/src/string.cpp
+++ b/akregator/plugins/mk4storage/metakit/src/string.cpp
@@ -202,7 +202,7 @@ void c4_String::Init(const void *p, int n)
}
_value = nullVec; // use this buffer as our empty string
- return ; // done... that was quick, wasn't it?
+ return; // done... that was quick, wasn't it?
}
_value = new unsigned char[n + 3];
diff --git a/akregator/plugins/mk4storage/storagemk4impl.cpp b/akregator/plugins/mk4storage/storagemk4impl.cpp
index b0c3c27..3566f22 100644
--- a/akregator/plugins/mk4storage/storagemk4impl.cpp
+++ b/akregator/plugins/mk4storage/storagemk4impl.cpp
@@ -154,7 +154,7 @@ bool Akregator::Backend::StorageMK4Impl::autoCommit() const
bool Akregator::Backend::StorageMK4Impl::close()
{
QMap<QString, FeedStorageMK4Impl *>::Iterator it;
- QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end()) ;
+ QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end());
for (it = d->feeds.begin(); it != end; ++it) {
it.value()->close();
delete it.value();
@@ -176,7 +176,7 @@ bool Akregator::Backend::StorageMK4Impl::close()
bool Akregator::Backend::StorageMK4Impl::commit()
{
QMap<QString, FeedStorageMK4Impl *>::Iterator it;
- QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end()) ;
+ QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end());
for (it = d->feeds.begin(); it != end; ++it) {
it.value()->commit();
}
@@ -192,7 +192,7 @@ bool Akregator::Backend::StorageMK4Impl::commit()
bool Akregator::Backend::StorageMK4Impl::rollback()
{
QMap<QString, FeedStorageMK4Impl *>::Iterator it;
- QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end()) ;
+ QMap<QString, FeedStorageMK4Impl *>::Iterator end(d->feeds.end());
for (it = d->feeds.begin(); it != end; ++it) {
it.value()->rollback();
}
@@ -306,7 +306,7 @@ QStringList Akregator::Backend::StorageMK4Impl::feeds() const
void Akregator::Backend::StorageMK4Impl::add(Storage *source)
{
QStringList feeds = source->feeds();
- QStringList::ConstIterator end(feeds.constEnd()) ;
+ QStringList::ConstIterator end(feeds.constEnd());
for (QStringList::ConstIterator it = feeds.constBegin(); it != end; ++it) {
FeedStorage *fa = archiveFor(*it);
@@ -321,7 +321,7 @@ void Akregator::Backend::StorageMK4Impl::clear()
for (int i = 0; i < size; ++i) {
feeds += QString::fromLatin1(d->purl(d->archiveView.GetAt(i)));
}
- QStringList::ConstIterator end(feeds.constEnd()) ;
+ QStringList::ConstIterator end(feeds.constEnd());
for (QStringList::ConstIterator it = feeds.constBegin(); it != end; ++it) {
FeedStorage *fa = archiveFor(*it);
diff --git a/akregator/src/articleformatter.cpp b/akregator/src/articleformatter.cpp
index 3344bac..8ac380e 100644
--- a/akregator/src/articleformatter.cpp
+++ b/akregator/src/articleformatter.cpp
@@ -94,7 +94,7 @@ void ArticleFormatter::setPaintDevice(QPaintDevice *device)
int ArticleFormatter::pointsToPixel(int pointSize) const
{
- return (pointSize * d->device->logicalDpiY() + 36) / 72 ;
+ return (pointSize * d->device->logicalDpiY() + 36) / 72;
}
class DefaultNormalViewFormatter::SummaryVisitor : public TreeNodeVisitor
diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp
index 8b9e2c5..5ee81ba 100644
--- a/akregator/src/articleviewer.cpp
+++ b/akregator/src/articleviewer.cpp
@@ -147,7 +147,7 @@ KParts::ReadOnlyPart *ArticleViewer::part() const
int ArticleViewer::pointsToPixel(int pointSize) const
{
- return (pointSize * m_part->view()->logicalDpiY() + 36) / 72 ;
+ return (pointSize * m_part->view()->logicalDpiY() + 36) / 72;
}
void ArticleViewer::slotOpenUrlRequestDelayed(const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs)
diff --git a/akregator/src/feed.cpp b/akregator/src/feed.cpp
index 7e6ea05..c5e6048 100644
--- a/akregator/src/feed.cpp
+++ b/akregator/src/feed.cpp
@@ -793,7 +793,7 @@ void Akregator::Feed::setImage(const QPixmap &p)
const QString filename = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/') + QString(QLatin1String("akregator/Media/") + Utils::fileNameForUrl(d->xmlUrl) + QLatin1String(".png"));
QFileInfo fileInfo(filename);
QDir().mkpath(fileInfo.absolutePath());
- d->imagePixmap.save(filename , "PNG");
+ d->imagePixmap.save(filename, "PNG");
nodeModified();
}
diff --git a/akregator/src/notificationmanager.cpp b/akregator/src/notificationmanager.cpp
index 85f2757..f3a06e1 100644
--- a/akregator/src/notificationmanager.cpp
+++ b/akregator/src/notificationmanager.cpp
@@ -70,13 +70,13 @@ void NotificationManager::slotNotifyArticle(const Article &article)
void NotificationManager::slotNotifyFeeds(const QStringList &feeds)
{
if (feeds.count() == 1) {
- KNotification::event(QStringLiteral("FeedAdded"), i18n("Feed added:\n %1", feeds[0]), QPixmap() , m_widget, KNotification::CloseOnTimeout, m_componantName);
+ KNotification::event(QStringLiteral("FeedAdded"), i18n("Feed added:\n %1", feeds[0]), QPixmap(), m_widget, KNotification::CloseOnTimeout, m_componantName);
} else if (feeds.count() > 1) {
QString message;
for (QStringList::ConstIterator it = feeds.constBegin(); it != feeds.constEnd(); ++it) {
message += *it + QLatin1Char('\n');
}
- KNotification::event(QStringLiteral("FeedAdded"), i18n("Feeds added:\n %1", message), QPixmap() , m_widget, KNotification::CloseOnTimeout, m_componantName);
+ KNotification::event(QStringLiteral("FeedAdded"), i18n("Feeds added:\n %1", message), QPixmap(), m_widget, KNotification::CloseOnTimeout, m_componantName);
}
}
@@ -93,7 +93,7 @@ void NotificationManager::doNotify()
message += i.title() + QLatin1String("<br>");
}
message += QLatin1String("</body></html>");
- KNotification::event(QStringLiteral("NewArticles"), message, QPixmap() , m_widget, KNotification::CloseOnTimeout, m_componantName);
+ KNotification::event(QStringLiteral("NewArticles"), message, QPixmap(), m_widget, KNotification::CloseOnTimeout, m_componantName);
m_articles.clear();
m_running = false;
diff --git a/akregator/src/subscriptionlistmodel.cpp b/akregator/src/subscriptionlistmodel.cpp
index 240b827..9de0e1f 100644
--- a/akregator/src/subscriptionlistmodel.cpp
+++ b/akregator/src/subscriptionlistmodel.cpp
@@ -241,7 +241,7 @@ QModelIndex Akregator::SubscriptionListModel::parent(const QModelIndex &index) c
QModelIndex Akregator::SubscriptionListModel::index(int row, int column, const QModelIndex &parent) const
{
if (!parent.isValid()) {
- return (row == 0 && m_feedList) ? createIndex(row, column , m_feedList->allFeedsFolder()->id()) : QModelIndex();
+ return (row == 0 && m_feedList) ? createIndex(row, column, m_feedList->allFeedsFolder()->id()) : QModelIndex();
}
const Akregator::TreeNode *const parentNode = nodeForIndex(parent, m_feedList.data());
diff --git a/akregator/src/tabwidget.cpp b/akregator/src/tabwidget.cpp
index 0bb57ee..730d1fb 100644
--- a/akregator/src/tabwidget.cpp
+++ b/akregator/src/tabwidget.cpp
@@ -82,7 +82,7 @@ public:
}
uint tabBarWidthForMaxChars(int maxLength);
- void setTitle(const QString &title , QWidget *sender);
+ void setTitle(const QString &title, QWidget *sender);
void updateTabBarVisibility();
Frame *currentFrame();
};
diff --git a/blogilo/src/addeditblog.cpp b/blogilo/src/addeditblog.cpp
index 9514b44..e96c4f3 100644
--- a/blogilo/src/addeditblog.cpp
+++ b/blogilo/src/addeditblog.cpp
@@ -187,7 +187,7 @@ void AddEditBlog::autoConfigure()
return;
}
qCDebug(BLOGILO_LOG) << "Trying to guess API type by Homepage contents";
- KIO::StoredTransferJob *httpGetJob = KIO::storedGet(d->ui.txtUrl->text() , KIO::NoReload, KIO::HideProgressInfo);
+ KIO::StoredTransferJob *httpGetJob = KIO::storedGet(d->ui.txtUrl->text(), KIO::NoReload, KIO::HideProgressInfo);
connect(httpGetJob, &KIO::StoredTransferJob::result, this, &AddEditBlog::gotHtml);
d->mFetchAPITimer = new QTimer(this);
d->mFetchAPITimer->setSingleShot(true);
@@ -365,7 +365,7 @@ void AddEditBlog::handleFetchError(KBlog::Blog::ErrorType type, const QString &e
KMessageBox::detailedError(this, i18n("Fetching BlogID Failed.\nPlease check your Internet connection."), errorMsg);
}
-void AddEditBlog::fetchedBlogId(const QList< QMap < QString , QString > > &list)
+void AddEditBlog::fetchedBlogId(const QList< QMap < QString, QString > > &list)
{
if (d->mFetchBlogIdTimer) {
d->mFetchBlogIdTimer->deleteLater();
diff --git a/blogilo/src/backend.cpp b/blogilo/src/backend.cpp
index 6dc9d6c..28a73df 100644
--- a/blogilo/src/backend.cpp
+++ b/blogilo/src/backend.cpp
@@ -100,7 +100,7 @@ void Backend::getCategoryListFromServer()
}
}
-void Backend::categoriesListed(const QList< QMap < QString , QString > > &categories)
+void Backend::categoriesListed(const QList< QMap < QString, QString > > &categories)
{
qCDebug(BLOGILO_LOG) << "Blog Id: " << d->bBlog->id();
DBMan::self()->clearCategories(d->bBlog->id());
@@ -196,7 +196,7 @@ void Backend::uploadMedia(BilboMedia *media)
case BilboBlog::METAWEBLOG_API:
case BilboBlog::MOVABLETYPE_API:
case BilboBlog::WORDPRESSBUGGY_API:
- KBlog::BlogMedia *m = new KBlog::BlogMedia() ;
+ KBlog::BlogMedia *m = new KBlog::BlogMedia();
KBlog::MetaWeblog *MWBlog = qobject_cast<KBlog::MetaWeblog *>(d->kBlog);
m->setMimetype(media->mimeType());
diff --git a/blogilo/src/dbman.cpp b/blogilo/src/dbman.cpp
index a719d0c..acee9b4 100644
--- a/blogilo/src/dbman.cpp
+++ b/blogilo/src/dbman.cpp
@@ -1037,7 +1037,7 @@ QList< BilboBlog *> DBMan::listBlogs()
tmp->setLocalDirectory(q.value(8).toString());
if (d->useWallet) {
QString buffer;
- if (d->mWallet && d->mWallet->readPassword(tmp->url().url() + QLatin1Char('_') + tmp->username() , buffer)
+ if (d->mWallet && d->mWallet->readPassword(tmp->url().url() + QLatin1Char('_') + tmp->username(), buffer)
== 0 && !buffer.isEmpty()) {
tmp->setPassword(buffer);
qCDebug(BLOGILO_LOG) << "Password loaded from kde wallet.";
diff --git a/blogilo/src/mainwindow.cpp b/blogilo/src/mainwindow.cpp
index fcdea10..e126c2d 100644
--- a/blogilo/src/mainwindow.cpp
+++ b/blogilo/src/mainwindow.cpp
@@ -472,7 +472,7 @@ void MainWindow::slotActivePostChanged(int index)
}
toolbox->setFieldsValue(activePost->currentPost());
} else {
- qCCritical(BLOGILO_LOG) << "ActivePost is NULL! tabPosts Current index is: " << tabPosts->currentIndex() ;
+ qCCritical(BLOGILO_LOG) << "ActivePost is NULL! tabPosts Current index is: " << tabPosts->currentIndex();
}
previousActivePostIndex = index;
}
diff --git a/blogilo/src/toolbox.cpp b/blogilo/src/toolbox.cpp
index 6d49347..97fa93e 100644
--- a/blogilo/src/toolbox.cpp
+++ b/blogilo/src/toolbox.cpp
@@ -369,7 +369,7 @@ void Toolbox::setSelectedCategories(const QStringList &list)
QStringList Toolbox::currentTags()
{
QStringList t = txtCatTags->text().split(QRegExp(QStringLiteral(",|،")), QString::SkipEmptyParts);
- for (int i = 0; i < t.count() ; ++i) {
+ for (int i = 0; i < t.count(); ++i) {
t[i] = t[i].trimmed();
}
return t;
@@ -479,7 +479,7 @@ void Toolbox::clearEntries()
if (DBMan::self()->clearPosts(d->mCurrentBlogId)) {
lstEntriesList->clear();
} else {
- KMessageBox::detailedSorry(this, i18n("Cannot clear the list of entries.") , DBMan::self()->lastErrorText());
+ KMessageBox::detailedSorry(this, i18n("Cannot clear the list of entries."), DBMan::self()->lastErrorText());
}
}
diff --git a/blogilo/src/uploadmediadialog.cpp b/blogilo/src/uploadmediadialog.cpp
index d272039..6238b29 100644
--- a/blogilo/src/uploadmediadialog.cpp
+++ b/blogilo/src/uploadmediadialog.cpp
@@ -150,7 +150,7 @@ void UploadMediaDialog::slotOkClicked()
return;
}
QUrl dest;
- dest.setUrl(ui.kcfg_FtpPath->text() , QUrl::TolerantMode);
+ dest.setUrl(ui.kcfg_FtpPath->text(), QUrl::TolerantMode);
if (dest.isValid()) {
if (dest.scheme() == QLatin1String("ftp") || dest.scheme() == QLatin1String("sftp")) {
QUrl src(ui.kcfg_urlLineEdit->text());
diff --git a/calendarsupport/src/freebusymodel/freebusyitemmodel.cpp b/calendarsupport/src/freebusymodel/freebusyitemmodel.cpp
index 38e9077..83f5807 100644
--- a/calendarsupport/src/freebusymodel/freebusyitemmodel.cpp
+++ b/calendarsupport/src/freebusymodel/freebusyitemmodel.cpp
@@ -262,7 +262,7 @@ void FreeBusyItemModel::setFreeBusyPeriods(const QModelIndex &parent,
QModelIndex last = index(childCount - 1, 0, parent);
if (childCount > 0 && fb_count < childCount) {
- beginRemoveRows(parent, fb_count - 1 < 0 ? 0 : fb_count - 1 , childCount - 1);
+ beginRemoveRows(parent, fb_count - 1 < 0 ? 0 : fb_count - 1, childCount - 1);
for (int i = childCount - 1; i > fb_count; --i) {
delete parentData->removeChild(i);
}
diff --git a/composereditor-ng/src/widgets/findreplacebar.cpp b/composereditor-ng/src/widgets/findreplacebar.cpp
index 38cc023..0f19f83 100644
--- a/composereditor-ng/src/widgets/findreplacebar.cpp
+++ b/composereditor-ng/src/widgets/findreplacebar.cpp
@@ -199,7 +199,7 @@ void FindReplaceBarPrivate::messageInfo(bool backward, bool isAutoSearch, bool f
{
if (!found && !isAutoSearch) {
if (backward) {
- KMessageBox::information(q, i18n("Beginning of message reached.\nPhrase '%1' could not be found." , lastSearchStr));
+ KMessageBox::information(q, i18n("Beginning of message reached.\nPhrase '%1' could not be found.", lastSearchStr));
} else {
KMessageBox::information(q, i18n("End of message reached.\nPhrase '%1' could not be found.", lastSearchStr));
}
diff --git a/console/konsolekalendar/konsolekalendar.cpp b/console/konsolekalendar/konsolekalendar.cpp
index b72fb57..efcd305 100644
--- a/console/konsolekalendar/konsolekalendar.cpp
+++ b/console/konsolekalendar/konsolekalendar.cpp
@@ -329,7 +329,7 @@ bool KonsoleKalendar::showInstance()
// htmlSettings.setTaskDueDate( true );
htmlSettings.setDateStart(QDateTime(firstdate));
- htmlSettings.setDateEnd(QDateTime(lastdate)) ;
+ htmlSettings.setDateEnd(QDateTime(lastdate));
KCalUtils::HtmlExport *exp = new KCalUtils::HtmlExport(calendar.data(), &htmlSettings);
status = exp->save(&ts);
diff --git a/eventviews/src/agenda/agenda.cpp b/eventviews/src/agenda/agenda.cpp
index c6746b4..1830908 100644
--- a/eventviews/src/agenda/agenda.cpp
+++ b/eventviews/src/agenda/agenda.cpp
@@ -818,7 +818,7 @@ void Agenda::startSelectAction(const QPoint &viewportPos)
d->mSelectionStartPoint = viewportPos;
d->mHasSelection = true;
- QPoint pos = viewportPos ;
+ QPoint pos = viewportPos;
QPoint gpos = contentsToGrid(pos);
// Store new selection
@@ -1050,7 +1050,7 @@ void Agenda::performItemAction(const QPoint &pos)
} else {
newFirst = insertItem(moveItem->incidence(), moveItem->occurrenceDateTime(),
moveItem->cellXLeft() - 1, rows() + newY, rows() - 1,
- moveItem->itemPos(), moveItem->itemCount(), false) ;
+ moveItem->itemPos(), moveItem->itemCount(), false);
}
if (newFirst) {
newFirst->show();
@@ -1095,13 +1095,13 @@ void Agenda::performItemAction(const QPoint &pos)
d->mItems.append(newLast);
moveItem->resize(int(d->mGridSpacingX * newLast->cellWidth()),
int(d->mGridSpacingY * newLast->cellHeight()));
- QPoint cpos = gridToContents(QPoint(newLast->cellXLeft(), newLast->cellYTop())) ;
+ QPoint cpos = gridToContents(QPoint(newLast->cellXLeft(), newLast->cellYTop()));
newLast->setParent(this);
newLast->move(cpos.x(), cpos.y());
} else {
newLast = insertItem(moveItem->incidence(), moveItem->occurrenceDateTime(),
moveItem->cellXLeft() + 1, 0, newY - rows() - 1,
- moveItem->itemPos(), moveItem->itemCount(), false) ;
+ moveItem->itemPos(), moveItem->itemCount(), false);
}
moveItem->appendMoveItem(newLast);
newLast->show();
@@ -1798,7 +1798,7 @@ AgendaItem::QPtr Agenda::insertAllDayItem(const KCalCore::Incidence::Ptr &incide
agendaItem->installEventFilter(this);
agendaItem->setResourceColor(d->mCalendar->resourceColor(incidence));
- agendaItem->move(int(XBegin * d->mGridSpacingX), 0) ;
+ agendaItem->move(int(XBegin * d->mGridSpacingX), 0);
d->mItems.append(agendaItem);
placeSubCells(agendaItem);
diff --git a/eventviews/src/agenda/agendaitem.cpp b/eventviews/src/agenda/agendaitem.cpp
index ab794bd..631447a 100644
--- a/eventviews/src/agenda/agendaitem.cpp
+++ b/eventviews/src/agenda/agendaitem.cpp
@@ -819,7 +819,7 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
const int fmargin = 0; // frame margin
const int ft = 1; // frame thickness for layout, see drawRoundedRect(),
// keep multiple of 2
- const int margin = 5 + ft + fmargin ; // frame + space between frame and content
+ const int margin = 5 + ft + fmargin; // frame + space between frame and content
// General idea is to always show the icons (even in the all-day events).
// This creates a consistent feeling for the user when the view mode
@@ -827,13 +827,13 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
// Also look at #17984
if (!alarmPxmp) {
- alarmPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("task-reminder")).pixmap(16,16));
- recurPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("appointment-recurring")).pixmap(16,16));
- readonlyPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("object-locked")).pixmap(16,16));
- replyPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("mail-reply-sender")).pixmap(16,16));
- groupPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-attending")).pixmap(16,16));
- groupPxmpTent = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-attending-tentative")).pixmap(16,16));
- organizerPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-organizer")).pixmap(16,16));
+ alarmPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("task-reminder")).pixmap(16, 16));
+ recurPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("appointment-recurring")).pixmap(16, 16));
+ readonlyPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("object-locked")).pixmap(16, 16));
+ replyPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("mail-reply-sender")).pixmap(16, 16));
+ groupPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-attending")).pixmap(16, 16));
+ groupPxmpTent = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-attending-tentative")).pixmap(16, 16));
+ organizerPxmp = new QPixmap(QIcon::fromTheme(QStringLiteral("meeting-organizer")).pixmap(16, 16));
}
QColor bgColor;
@@ -932,7 +932,7 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
QString longH;
if (!isMultiItem()) {
shortH = QLocale::system().toString(mIncidence->dateTime(KCalCore::Incidence::RoleDisplayStart).
- toTimeSpec(mEventView->preferences()->timeSpec()).time(), QLocale::ShortFormat);
+ toTimeSpec(mEventView->preferences()->timeSpec()).time(), QLocale::ShortFormat);
if (CalendarSupport::hasEvent(mIncidence)) {
longH = i18n("%1 - %2",
diff --git a/eventviews/src/agenda/agendaview.cpp b/eventviews/src/agenda/agendaview.cpp
index bad9465..e3ebaef 100644
--- a/eventviews/src/agenda/agendaview.cpp
+++ b/eventviews/src/agenda/agendaview.cpp
@@ -1008,7 +1008,7 @@ void AgendaView::zoomInHorizontally(const QDate &date)
count = 1;
} else {
newBegin = dateToZoom.addDays(-ndays / 2 + 1);
- count = ndays - 1 ;
+ count = ndays - 1;
}
Q_EMIT zoomViewHorizontally(newBegin, count);
}
@@ -1031,7 +1031,7 @@ void AgendaView::zoomOutHorizontally(const QDate &date)
if (!dateToZoom.isValid()) {
newBegin = begin.addDays(-1);
- count = ndays + 3 ;
+ count = ndays + 3;
} else {
newBegin = dateToZoom.addDays(-ndays / 2 - 1);
count = ndays + 3;
@@ -1894,7 +1894,7 @@ bool AgendaView::displayIncidence(const KCalCore::Incidence::Ptr &incidence, bo
if (event && makesDayBusy && event->isMultiDay()) {
const QDate lastVisibleDate = d->mSelectedDates.last();
for (QDate date = event->dtStart().date();
- date <= event->dtEnd().date() && date <= lastVisibleDate ;
+ date <= event->dtEnd().date() && date <= lastVisibleDate;
date = date.addDays(1)) {
KCalCore::Event::List &busyEvents = d->mBusyDays[date];
busyEvents.append(event);
diff --git a/eventviews/src/agenda/alternatelabel.cpp b/eventviews/src/agenda/alternatelabel.cpp
index 80f4aa8..d328d52 100644
--- a/eventviews/src/agenda/alternatelabel.cpp
+++ b/eventviews/src/agenda/alternatelabel.cpp
@@ -33,7 +33,7 @@ AlternateLabel::AlternateLabel(const QString &shortlabel, const QString &longlab
if (mExtensiveText.isEmpty()) {
mExtensiveText = mLongText;
}
- const QFontMetrics& fm = fontMetrics();
+ const QFontMetrics &fm = fontMetrics();
// We use at least averageCharWidth * 2 here to avoid misalignment
// for single char labels.
setMinimumWidth(qMax(fm.averageCharWidth() * 2, fm.width(shortlabel)) + getIndent());
diff --git a/eventviews/src/agenda/alternatelabel.h b/eventviews/src/agenda/alternatelabel.h
index 067cb84..03c30a0 100644
--- a/eventviews/src/agenda/alternatelabel.h
+++ b/eventviews/src/agenda/alternatelabel.h
@@ -23,7 +23,6 @@
#ifndef EVENTVIEWS_ALTERNATELABEL_H
#define EVENTVIEWS_ALTERNATELABEL_H
-
#include <QLabel>
namespace EventViews
diff --git a/eventviews/src/agenda/timelabels.cpp b/eventviews/src/agenda/timelabels.cpp
index 8d128b6..c23bbd8 100644
--- a/eventviews/src/agenda/timelabels.cpp
+++ b/eventviews/src/agenda/timelabels.cpp
@@ -132,7 +132,7 @@ void TimeLabels::updateConfig()
QFont sFont = font();
sFont.setPointSize(sFont.pointSize() / 2);
QFontMetrics fmS(sFont);
- mMiniWidth += fmS.width(test) + frameWidth() * 2 + 4 ;
+ mMiniWidth += fmS.width(test) + frameWidth() * 2 + 4;
/** Can happen if all resources are disabled */
if (!mAgenda) {
@@ -230,7 +230,7 @@ void TimeLabels::paintEvent(QPaintEvent *)
QFont suffixFont = hourFont;
suffixFont.setPointSize(suffixFont.pointSize() / 2);
QFontMetrics fmS(suffixFont);
- const int startW = cw - frameWidth() - 2 ;
+ const int startW = cw - frameWidth() - 2;
const int tw2 = fmS.width(suffix);
const int divTimeHeight = (timeHeight - 1) / 2 - 1;
//testline
@@ -269,7 +269,7 @@ void TimeLabels::paintEvent(QPaintEvent *)
// draw the time label
p.setPen(textColor);
const int timeWidth = fm.width(hour);
- int offset = startW - timeWidth - tw2 - 1 ;
+ int offset = startW - timeWidth - tw2 - 1;
p.setFont(hourFont);
p.drawText(offset, static_cast<int>(y + timeHeight), hour);
p.setFont(suffixFont);
diff --git a/eventviews/src/agenda/timelabels.h b/eventviews/src/agenda/timelabels.h
index d2dad47..3f72893 100644
--- a/eventviews/src/agenda/timelabels.h
+++ b/eventviews/src/agenda/timelabels.h
@@ -28,7 +28,6 @@
#include <QFrame>
-
namespace EventViews
{
diff --git a/eventviews/src/agenda/timelabelszone.cpp b/eventviews/src/agenda/timelabelszone.cpp
index a7eb7b4..fbecb7a 100644
--- a/eventviews/src/agenda/timelabelszone.cpp
+++ b/eventviews/src/agenda/timelabelszone.cpp
@@ -35,7 +35,7 @@ using namespace EventViews;
TimeLabelsZone::TimeLabelsZone(QWidget *parent, const PrefsPtr &preferences, Agenda *agenda)
: QWidget(parent), mAgenda(agenda), mPrefs(preferences),
- mParent(qobject_cast<AgendaView *>(parent))
+ mParent(qobject_cast<AgendaView * >(parent))
{
mTimeLabelsLayout = new QHBoxLayout(this);
mTimeLabelsLayout->setMargin(0);
diff --git a/eventviews/src/agenda/timelabelszone.h b/eventviews/src/agenda/timelabelszone.h
index b6e4acf..0734d57 100644
--- a/eventviews/src/agenda/timelabelszone.h
+++ b/eventviews/src/agenda/timelabelszone.h
@@ -26,7 +26,6 @@
#include <QWidget>
-
class QHBoxLayout;
class QScrollArea;
diff --git a/eventviews/src/eventview.cpp b/eventviews/src/eventview.cpp
index c61b99e..c8faaa2 100644
--- a/eventviews/src/eventview.cpp
+++ b/eventviews/src/eventview.cpp
@@ -549,7 +549,7 @@ void EventView::restoreConfig(const KConfigGroup &configGroup)
// Only show the first column.
KRearrangeColumnsProxyModel *columnFilterProxy = new KRearrangeColumnsProxyModel(this);
- columnFilterProxy->setSourceColumns(QVector<int>()<<Akonadi::ETMCalendar::CollectionTitle);
+ columnFilterProxy->setSourceColumns(QVector<int>() << Akonadi::ETMCalendar::CollectionTitle);
columnFilterProxy->setSourceModel(sortProxy);
// Make the calendar model checkable.
diff --git a/eventviews/src/helper.cpp b/eventviews/src/helper.cpp
index 67c9e0f..36e86b0 100644
--- a/eventviews/src/helper.cpp
+++ b/eventviews/src/helper.cpp
@@ -60,5 +60,5 @@ int EventViews::yearDiff(const QDate &start, const QDate &end)
QPixmap EventViews::cachedSmallIcon(const QString &name)
{
- return QIcon::fromTheme(name).pixmap(16,16);
+ return QIcon::fromTheme(name).pixmap(16, 16);
}
diff --git a/eventviews/src/helper.h b/eventviews/src/helper.h
index dbf51a0..de8b6e0 100644
--- a/eventviews/src/helper.h
+++ b/eventviews/src/helper.h
@@ -56,10 +56,10 @@ QColor getTextColor(const QColor &c);
determine which subresource needs to be used)
*/
QColor resourceColor(const Akonadi::Item &incidence,
- const PrefsPtr &preferences);
+ const PrefsPtr &preferences);
QColor resourceColor(const Akonadi::Collection &collection,
- const PrefsPtr &preferences);
+ const PrefsPtr &preferences);
/**
Returns the number of years between the @p start QDate and the @p end QDate
diff --git a/eventviews/src/list/listview.cpp b/eventviews/src/list/listview.cpp
index 5ac59da..004d548 100644
--- a/eventviews/src/list/listview.cpp
+++ b/eventviews/src/list/listview.cpp
@@ -313,7 +313,7 @@ Akonadi::Item::List ListView::selectedIncidences() const
{
Akonadi::Item::List eventList;
QTreeWidgetItem *item = d->mTreeWidget->selectedItems().isEmpty() ? Q_NULLPTR :
- d->mTreeWidget->selectedItems().first() ;
+ d->mTreeWidget->selectedItems().first();
if (item) {
ListViewItem *i = static_cast<ListViewItem *>(item);
eventList.append(i->mIncidence);
diff --git a/eventviews/src/month/monthgraphicsitems.cpp b/eventviews/src/month/monthgraphicsitems.cpp
index cb56c82..be7b70b 100644
--- a/eventviews/src/month/monthgraphicsitems.cpp
+++ b/eventviews/src/month/monthgraphicsitems.cpp
@@ -305,7 +305,7 @@ void MonthGraphicsItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWi
int curXPos = textRect.left();
if (alignFlag & Qt::AlignRight) {
- curXPos += textRect.width() - textWidth - iconWidths ;
+ curXPos += textRect.width() - textWidth - iconWidths;
} else if (alignFlag & Qt::AlignHCenter) {
curXPos += (textRect.width() - textWidth - iconWidths) / 2;
}
diff --git a/eventviews/src/multiagenda/multiagendaview.cpp b/eventviews/src/multiagenda/multiagendaview.cpp
index d94fe91..15f0623 100644
--- a/eventviews/src/multiagenda/multiagendaview.cpp
+++ b/eventviews/src/multiagenda/multiagendaview.cpp
@@ -32,7 +32,6 @@
#include <ETMViewStateSaver>
-
#include <KCalCore/Event>
#include <KCheckableProxyModel>
@@ -101,7 +100,7 @@ private:
class ElidedLabel: public QFrame
{
public:
- ElidedLabel(const QString & text): mText(text) {}
+ ElidedLabel(const QString &text): mText(text) {}
QSize minimumSizeHint() const Q_DECL_OVERRIDE;
@@ -714,7 +713,7 @@ void MultiAgendaView::doRestoreConfig(const KConfigGroup &configGroup)
// Only show the first column
KRearrangeColumnsProxyModel *columnFilterProxy = new KRearrangeColumnsProxyModel(this);
- columnFilterProxy->setSourceColumns(QVector<int>()<<Akonadi::ETMCalendar::CollectionTitle);
+ columnFilterProxy->setSourceColumns(QVector<int>() << Akonadi::ETMCalendar::CollectionTitle);
columnFilterProxy->setSourceModel(sortProxy);
// Keep track of selection.
@@ -815,6 +814,6 @@ void MultiAgendaView::Private::ElidedLabel::paintEvent(QPaintEvent *event)
QSize MultiAgendaView::Private::ElidedLabel::minimumSizeHint() const
{
- const QFontMetrics& fm = fontMetrics();
+ const QFontMetrics &fm = fontMetrics();
return QSize(fm.width(QStringLiteral("...")), fm.height());
}
diff --git a/eventviews/src/prefs.cpp b/eventviews/src/prefs.cpp
index d67ca61..e65e2c0 100644
--- a/eventviews/src/prefs.cpp
+++ b/eventviews/src/prefs.cpp
@@ -52,7 +52,7 @@ QByteArray iconSetToArray(const QSet<EventViews::EventView::ItemIcon> &set)
QByteArray array;
for (int i = 0; i < EventViews::EventView::IconCount; ++i) {
const bool contains = set.contains(static_cast<EventViews::EventView::ItemIcon>(i));
- array.append(contains ? 1 : 0) ;
+ array.append(contains ? 1 : 0);
}
return array;
diff --git a/eventviews/src/prefs.h b/eventviews/src/prefs.h
index dca6b74..7140dcd 100644
--- a/eventviews/src/prefs.h
+++ b/eventviews/src/prefs.h
@@ -31,7 +31,6 @@
#include <KConfigSkeleton>
#include <KDateTime>
-
namespace EventViews
{
diff --git a/eventviews/src/timeline/timelineview.cpp b/eventviews/src/timeline/timelineview.cpp
index bd071f5..739a9ec 100644
--- a/eventviews/src/timeline/timelineview.cpp
+++ b/eventviews/src/timeline/timelineview.cpp
@@ -62,7 +62,7 @@ namespace EventViews
class RowController : public KDGantt::AbstractRowController
{
private:
- static const int ROW_HEIGHT ;
+ static const int ROW_HEIGHT;
QPointer<QAbstractItemModel> m_model;
public:
diff --git a/eventviews/src/timeline/timelineview_p.cpp b/eventviews/src/timeline/timelineview_p.cpp
index fa299fd..8a7e323 100644
--- a/eventviews/src/timeline/timelineview_p.cpp
+++ b/eventviews/src/timeline/timelineview_p.cpp
@@ -125,7 +125,7 @@ void TimelineView::Private::insertIncidence(const Akonadi::Item &aitem, const QD
}
if (incidence->recurs()) {
- KCalCore::OccurrenceIterator occurIter(*(q->calendar()), incidence, KDateTime(day, QTime(0, 0 , 0)), KDateTime(day, QTime(23, 59, 59)));
+ KCalCore::OccurrenceIterator occurIter(*(q->calendar()), incidence, KDateTime(day, QTime(0, 0, 0)), KDateTime(day, QTime(23, 59, 59)));
while (occurIter.hasNext()) {
occurIter.next();
const Akonadi::Item akonadiItem = q->calendar()->item(occurIter.incidence());
diff --git a/eventviews/src/todo/todoview.cpp b/eventviews/src/todo/todoview.cpp
index 9aa5160..38eb213 100644
--- a/eventviews/src/todo/todoview.cpp
+++ b/eventviews/src/todo/todoview.cpp
@@ -341,9 +341,9 @@ TodoView::TodoView(const EventViews::PrefsPtr &prefs,
this, SIGNAL(printTodo()));
mItemPopupMenuItemOnlyEntries << mItemPopupMenu->addAction(
- QIcon::fromTheme(QStringLiteral("document-print-preview")),
- i18nc("@action:inmenu print preview the to-do", "Print Previe&w..."),
- this, SIGNAL(printPreviewTodo()));
+ QIcon::fromTheme(QStringLiteral("document-print-preview")),
+ i18nc("@action:inmenu print preview the to-do", "Print Previe&w..."),
+ this, SIGNAL(printPreviewTodo()));
mItemPopupMenu->addSeparator();
a = mItemPopupMenu->addAction(
KIconLoader::global()->loadIcon(QStringLiteral("edit-delete"), KIconLoader::NoGroup, KIconLoader::SizeSmall),
diff --git a/eventviews/src/viewerapp/main.cpp b/eventviews/src/viewerapp/main.cpp
index 2fd9bee..17950e4 100644
--- a/eventviews/src/viewerapp/main.cpp
+++ b/eventviews/src/viewerapp/main.cpp
@@ -48,7 +48,7 @@ int main(int argc, char **argv)
viewNames << parser.positionalArguments().at(i).toLower();
}
- MainWindow *widget = new MainWindow(viewNames) ;
+ MainWindow *widget = new MainWindow(viewNames);
widget->show();
diff --git a/eventviews/src/viewerapp/mainwindow.h b/eventviews/src/viewerapp/mainwindow.h
index 348399e..0fc4bb0 100644
--- a/eventviews/src/viewerapp/mainwindow.h
+++ b/eventviews/src/viewerapp/mainwindow.h
@@ -30,7 +30,6 @@ namespace Akonadi
class IncidenceChanger;
}
-
namespace EventViews
{
class Prefs;
diff --git a/examples/coisceim/tripmodel.h b/examples/coisceim/tripmodel.h
index 7569f01..6f298c5 100644
--- a/examples/coisceim/tripmodel.h
+++ b/examples/coisceim/tripmodel.h
@@ -40,7 +40,7 @@ public:
};
explicit TripModel(Akonadi::ChangeRecorder *monitor, QObject *parent = Q_NULLPTR);
- virtual bool removeRows(int , int , const QModelIndex & = QModelIndex());
+ virtual bool removeRows(int, int, const QModelIndex & = QModelIndex());
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
diff --git a/examples/mailreader/mailreaderview.cpp b/examples/mailreader/mailreaderview.cpp
index eb1c253..a224e89 100644
--- a/examples/mailreader/mailreaderview.cpp
+++ b/examples/mailreader/mailreaderview.cpp
@@ -80,7 +80,7 @@ void mailreaderView::displayAboutPage()
m_readerWin->displaySplashPage(info.toString());
}
-void mailreaderView::urlClicked(const Akonadi::Item &item , const QUrl &url)
+void mailreaderView::urlClicked(const Akonadi::Item &item, const QUrl &url)
{
Q_UNUSED(item);
//TODO "Handle click"
diff --git a/grantleeeditor/grantleethemeeditor/desktopfilepage.cpp b/grantleeeditor/grantleethemeeditor/desktopfilepage.cpp
index 118677b..38cb5c2 100644
--- a/grantleeeditor/grantleethemeeditor/desktopfilepage.cpp
+++ b/grantleeeditor/grantleethemeeditor/desktopfilepage.cpp
@@ -66,7 +66,7 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
lab = new QLabel(i18n("Description:"));
mDescription = new PimCommon::PlainTextEditorWidget;
mDescription->editor()->setSearchSupport(false);
- lay->addWidget(lab, row , 0);
+ lay->addWidget(lab, row, 0);
lay->addWidget(mDescription, row, 1);
if (options & SpecifyFileName) {
@@ -95,7 +95,7 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
++row;
lab = new QLabel(QStringLiteral("<qt><b>") + i18n("Be careful, Grantlee does not support '-' in variable name. So when you want to add extra header as \"X-Original-To\" add \"X-Original-To\" in list, but use \"XOriginalTo\" as variable in Grantlee (remove '-' in name).") + QStringLiteral("</b></qt>"));
lab->setWordWrap(true);
- lay->addWidget(lab, row , 0, 1, 2);
+ lay->addWidget(lab, row, 0, 1, 2);
++row;
mExtraDisplayHeaders = new KEditListWidget;
diff --git a/grantleetheme/src/grantleetheme.cpp b/grantleetheme/src/grantleetheme.cpp
index ae0cafd..94faacf 100644
--- a/grantleetheme/src/grantleetheme.cpp
+++ b/grantleetheme/src/grantleetheme.cpp
@@ -35,7 +35,7 @@ Theme::Theme(const QString &themePath, const QString &dirName, const QString &de
setDirName(dirName);
setName(group.readEntry("Name", QString()));
setDescription(group.readEntry("Description", QString()));
- setThemeFilename(group.readEntry("FileName" , QString()));
+ setThemeFilename(group.readEntry("FileName", QString()));
setDisplayExtraVariables(group.readEntry("DisplayExtraVariables", QStringList()));
setAbsolutePath(themePath);
}
diff --git a/grantleetheme/src/grantleethememanager.h b/grantleetheme/src/grantleethememanager.h
index d08bcb7..669d2b8 100644
--- a/grantleetheme/src/grantleethememanager.h
+++ b/grantleetheme/src/grantleethememanager.h
@@ -56,7 +56,7 @@ public:
void setDownloadNewStuffConfigFile(const QString &configFileName);
static QString pathFromThemes(const QString &path, const QString &themeName, const QString &defaultDesktopFilename);
- static GrantleeTheme::Theme loadTheme(const QString &themePath, const QString &dirName , const QString &defaultDesktopFilename);
+ static GrantleeTheme::Theme loadTheme(const QString &themePath, const QString &dirName, const QString &defaultDesktopFilename);
Q_SIGNALS:
void themesChanged();
diff --git a/importwizard/autodetect/abstractbase.cpp b/importwizard/autodetect/abstractbase.cpp
index dfdde26..350134a 100644
--- a/importwizard/autodetect/abstractbase.cpp
+++ b/importwizard/autodetect/abstractbase.cpp
@@ -40,7 +40,7 @@ AbstractBase::~AbstractBase()
delete mCreateResource;
}
-QString AbstractBase::createResource(const QString &resources , const QString &name, const QMap<QString, QVariant> &settings)
+QString AbstractBase::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)
{
return mCreateResource->createResource(resources, name, settings);
}
diff --git a/importwizard/autodetect/abstractbase.h b/importwizard/autodetect/abstractbase.h
index 81d7c9c..7c2c68f 100644
--- a/importwizard/autodetect/abstractbase.h
+++ b/importwizard/autodetect/abstractbase.h
@@ -35,7 +35,7 @@ public:
explicit AbstractBase();
virtual ~AbstractBase();
- QString createResource(const QString &resources , const QString &name, const QMap<QString, QVariant> &settings);
+ QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings);
private Q_SLOTS:
void slotCreateResourceError(const QString &);
diff --git a/importwizard/autodetect/abstractsettings.h b/importwizard/autodetect/abstractsettings.h
index af9390c..dbe9709 100644
--- a/importwizard/autodetect/abstractsettings.h
+++ b/importwizard/autodetect/abstractsettings.h
@@ -49,7 +49,7 @@ protected:
QString uniqueIdentityName(const QString &name);
- QString createResource(const QString &resources , const QString &name, const QMap<QString, QVariant> &settings);
+ QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings);
KIdentityManagement::Identity *createIdentity(QString &name);
diff --git a/importwizard/autodetect/balsa/balsaaddressbook.cpp b/importwizard/autodetect/balsa/balsaaddressbook.cpp
index b07924b..f723122 100644
--- a/importwizard/autodetect/balsa/balsaaddressbook.cpp
+++ b/importwizard/autodetect/balsa/balsaaddressbook.cpp
@@ -98,7 +98,7 @@ void BalsaAddressBook::readAddressBook(const KConfigGroup &grp)
QMap<QString, QVariant> settings;
settings.insert(QStringLiteral("Path"), path);
settings.insert(QStringLiteral("DisplayName"), name);
- addAddressBookImportInfo(i18n("New addressbook created: %1", createResource(QStringLiteral("akonadi_vcard_resource") , name, settings)));
+ addAddressBookImportInfo(i18n("New addressbook created: %1", createResource(QStringLiteral("akonadi_vcard_resource"), name, settings)));
}
} else {
qCDebug(IMPORTWIZARD_LOG) << " unknown addressbook type :" << type;
diff --git a/importwizard/autodetect/sylpheed/sylpheedsettings.cpp b/importwizard/autodetect/sylpheed/sylpheedsettings.cpp
index c0eefc9..cace79c 100644
--- a/importwizard/autodetect/sylpheed/sylpheedsettings.cpp
+++ b/importwizard/autodetect/sylpheed/sylpheedsettings.cpp
@@ -425,7 +425,7 @@ void SylpheedSettings::readImapAccount(const KConfigGroup &accountConfig, bool c
addToManualCheck(agentIdentifyName, enableManualCheck);
}
-void SylpheedSettings::readAccount(const KConfigGroup &accountConfig , bool checkMailOnStartup, int intervalCheckMail)
+void SylpheedSettings::readAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail)
{
if (accountConfig.hasKey(QStringLiteral("protocol"))) {
const int protocol = accountConfig.readEntry(QStringLiteral("protocol"), 0);
@@ -463,21 +463,21 @@ void SylpheedSettings::readIdentity(const KConfigGroup &accountConfig)
identity->setPrimaryEmailAddress(email);
QString value;
- if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_bcc") , accountConfig, value, true)) {
+ if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_bcc"), accountConfig, value, true)) {
identity->setBcc(value);
}
- if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_cc") , accountConfig, value, true)) {
+ if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_cc"), accountConfig, value, true)) {
identity->setCc(value);
}
- if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_replyto") , accountConfig, value, true)) {
+ if (SylpheedSettingsUtils::readConfig(QStringLiteral("auto_replyto"), accountConfig, value, true)) {
identity->setReplyToAddr(value);
}
- if (SylpheedSettingsUtils::readConfig(QStringLiteral("daft_folder") , accountConfig, value, false)) {
+ if (SylpheedSettingsUtils::readConfig(QStringLiteral("daft_folder"), accountConfig, value, false)) {
identity->setDrafts(MailCommon::Util::convertFolderPathToCollectionStr(value));
}
- if (SylpheedSettingsUtils::readConfig(QStringLiteral("sent_folder") , accountConfig, value, false)) {
+ if (SylpheedSettingsUtils::readConfig(QStringLiteral("sent_folder"), accountConfig, value, false)) {
identity->setFcc(MailCommon::Util::convertFolderPathToCollectionStr(value));
}
diff --git a/importwizard/autodetect/sylpheed/sylpheedsettings.h b/importwizard/autodetect/sylpheed/sylpheedsettings.h
index 4827337..d4cf034 100644
--- a/importwizard/autodetect/sylpheed/sylpheedsettings.h
+++ b/importwizard/autodetect/sylpheed/sylpheedsettings.h
@@ -35,11 +35,11 @@ public:
protected:
void readCustomHeader(QFile *customHeaderFile);
virtual void readGlobalSettings(const KConfigGroup &group);
- void readAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup , int intervalCheckMail);
+ void readAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
void readIdentity(const KConfigGroup &accountConfig);
QString readTransport(const KConfigGroup &accountConfig);
- void readPop3Account(const KConfigGroup &accountConfig, bool checkMailOnStartup , int intervalCheckMail);
- void readImapAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup , int intervalCheckMail);
+ void readPop3Account(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
+ void readImapAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
void readSignature(const KConfigGroup &accountConfig, KIdentityManagement::Identity *identity);
virtual void readSettingsColor(const KConfigGroup &group);
diff --git a/incidenceeditor-ng/autotests/conflictresolvertest.h b/incidenceeditor-ng/autotests/conflictresolvertest.h
index 812f5fb..83f555b 100644
--- a/incidenceeditor-ng/autotests/conflictresolvertest.h
+++ b/incidenceeditor-ng/autotests/conflictresolvertest.h
@@ -51,7 +51,7 @@ private Q_SLOTS:
private:
void insertAttendees();
void addAttendee(const QString &email, const KCalCore::FreeBusy::Ptr &fb,
- KCalCore::Attendee::Role role = KCalCore::Attendee::ReqParticipant) ;
+ KCalCore::Attendee::Role role = KCalCore::Attendee::ReqParticipant);
QList<KPIM::FreeBusyItem::Ptr> attendees;
QWidget *parent;
IncidenceEditorNG::ConflictResolver *resolver;
diff --git a/incidenceeditor-ng/src/attendeecomboboxdelegate.cpp b/incidenceeditor-ng/src/attendeecomboboxdelegate.cpp
index 96d074a..6325908 100644
--- a/incidenceeditor-ng/src/attendeecomboboxdelegate.cpp
+++ b/incidenceeditor-ng/src/attendeecomboboxdelegate.cpp
@@ -176,7 +176,7 @@ bool AttendeeComboBoxDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *v
QHelpEvent *he = static_cast<QHelpEvent *>(event);
QWhatsThis::showText(he->globalPos(), mWhatsThis, view);
return true;
- break ;
+ break;
}
#endif
default:
diff --git a/incidenceeditor-ng/src/attendeelineeditdelegate.cpp b/incidenceeditor-ng/src/attendeelineeditdelegate.cpp
index 1dae6d4..4aaa714 100644
--- a/incidenceeditor-ng/src/attendeelineeditdelegate.cpp
+++ b/incidenceeditor-ng/src/attendeelineeditdelegate.cpp
@@ -114,7 +114,7 @@ bool AttendeeLineEditDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *v
QHelpEvent *he = static_cast<QHelpEvent *>(event);
QWhatsThis::showText(he->globalPos(), mWhatsThis, view);
return true;
- break ;
+ break;
}
#endif
default:
diff --git a/incidenceeditor-ng/src/editoritemmanager.cpp b/incidenceeditor-ng/src/editoritemmanager.cpp
index 78110d7..16d77e7 100644
--- a/incidenceeditor-ng/src/editoritemmanager.cpp
+++ b/incidenceeditor-ng/src/editoritemmanager.cpp
@@ -299,7 +299,7 @@ Akonadi::Item EditorItemManager::item(ItemState state) const
break;
default:
qCDebug(INCIDENCEEDITOR_LOG) << "state = " << state;
- Q_ASSERT_X(false, "EditorItemManager::item", "Unknown enum value") ;
+ Q_ASSERT_X(false, "EditorItemManager::item", "Unknown enum value");
}
return Akonadi::Item();
}
diff --git a/incidenceeditor-ng/src/incidencedatetime.cpp b/incidenceeditor-ng/src/incidencedatetime.cpp
index 6d600ec..e75dc47 100644
--- a/incidenceeditor-ng/src/incidencedatetime.cpp
+++ b/incidenceeditor-ng/src/incidencedatetime.cpp
@@ -942,7 +942,7 @@ void IncidenceDateTime::printDebugInfo() const
if (mLoadedIncidence->type() == KCalCore::Incidence::TypeEvent) {
KCalCore::Event::Ptr event = mLoadedIncidence.staticCast<KCalCore::Event>();
qCDebug(INCIDENCEEDITOR_LOG) << "dirty test2: " << (mUi->mFreeBusyCheck->isChecked() && event->transparency() != KCalCore::Event::Opaque);
- qCDebug(INCIDENCEEDITOR_LOG) << "dirty test3: " << (!mUi->mFreeBusyCheck->isChecked() && event->transparency() != KCalCore::Event::Transparent) ;
+ qCDebug(INCIDENCEEDITOR_LOG) << "dirty test3: " << (!mUi->mFreeBusyCheck->isChecked() && event->transparency() != KCalCore::Event::Transparent);
}
if (mLoadedIncidence->allDay()) {
diff --git a/incidenceeditor-ng/src/visualfreebusywidget.cpp b/incidenceeditor-ng/src/visualfreebusywidget.cpp
index 1dd0b4c..eb9c060 100644
--- a/incidenceeditor-ng/src/visualfreebusywidget.cpp
+++ b/incidenceeditor-ng/src/visualfreebusywidget.cpp
@@ -48,7 +48,7 @@ namespace IncidenceEditorNG
class RowController : public KDGantt::AbstractRowController
{
private:
- static const int ROW_HEIGHT ;
+ static const int ROW_HEIGHT;
QPointer<QAbstractItemModel> m_model;
public:
diff --git a/incidenceeditor-ng/src/visualfreebusywidget.h b/incidenceeditor-ng/src/visualfreebusywidget.h
index 5459db6..8f731c5 100644
--- a/incidenceeditor-ng/src/visualfreebusywidget.h
+++ b/incidenceeditor-ng/src/visualfreebusywidget.h
@@ -61,7 +61,7 @@ Q_SIGNALS:
protected Q_SLOTS:
void slotScaleChanged(int);
- void slotCenterOnStart() ;
+ void slotCenterOnStart();
void slotZoomToTime();
void slotPickDate();
void showAttendeeStatusMenu();
diff --git a/kaddressbook/main.cpp b/kaddressbook/main.cpp
index 37d29c5..9986c24 100644
--- a/kaddressbook/main.cpp
+++ b/kaddressbook/main.cpp
@@ -39,13 +39,13 @@ public:
mMainWindow(Q_NULLPTR)
{
}
- int activate(const QStringList &arguments, const QString&) Q_DECL_OVERRIDE;
+ int activate(const QStringList &arguments, const QString &) Q_DECL_OVERRIDE;
private:
MainWindow *mMainWindow;
};
-int KAddressBookApplication::activate(const QStringList &arguments, const QString&)
+int KAddressBookApplication::activate(const QStringList &arguments, const QString &)
{
if (!mMainWindow) {
mMainWindow = new MainWindow;
diff --git a/kaddressbook/merge/autotests/mergecontactstest.cpp b/kaddressbook/merge/autotests/mergecontactstest.cpp
index c6a7745..f3f2f83 100644
--- a/kaddressbook/merge/autotests/mergecontactstest.cpp
+++ b/kaddressbook/merge/autotests/mergecontactstest.cpp
@@ -1046,7 +1046,7 @@ void MergeContactsTest::shouldMergeBlogFeed()
const QString valueCustomStr = QStringLiteral("BlogFeed");
Akonadi::Item::List lst;
Addressee addressA;
- addressA.insertCustom(QStringLiteral("KADDRESSBOOK"), valueCustomStr , nameItemA);
+ addressA.insertCustom(QStringLiteral("KADDRESSBOOK"), valueCustomStr, nameItemA);
Akonadi::Item itemA;
itemA.setPayload<Addressee>(addressA);
lst << itemA;
diff --git a/kaddressbook/xxport/csv/csv_xxport.cpp b/kaddressbook/xxport/csv/csv_xxport.cpp
index d5718cf..6a684d6 100644
--- a/kaddressbook/xxport/csv/csv_xxport.cpp
+++ b/kaddressbook/xxport/csv/csv_xxport.cpp
@@ -41,7 +41,7 @@ CsvXXPort::CsvXXPort(QWidget *parent)
{
}
-bool CsvXXPort::exportContacts(const ContactList &contacts , VCardExportSelectionWidget::ExportFields) const
+bool CsvXXPort::exportContacts(const ContactList &contacts, VCardExportSelectionWidget::ExportFields) const
{
QUrl url = QFileDialog::getSaveFileUrl(parentWidget(), QString(), QUrl::fromUserInput(QStringLiteral("addressbook.csv")));
if (url.isEmpty()) {
diff --git a/kaddressbook/xxport/csv/csvimportdialog.cpp b/kaddressbook/xxport/csv/csvimportdialog.cpp
index 7c7563b..b418668 100644
--- a/kaddressbook/xxport/csv/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csv/csvimportdialog.cpp
@@ -482,7 +482,6 @@ void CSVImportDialog::initGUI()
mUser2Button->setEnabled(false);
mainLayout->addWidget(buttonBox);
-
resize(500, 400);
}
diff --git a/kaddressbook/xxport/gmx/gmx_xxport.cpp b/kaddressbook/xxport/gmx/gmx_xxport.cpp
index 733ecb8..c1b8291 100644
--- a/kaddressbook/xxport/gmx/gmx_xxport.cpp
+++ b/kaddressbook/xxport/gmx/gmx_xxport.cpp
@@ -468,7 +468,7 @@ void GMXXXPort::doExport(QFile *fp, const KContacts::AddresseeList &list) const
if (categories.count() > 0) {
for (int i = 0; i < categories.count(); ++i) {
if (categoryMap.contains(categories[i])) {
- category |= 1 << categoryMap.indexOf(categories[i], 0) ;
+ category |= 1 << categoryMap.indexOf(categories[i], 0);
}
}
}
diff --git a/kaddressbook/xxport/gmx/gmx_xxport.h b/kaddressbook/xxport/gmx/gmx_xxport.h
index cc46c2a..4627af6 100644
--- a/kaddressbook/xxport/gmx/gmx_xxport.h
+++ b/kaddressbook/xxport/gmx/gmx_xxport.h
@@ -35,7 +35,7 @@ class GMXXXPort : public XXPort
public:
explicit GMXXXPort(QWidget *parent = Q_NULLPTR);
- bool exportContacts(const ContactList &list , VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
+ bool exportContacts(const ContactList &list, VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
ContactList importContacts() const Q_DECL_OVERRIDE;
private:
diff --git a/kaddressbook/xxport/ldap/ldap_xxport.h b/kaddressbook/xxport/ldap/ldap_xxport.h
index ce566a8..0c7d661 100644
--- a/kaddressbook/xxport/ldap/ldap_xxport.h
+++ b/kaddressbook/xxport/ldap/ldap_xxport.h
@@ -33,7 +33,7 @@ class LDAPXXPort : public XXPort
public:
explicit LDAPXXPort(QWidget *parent = Q_NULLPTR);
ContactList importContacts() const Q_DECL_OVERRIDE;
- bool exportContacts(const ContactList &contacts , VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
+ bool exportContacts(const ContactList &contacts, VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
};
#endif
diff --git a/kaddressbook/xxport/ldif/ldif_xxport.cpp b/kaddressbook/xxport/ldif/ldif_xxport.cpp
index a09a8ea..05ec98a 100644
--- a/kaddressbook/xxport/ldif/ldif_xxport.cpp
+++ b/kaddressbook/xxport/ldif/ldif_xxport.cpp
@@ -68,7 +68,7 @@ LDIFXXPort::LDIFXXPort(QWidget *parentWidget)
ContactList LDIFXXPort::importContacts() const
{
ContactList contactList;
- const QString fileName = QFileDialog::getOpenFileName(parentWidget() , QString(), QDir::homePath(), i18n("LDIF file (%1)", QStringLiteral("*.ldif")));
+ const QString fileName = QFileDialog::getOpenFileName(parentWidget(), QString(), QDir::homePath(), i18n("LDIF file (%1)", QStringLiteral("*.ldif")));
if (fileName.isEmpty()) {
return contactList;
}
diff --git a/kaddressbook/xxport/ldif/ldif_xxport.h b/kaddressbook/xxport/ldif/ldif_xxport.h
index 55c73f9..5e3fe41 100644
--- a/kaddressbook/xxport/ldif/ldif_xxport.h
+++ b/kaddressbook/xxport/ldif/ldif_xxport.h
@@ -32,7 +32,7 @@ class LDIFXXPort : public XXPort
public:
explicit LDIFXXPort(QWidget *parent = Q_NULLPTR);
- bool exportContacts(const ContactList &contacts , VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
+ bool exportContacts(const ContactList &contacts, VCardExportSelectionWidget::ExportFields) const Q_DECL_OVERRIDE;
ContactList importContacts() const Q_DECL_OVERRIDE;
};
diff --git a/kaddressbookgrantlee/src/printing/autotests/grantleeprinttest.cpp b/kaddressbookgrantlee/src/printing/autotests/grantleeprinttest.cpp
index 4a3230f..a84c0be 100644
--- a/kaddressbookgrantlee/src/printing/autotests/grantleeprinttest.cpp
+++ b/kaddressbookgrantlee/src/printing/autotests/grantleeprinttest.cpp
@@ -152,11 +152,11 @@ void GrantleePrintTest::shouldDisplayContactInfo()
address.setPrefix(QStringLiteral("foo-prefix"));
address.setDepartment(QStringLiteral("foo-department"));
address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Office"), QStringLiteral("foo-office"));
- address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Profession") , QStringLiteral("foo-profession"));
- address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Office") , QStringLiteral("foo-office"));
- address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-ManagersName") , QStringLiteral("foo-managersname"));
- address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-AssistantsName") , QStringLiteral("foo-assistantsname"));
- address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName") , QStringLiteral("foo-spousesname"));
+ address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Profession"), QStringLiteral("foo-profession"));
+ address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Office"), QStringLiteral("foo-office"));
+ address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-ManagersName"), QStringLiteral("foo-managersname"));
+ address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-AssistantsName"), QStringLiteral("foo-assistantsname"));
+ address.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName"), QStringLiteral("foo-spousesname"));
lst << address;
grantleePrint->setContent(QStringLiteral("{% if contacts %}{% for contact in contacts %}{% if contact.%1 %}{{ contact.%1 }}{% endif %}{% endfor %}{% endif %}").arg(variable));
diff --git a/kdgantt2/src/kdganttgraphicsitem.cpp b/kdgantt2/src/kdganttgraphicsitem.cpp
index 69dd1e0..4288858 100644
--- a/kdgantt2/src/kdganttgraphicsitem.cpp
+++ b/kdgantt2/src/kdganttgraphicsitem.cpp
@@ -393,13 +393,13 @@ void GraphicsItem::updateModel()
const QModelIndex sourceIdx = scene()->summaryHandlingModel()->mapToSource(index());
Q_UNUSED(sourceIdx);
QList<Constraint> constraints;
- for (QList<ConstraintGraphicsItem *>::iterator it1 = m_startConstraints.begin() ;
- it1 != m_startConstraints.end() ;
+ for (QList<ConstraintGraphicsItem *>::iterator it1 = m_startConstraints.begin();
+ it1 != m_startConstraints.end();
++it1) {
constraints.push_back((*it1)->proxyConstraint());
}
- for (QList<ConstraintGraphicsItem *>::iterator it2 = m_endConstraints.begin() ;
- it2 != m_endConstraints.end() ;
+ for (QList<ConstraintGraphicsItem *>::iterator it2 = m_endConstraints.begin();
+ it2 != m_endConstraints.end();
++it2) {
constraints.push_back((*it2)->proxyConstraint());
}
diff --git a/kdgantt2/src/kdganttgraphicsscene.cpp b/kdgantt2/src/kdganttgraphicsscene.cpp
index becbf64..4ddd4c0 100644
--- a/kdgantt2/src/kdganttgraphicsscene.cpp
+++ b/kdgantt2/src/kdganttgraphicsscene.cpp
@@ -129,7 +129,7 @@ ConstraintGraphicsItem *GraphicsScene::Private::findConstraintItem(const Constra
QList<ConstraintGraphicsItem *> clst = item->startConstraints();
QList<ConstraintGraphicsItem *>::iterator it = clst.begin();
//qCDebug(KDGANTT_LOG)<<"GraphicsScene::Private::findConstraintItem start:"<<c<<item<<clst;
- for (; it != clst.end() ; ++it)
+ for (; it != clst.end(); ++it)
if ((*it)->constraint() == c) {
break;
}
@@ -142,7 +142,7 @@ ConstraintGraphicsItem *GraphicsScene::Private::findConstraintItem(const Constra
QList<ConstraintGraphicsItem *> clst = item->endConstraints();
QList<ConstraintGraphicsItem *>::iterator it = clst.begin();
//qCDebug(KDGANTT_LOG)<<"GraphicsScene::Private::findConstraintItem end:"<<c<<item<<clst;
- for (; it != clst.end() ; ++it)
+ for (; it != clst.end(); ++it)
if ((*it)->constraint() == c) {
break;
}
diff --git a/kdgantt2/src/kdganttlegend.h b/kdgantt2/src/kdganttlegend.h
index a5eca02..73b5d52 100644
--- a/kdgantt2/src/kdganttlegend.h
+++ b/kdgantt2/src/kdganttlegend.h
@@ -65,8 +65,7 @@ protected:
{
return false;
}
- QModelIndex moveCursor(CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE
- {
+ QModelIndex moveCursor(CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE {
return QModelIndex();
}
void setSelection(const QRect &, QItemSelectionModel::SelectionFlags) Q_DECL_OVERRIDE {}
diff --git a/kleopatra/aboutdata.cpp b/kleopatra/aboutdata.cpp
index 60d8fc0..14ccdb9 100644
--- a/kleopatra/aboutdata.cpp
+++ b/kleopatra/aboutdata.cpp
@@ -94,16 +94,16 @@ static const about_data credits[] = {
AboutData::AboutData()
: KAboutData(QStringLiteral("kleopatra"), i18n("Kleopatra"),
- QLatin1String(kleopatra_version), i18n(description), KAboutLicense::GPL,
- i18n("(c) 2002 Steffen\xC2\xA0Hansen, Matthias\xC2\xA0Kalle\xC2\xA0" "Dalheimer, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB\n"
- "(c) 2004, 2007, 2008, 2009 Marc\xC2\xA0Mutz, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB"))
+ QLatin1String(kleopatra_version), i18n(description), KAboutLicense::GPL,
+ i18n("(c) 2002 Steffen\xC2\xA0Hansen, Matthias\xC2\xA0Kalle\xC2\xA0" "Dalheimer, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB\n"
+ "(c) 2004, 2007, 2008, 2009 Marc\xC2\xA0Mutz, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB"))
{
using ::authors;
using ::credits;
- for (unsigned int i = 0 ; i < sizeof authors / sizeof * authors ; ++i)
+ for (unsigned int i = 0; i < sizeof authors / sizeof * authors; ++i)
addAuthor(i18n(authors[i].name), i18n(authors[i].desc),
QLatin1String(authors[i].email), QLatin1String(authors[i].web));
- for (unsigned int i = 0 ; i < sizeof credits / sizeof * credits ; ++i)
+ for (unsigned int i = 0; i < sizeof credits / sizeof * credits; ++i)
addCredit(i18n(credits[i].name), i18n(credits[i].desc),
QLatin1String(credits[i].email), QLatin1String(credits[i].web));
}
@@ -148,7 +148,7 @@ static QString gpg4win_version()
if (!p.waitForFinished())
return QStringLiteral("%1 (%2)").arg(QLatin1String(gpg4win_version_guessed),
i18nc("Version string is a guess", "guessed"));
- const QString output = QTextStream(&p).readAll() ;
+ const QString output = QTextStream(&p).readAll();
QRegExp rx(QStringLiteral("\\(Gpg4win\\s+([^\\s)]+)\\)"));
if (rx.indexIn(output) != -1) {
return rx.cap(1);
@@ -165,13 +165,13 @@ static QPixmap UserIcon_nocached2(const char *name)
KIconLoader *const il = KIconLoader::global();
assert(il);
const QString iconPath = il->iconPath(QLatin1String(name), KIconLoader::User);
- return iconPath.isEmpty() ? il->unknown() : QPixmap(iconPath) ;
+ return iconPath.isEmpty() ? il->unknown() : QPixmap(iconPath);
}
AboutGpg4WinData::AboutGpg4WinData()
: KAboutData(QStringLiteral("gpg4win"), i18n("Gpg4win"),
- gpg4win_version(), i18n(gpg4win_description),
- KAboutLicense::GPL, QString(), QString(), QStringLiteral("http://www.gpg4win.de"))
+ gpg4win_version(), i18n(gpg4win_description),
+ KAboutLicense::GPL, QString(), QString(), QStringLiteral("http://www.gpg4win.de"))
{
setCustomAuthorText(i18n(gpg4win_credits_description), i18n(gpg4win_credits_description));
addAuthor(i18n(gpg4win_credits_persons), QString(), QString(), QString());
diff --git a/kleopatra/commands/changeroottrustcommand.cpp b/kleopatra/commands/changeroottrustcommand.cpp
index d3bb714..0201418 100644
--- a/kleopatra/commands/changeroottrustcommand.cpp
+++ b/kleopatra/commands/changeroottrustcommand.cpp
@@ -241,7 +241,7 @@ static QString add_colons(const QString &fpr)
Q_FOREACH (const QChar &ch, fpr) {
result += ch;
if (needColon) {
- result += QLatin1Char(':') ;
+ result += QLatin1Char(':');
}
needColon = !needColon;
}
diff --git a/kleopatra/commands/clearcrlcachecommand.cpp b/kleopatra/commands/clearcrlcachecommand.cpp
index 4783b23..1ba2a8d 100644
--- a/kleopatra/commands/clearcrlcachecommand.cpp
+++ b/kleopatra/commands/clearcrlcachecommand.cpp
@@ -73,7 +73,7 @@ QString ClearCrlCacheCommand::crashExitMessage(const QStringList &args) const
{
return i18n("The DirMngr process that tried to clear the CRL cache "
"ended prematurely because of an unexpected error. "
- "Please check the output of %1 for details.", args.join(QStringLiteral(" "))) ;
+ "Please check the output of %1 for details.", args.join(QStringLiteral(" ")));
}
QString ClearCrlCacheCommand::errorExitMessage(const QStringList &args) const
diff --git a/kleopatra/commands/command_p.h b/kleopatra/commands/command_p.h
index fc36b0d..79a30f0 100644
--- a/kleopatra/commands/command_p.h
+++ b/kleopatra/commands/command_p.h
@@ -72,7 +72,7 @@ public:
}
KeyListModelInterface *model() const
{
- return view_ ? dynamic_cast<KeyListModelInterface *>(view_->model()) : 0 ;
+ return view_ ? dynamic_cast<KeyListModelInterface *>(view_->model()) : 0;
}
KeyListController *controller() const
{
@@ -86,11 +86,11 @@ public:
}
GpgME::Key key() const
{
- return keys_.empty() ? model() && !indexes_.empty() ? model()->key(indexes_.front()) : GpgME::Key::null : keys_.front() ;
+ return keys_.empty() ? model() && !indexes_.empty() ? model()->key(indexes_.front()) : GpgME::Key::null : keys_.front();
}
std::vector<GpgME::Key> keys() const
{
- return keys_.empty() ? model() ? model()->keys(indexes()) : std::vector<GpgME::Key>() : keys_ ;
+ return keys_.empty() ? model() ? model()->keys(indexes()) : std::vector<GpgME::Key>() : keys_;
}
void finished()
diff --git a/kleopatra/commands/decryptverifyclipboardcommand.cpp b/kleopatra/commands/decryptverifyclipboardcommand.cpp
index 86a798b..69b22fc 100644
--- a/kleopatra/commands/decryptverifyclipboardcommand.cpp
+++ b/kleopatra/commands/decryptverifyclipboardcommand.cpp
@@ -142,7 +142,7 @@ bool DecryptVerifyClipboardCommand::canDecryptVerifyCurrentClipboard()
{
try {
return Input::createFromClipboard()->classification()
- & (Class::CipherText | Class::ClearsignedMessage | Class::OpaqueSignature) ;
+ & (Class::CipherText | Class::ClearsignedMessage | Class::OpaqueSignature);
} catch (...) {}
return false;
}
diff --git a/kleopatra/commands/deletecertificatescommand.cpp b/kleopatra/commands/deletecertificatescommand.cpp
index 3db85eb..85abf62 100644
--- a/kleopatra/commands/deletecertificatescommand.cpp
+++ b/kleopatra/commands/deletecertificatescommand.cpp
@@ -314,14 +314,14 @@ void DeleteCertificatesCommand::Private::slotDialogAccepted()
pgpEnd = std::stable_partition(pgpBegin, keys.end(),
boost::bind(&GpgME::Key::protocol, _1) != CMS),
cmsBegin = pgpEnd,
- cmsEnd = keys.end() ;
+ cmsEnd = keys.end();
std::vector<Key> openpgp(pgpBegin, pgpEnd);
std::vector<Key> cms(cmsBegin, cmsEnd);
const unsigned int errorCase =
openpgp.empty() << 3U | canDelete(OpenPGP) << 2U |
- cms.empty() << 1U | canDelete(CMS) << 0U ;
+ cms.empty() << 1U | canDelete(CMS) << 0U;
if (const unsigned int actions = deletionErrorCases[errorCase].actions) {
information(i18n(deletionErrorCases[errorCase].text),
@@ -362,7 +362,7 @@ void DeleteCertificatesCommand::Private::startDeleteJob(GpgME::Protocol protocol
{
assert(protocol != GpgME::UnknownProtocol);
- const std::vector<Key> &keys = protocol == CMS ? cmsKeys : pgpKeys ;
+ const std::vector<Key> &keys = protocol == CMS ? cmsKeys : pgpKeys;
const CryptoBackend::Protocol *const backend = CryptoBackendFactory::instance()->protocol(protocol);
assert(backend);
diff --git a/kleopatra/commands/exportcertificatecommand.cpp b/kleopatra/commands/exportcertificatecommand.cpp
index 6e921b3..5bc89c3 100644
--- a/kleopatra/commands/exportcertificatecommand.cpp
+++ b/kleopatra/commands/exportcertificatecommand.cpp
@@ -192,7 +192,7 @@ bool ExportCertificateCommand::Private::requestFileNames(GpgME::Protocol protoco
applyWindowID(dlg);
dlg->setOpenPgpExportFileName(fileNames[OpenPGP]);
dlg->setCmsExportFileName(fileNames[CMS]);
- const bool accepted = dlg->exec() == QDialog::Accepted && dlg ;
+ const bool accepted = dlg->exec() == QDialog::Accepted && dlg;
if (accepted) {
fileNames[OpenPGP] = dlg->openPgpExportFileName();
fileNames[CMS] = dlg->cmsExportFileName();
@@ -237,7 +237,7 @@ void ExportCertificateCommand::Private::startExportJob(GpgME::Protocol protocol,
const QString fileName = fileNames[protocol];
const bool binary = protocol == GpgME::OpenPGP
? fileName.endsWith(QStringLiteral(".gpg"), Qt::CaseInsensitive) || fileName.endsWith(QStringLiteral(".pgp"), Qt::CaseInsensitive)
- : fileName.endsWith(QStringLiteral(".der"), Qt::CaseInsensitive) ;
+ : fileName.endsWith(QStringLiteral(".der"), Qt::CaseInsensitive);
std::unique_ptr<ExportJob> job(backend->publicKeyExportJob(!binary));
assert(job.get());
diff --git a/kleopatra/commands/exportopenpgpcertstoservercommand.cpp b/kleopatra/commands/exportopenpgpcertstoservercommand.cpp
index 466b6b1..4efd8ee 100644
--- a/kleopatra/commands/exportopenpgpcertstoservercommand.cpp
+++ b/kleopatra/commands/exportopenpgpcertstoservercommand.cpp
@@ -140,7 +140,7 @@ QString ExportOpenPGPCertsToServerCommand::crashExitMessage(const QStringList &a
return xi18nc("@info",
"<para>The GPG process that tried to export OpenPGP certificates "
"ended prematurely because of an unexpected error.</para>"
- "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" "))) ;
+ "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" ")));
}
QString ExportOpenPGPCertsToServerCommand::errorExitMessage(const QStringList &args) const
diff --git a/kleopatra/commands/exportsecretkeycommand.cpp b/kleopatra/commands/exportsecretkeycommand.cpp
index 0f0d617..7b9592c 100644
--- a/kleopatra/commands/exportsecretkeycommand.cpp
+++ b/kleopatra/commands/exportsecretkeycommand.cpp
@@ -147,7 +147,7 @@ QString ExportSecretKeyCommand::crashExitMessage(const QStringList &args) const
return xi18nc("@info",
"<para>The GPG or GpgSM process that tried to export the secret key "
"ended prematurely because of an unexpected error.</para>"
- "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" "))) ;
+ "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" ")));
}
QString ExportSecretKeyCommand::errorExitMessage(const QStringList &args) const
diff --git a/kleopatra/commands/importcertificatescommand.cpp b/kleopatra/commands/importcertificatescommand.cpp
index 00e3973..18a65d1 100644
--- a/kleopatra/commands/importcertificatescommand.cpp
+++ b/kleopatra/commands/importcertificatescommand.cpp
@@ -124,7 +124,7 @@ protected:
//
const QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
assert(index.isValid());
- for (int i = 0, end = sourceModel()->rowCount(index) ; i != end ; ++i)
+ for (int i = 0, end = sourceModel()->rowCount(index); i != end; ++i)
if (filterAcceptsRow(i, index)) {
return true;
}
@@ -145,11 +145,11 @@ private:
m_importsByFingerprint.clear();
m_idsByFingerprint.clear();
m_results = results;
- for (unsigned int i = 0, end = results.size() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = results.size(); i != end; ++i) {
const std::vector<Import> imports = results[i].imports();
m_importsByFingerprint.insert(m_importsByFingerprint.end(), imports.begin(), imports.end());
const QString &id = ids[i];
- for (std::vector<Import>::const_iterator it = imports.begin(), end = imports.end() ; it != end ; ++it) {
+ for (std::vector<Import>::const_iterator it = imports.begin(), end = imports.end(); it != end; ++it) {
m_idsByFingerprint[it->fingerprint()].insert(id);
}
}
@@ -397,7 +397,7 @@ void ImportCertificatesCommand::Private::tryToFinish()
if (kdtools::all(results, boost::bind(&Error::isCanceled, boost::bind(&ImportResult::error, _1)))) {
Q_EMIT q->canceled();
} else
- for (unsigned int i = 0, end = results.size() ; i != end ; ++i)
+ for (unsigned int i = 0, end = results.size(); i != end; ++i)
if (const Error err = results[i].error()) {
showError(err, ids[i]);
}
diff --git a/kleopatra/commands/learncardkeyscommand.cpp b/kleopatra/commands/learncardkeyscommand.cpp
index 9e33d31..ff7cd0f 100644
--- a/kleopatra/commands/learncardkeyscommand.cpp
+++ b/kleopatra/commands/learncardkeyscommand.cpp
@@ -88,7 +88,7 @@ QString LearnCardKeysCommand::crashExitMessage(const QStringList &args) const
return xi18nc("@info",
"<para>The GPG or GpgSM process that tried to learn the smart card "
"ended prematurely because of an unexpected error.</para>"
- "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" "))) ;
+ "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" ")));
}
QString LearnCardKeysCommand::errorExitMessage(const QStringList &) const
diff --git a/kleopatra/commands/lookupcertificatescommand.cpp b/kleopatra/commands/lookupcertificatescommand.cpp
index 3c0e3ce..794bbe9 100644
--- a/kleopatra/commands/lookupcertificatescommand.cpp
+++ b/kleopatra/commands/lookupcertificatescommand.cpp
@@ -110,12 +110,12 @@ private:
KeyListJob *createKeyListJob(GpgME::Protocol proto) const
{
const CryptoBackend::Protocol *const cbp = CryptoBackendFactory::instance()->protocol(proto);
- return cbp ? cbp->keyListJob(true) : 0 ;
+ return cbp ? cbp->keyListJob(true) : 0;
}
ImportFromKeyserverJob *createImportJob(GpgME::Protocol proto) const
{
const CryptoBackend::Protocol *const cbp = CryptoBackendFactory::instance()->protocol(proto);
- return cbp ? cbp->importFromKeyserverJob() : 0 ;
+ return cbp ? cbp->importFromKeyserverJob() : 0;
}
void startKeyListJob(GpgME::Protocol proto, const QString &str);
bool checkConfig() const;
diff --git a/kleopatra/commands/refreshopenpgpcertscommand.cpp b/kleopatra/commands/refreshopenpgpcertscommand.cpp
index 18e2682..65f577b 100644
--- a/kleopatra/commands/refreshopenpgpcertscommand.cpp
+++ b/kleopatra/commands/refreshopenpgpcertscommand.cpp
@@ -129,7 +129,7 @@ QString RefreshOpenPGPCertsCommand::crashExitMessage(const QStringList &args) co
return xi18nc("@info",
"<para>The GPG process that tried to refresh OpenPGP certificates "
"ended prematurely because of an unexpected error.</para>"
- "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" "))) ;
+ "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" ")));
}
QString RefreshOpenPGPCertsCommand::errorExitMessage(const QStringList &args) const
diff --git a/kleopatra/commands/refreshx509certscommand.cpp b/kleopatra/commands/refreshx509certscommand.cpp
index 808ebde..bf98e43 100644
--- a/kleopatra/commands/refreshx509certscommand.cpp
+++ b/kleopatra/commands/refreshx509certscommand.cpp
@@ -92,7 +92,7 @@ QString RefreshX509CertsCommand::crashExitMessage(const QStringList &args) const
return xi18nc("@info",
"<para>The GpgSM process that tried to refresh X.509 certificates "
"ended prematurely because of an unexpected error.</para>"
- "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" "))) ;
+ "<para>Please check the output of <icode>%1</icode> for details.</para>", args.join(QStringLiteral(" ")));
}
QString RefreshX509CertsCommand::errorExitMessage(const QStringList &args) const
diff --git a/kleopatra/commands/selftestcommand.cpp b/kleopatra/commands/selftestcommand.cpp
index 7a43357..64fbeba 100644
--- a/kleopatra/commands/selftestcommand.cpp
+++ b/kleopatra/commands/selftestcommand.cpp
@@ -151,7 +151,7 @@ private:
tests.push_back(makeGpgSmEngineCheckSelfTest());
//Q_EMIT q->info( i18n("Checking gpgconf installation...") );
tests.push_back(makeGpgConfEngineCheckSelfTest());
- for (unsigned int i = 0 ; i < numComponents ; ++i) {
+ for (unsigned int i = 0; i < numComponents; ++i) {
//Q_EMIT q->info( i18n("Checking %1 configuration...", components[i]) );
tests.push_back(makeGpgConfCheckConfigurationSelfTest(components[i]));
}
diff --git a/kleopatra/commands/signencryptfilescommand.cpp b/kleopatra/commands/signencryptfilescommand.cpp
index 2a6f823..2639fe9 100644
--- a/kleopatra/commands/signencryptfilescommand.cpp
+++ b/kleopatra/commands/signencryptfilescommand.cpp
@@ -161,13 +161,13 @@ void SignEncryptFilesCommand::setSigningPolicy(Policy policy)
switch (policy) {
case NoPolicy:
case Allow:
- mode |= SignEncryptFilesController::SignAllowed ;
+ mode |= SignEncryptFilesController::SignAllowed;
break;
case Deny:
- mode |= SignEncryptFilesController::SignDisallowed ;
+ mode |= SignEncryptFilesController::SignDisallowed;
break;
case Force:
- mode |= SignEncryptFilesController::SignForced ;
+ mode |= SignEncryptFilesController::SignForced;
break;
}
try {
@@ -198,13 +198,13 @@ void SignEncryptFilesCommand::setEncryptionPolicy(Policy policy)
switch (policy) {
case NoPolicy:
case Allow:
- mode |= SignEncryptFilesController::EncryptAllowed ;
+ mode |= SignEncryptFilesController::EncryptAllowed;
break;
case Deny:
- mode |= SignEncryptFilesController::EncryptDisallowed ;
+ mode |= SignEncryptFilesController::EncryptDisallowed;
break;
case Force:
- mode |= SignEncryptFilesController::EncryptForced ;
+ mode |= SignEncryptFilesController::EncryptForced;
break;
}
try {
diff --git a/kleopatra/conf/appearanceconfigwidget.cpp b/kleopatra/conf/appearanceconfigwidget.cpp
index fdafbe2..8aad528 100644
--- a/kleopatra/conf/appearanceconfigwidget.cpp
+++ b/kleopatra/conf/appearanceconfigwidget.cpp
@@ -131,7 +131,7 @@ static void set(QListWidgetItem *item, bool on, void (QFont::*func)(bool))
return;
}
const QVariant v = item->data(Qt::FontRole);
- QFont font = v.isValid() && v.type() == QVariant::Font ? v.value<QFont>() : tryToFindFontFor(item) ;
+ QFont font = v.isValid() && v.type() == QVariant::Font ? v.value<QFont>() : tryToFindFontFor(item);
(font.*func)(on);
item->setData(Qt::FontRole, font);
}
@@ -203,7 +203,7 @@ static void erase_if_allowed(QListWidgetItem *item, int role, int allowRole)
static void erase_if_allowed(QListWidgetItem *item, const int role[], size_t numRoles, int allowRole)
{
if (item && item->data(allowRole).toBool())
- for (unsigned int i = 0 ; i < numRoles ; ++i) {
+ for (unsigned int i = 0; i < numRoles; ++i) {
item->setData(role[i], QVariant());
}
}
@@ -213,7 +213,7 @@ static void erase_if_allowed(QListWidgetItem *item, int role, const int allowRol
if (!item) {
return;
}
- for (unsigned int i = 0 ; i < numAllowRoles ; ++i)
+ for (unsigned int i = 0; i < numAllowRoles; ++i)
if (!item->data(allowRole[i]).toBool()) {
return;
}
@@ -226,11 +226,11 @@ static void erase_if_allowed(QListWidgetItem *item, const int role[], size_t num
if (!item) {
return;
}
- for (unsigned int i = 0 ; i < numAllowRoles ; ++i)
+ for (unsigned int i = 0; i < numAllowRoles; ++i)
if (!item->data(allowRole[i]).toBool()) {
return;
}
- for (unsigned int i = 0 ; i < numRoles ; ++i) {
+ for (unsigned int i = 0; i < numRoles; ++i) {
item->setData(role[i], QVariant());
}
}
@@ -409,7 +409,7 @@ void AppearanceConfigWidget::Private::slotSelectionChanged()
QListWidgetItem *AppearanceConfigWidget::Private::selectedItem() const
{
const QList<QListWidgetItem *> items = categoriesLV->selectedItems();
- return items.empty() ? 0 : items.front() ;
+ return items.empty() ? 0 : items.front();
}
void AppearanceConfigWidget::Private::enableDisableActions(QListWidgetItem *item)
@@ -451,7 +451,7 @@ void AppearanceConfigWidget::defaults()
{
// This simply means "default look for every category"
- for (int i = 0, end = d->categoriesLV->count() ; i != end ; ++i) {
+ for (int i = 0, end = d->categoriesLV->count(); i != end; ++i) {
set_default_appearance(d->categoriesLV->item(i));
}
d->tooltipValidityCheckBox->setChecked(true);
@@ -507,12 +507,12 @@ void AppearanceConfigWidget::save()
if (groups.isEmpty()) {
// If we created the default categories ourselves just now, then we need to make up their list
Q3ListViewItemIterator lvit(categoriesLV);
- for (; lvit.current() ; ++lvit) {
+ for (; lvit.current(); ++lvit) {
groups << lvit.current()->text(0);
}
}
#endif
- for (int i = 0, end = std::min(groups.size(), d->categoriesLV->count()) ; i != end ; ++i) {
+ for (int i = 0, end = std::min(groups.size(), d->categoriesLV->count()); i != end; ++i) {
const QListWidgetItem *const item = d->categoriesLV->item(i);
assert(item);
KConfigGroup group(config, groups[i]);
@@ -593,7 +593,7 @@ void AppearanceConfigWidget::Private::slotFontClicked()
bool ok = false;
const QFont defaultFont = tryToFindFontFor(item);
- const QFont initial = v.isValid() && v.type() == QVariant::Font ? v.value<QFont>() : defaultFont ;
+ const QFont initial = v.isValid() && v.type() == QVariant::Font ? v.value<QFont>() : defaultFont;
QFont f = QFontDialog::getFont(&ok, initial, q);
if (!ok) {
return;
diff --git a/kleopatra/conf/smimevalidationconfigurationwidget.cpp b/kleopatra/conf/smimevalidationconfigurationwidget.cpp
index ab4b81c..aab1e98 100644
--- a/kleopatra/conf/smimevalidationconfigurationwidget.cpp
+++ b/kleopatra/conf/smimevalidationconfigurationwidget.cpp
@@ -107,7 +107,7 @@ private:
{ disableLDAPCB, SIGNAL(toggled(bool)) },
{ customLDAPProxy, SIGNAL(textChanged(QString)) },
};
- for (unsigned int i = 0 ; i < sizeof sources / sizeof * sources ; ++i) {
+ for (unsigned int i = 0; i < sizeof sources / sizeof * sources; ++i) {
connect(sources[i].object, sources[i].signal, q, SIGNAL(changed()));
}
connect(useCustomHTTPProxyRB, SIGNAL(toggled(bool)),
diff --git a/kleopatra/crypto/certificateresolver.cpp b/kleopatra/crypto/certificateresolver.cpp
index 65f5fb8..3530f98 100644
--- a/kleopatra/crypto/certificateresolver.cpp
+++ b/kleopatra/crypto/certificateresolver.cpp
@@ -123,7 +123,7 @@ private:
mutable bool m_dirty;
};
-KConfigBasedRecipientPreferences::Private::Private(KSharedConfigPtr config , KConfigBasedRecipientPreferences *qq) : q(qq), m_config(config), m_parsed(false), m_dirty(false)
+KConfigBasedRecipientPreferences::Private::Private(KSharedConfigPtr config, KConfigBasedRecipientPreferences *qq) : q(qq), m_config(config), m_parsed(false), m_dirty(false)
{
assert(m_config);
}
@@ -223,7 +223,7 @@ private:
mutable bool m_dirty;
};
-KConfigBasedSigningPreferences::Private::Private(KSharedConfigPtr config , KConfigBasedSigningPreferences *qq) : q(qq), m_config(config), m_parsed(false), m_dirty(false)
+KConfigBasedSigningPreferences::Private::Private(KSharedConfigPtr config, KConfigBasedSigningPreferences *qq) : q(qq), m_config(config), m_parsed(false), m_dirty(false)
{
assert(m_config);
}
diff --git a/kleopatra/crypto/createchecksumscontroller.cpp b/kleopatra/crypto/createchecksumscontroller.cpp
index b8de6c3..2d14f78 100644
--- a/kleopatra/crypto/createchecksumscontroller.cpp
+++ b/kleopatra/crypto/createchecksumscontroller.cpp
@@ -165,7 +165,7 @@ static const bool HAVE_UNIX = true;
static const bool HAVE_UNIX = false;
#endif
-static const Qt::CaseSensitivity fs_cs = HAVE_UNIX ? Qt::CaseSensitive : Qt::CaseInsensitive ; // can we use QAbstractFileEngine::caseSensitive()?
+static const Qt::CaseSensitivity fs_cs = HAVE_UNIX ? Qt::CaseSensitive : Qt::CaseInsensitive; // can we use QAbstractFileEngine::caseSensitive()?
static QStringList fs_sort(QStringList l)
{
@@ -522,7 +522,7 @@ namespace
struct less_dir : std::binary_function<QDir, QDir, bool> {
bool operator()(const QDir &lhs, const QDir &rhs) const
{
- return QString::compare(lhs.absolutePath(), rhs.absolutePath(), fs_cs) < 0 ;
+ return QString::compare(lhs.absolutePath(), rhs.absolutePath(), fs_cs) < 0;
}
};
}
@@ -568,7 +568,7 @@ static std::vector<Dir> find_dirs_by_input_files(const QStringList &files, const
std::vector<Dir> dirs;
dirs.reserve(dirs2files.size());
- for (std::map<QDir, QStringList, less_dir>::const_iterator it = dirs2files.begin(), end = dirs2files.end() ; it != end ; ++it) {
+ for (std::map<QDir, QStringList, less_dir>::const_iterator it = dirs2files.begin(), end = dirs2files.end(); it != end; ++it) {
const QStringList inputFiles = remove_checksum_files(it->second, patterns);
if (inputFiles.empty()) {
@@ -672,7 +672,7 @@ void CreateChecksumsController::Private::run()
const function<void(int)> progressCb = boost::bind(&Private::progress, this, _1, 0, scanning);
const std::vector<Dir> dirs = haveSumFiles
? find_dirs_by_sum_files(files, allowAddition, progressCb, checksumDefinitions)
- : find_dirs_by_input_files(files, checksumDefinition, allowAddition, progressCb, checksumDefinitions) ;
+ : find_dirs_by_input_files(files, checksumDefinition, allowAddition, progressCb, checksumDefinitions);
Q_FOREACH (const Dir &dir, dirs) {
qCDebug(KLEOPATRA_LOG) << dir;
@@ -692,7 +692,7 @@ void CreateChecksumsController::Private::run()
//
// re-scale 'total' to fit into ints (wish QProgressDialog would use quint64...)
- const quint64 factor = total / std::numeric_limits<int>::max() + 1 ;
+ const quint64 factor = total / std::numeric_limits<int>::max() + 1;
quint64 done = 0;
Q_FOREACH (const Dir &dir, dirs) {
diff --git a/kleopatra/crypto/decryptverifyemailcontroller.cpp b/kleopatra/crypto/decryptverifyemailcontroller.cpp
index 2f0b187..44d98f7 100644
--- a/kleopatra/crypto/decryptverifyemailcontroller.cpp
+++ b/kleopatra/crypto/decryptverifyemailcontroller.cpp
@@ -95,8 +95,7 @@ public:
}
public Q_SLOTS:
- void accept() Q_DECL_OVERRIDE
- {
+ void accept() Q_DECL_OVERRIDE {
EMailOperationsPreferences prefs;
prefs.setDecryptVerifyPopupGeometry(geometry());
prefs.save();
@@ -320,7 +319,7 @@ std::vector< shared_ptr<AbstractDecryptVerifyTask> > DecryptVerifyEMailControlle
std::vector< shared_ptr<AbstractDecryptVerifyTask> > tasks;
- for (unsigned int i = 0 ; i < numInputs ; ++i) {
+ for (unsigned int i = 0; i < numInputs; ++i) {
shared_ptr<AbstractDecryptVerifyTask> task;
switch (m_operation) {
case Decrypt: {
diff --git a/kleopatra/crypto/decryptverifyfilescontroller.cpp b/kleopatra/crypto/decryptverifyfilescontroller.cpp
index 1d1f4bc..a2a8e95 100644
--- a/kleopatra/crypto/decryptverifyfilescontroller.cpp
+++ b/kleopatra/crypto/decryptverifyfilescontroller.cpp
@@ -139,7 +139,7 @@ shared_ptr<AbstractDecryptVerifyTask> DecryptVerifyFilesController::Private::tas
isOpenPGP(classification) ? OpenPGP :
isCMS(classification) ? CMS :
ad /* _needs_ the info */ ? throw Exception(gpg_error(GPG_ERR_CONFLICT), i18n("Cannot determine whether input data is OpenPGP or CMS")) :
- /* else we don't care */ UnknownProtocol ;
+ /* else we don't care */ UnknownProtocol;
const shared_ptr<Input> input = Input::createFromFile(fileName);
const shared_ptr<Output> output =
@@ -409,7 +409,7 @@ std::vector< shared_ptr<Task> > DecryptVerifyFilesController::Private::buildTask
kleo_assert(!useOutDir || outDir.exists());
std::vector<shared_ptr<Task> > tasks;
- for (unsigned int i = 0, end = fileNames.size() ; i != end ; ++i)
+ for (unsigned int i = 0, end = fileNames.size(); i != end; ++i)
try {
const QDir fileDir = QFileInfo(fileNames[i]).absoluteDir();
kleo_assert(fileDir.exists());
diff --git a/kleopatra/crypto/encryptemailcontroller.cpp b/kleopatra/crypto/encryptemailcontroller.cpp
index ba07255..85f86be 100644
--- a/kleopatra/crypto/encryptemailcontroller.cpp
+++ b/kleopatra/crypto/encryptemailcontroller.cpp
@@ -198,7 +198,7 @@ void EncryptEMailController::setInputsAndOutputs(const std::vector< shared_ptr<I
const std::vector<Key> keys = d->wizard->resolvedCertificates();
kleo_assert(!keys.empty());
- for (unsigned int i = 0, end = inputs.size() ; i < end ; ++i) {
+ for (unsigned int i = 0, end = inputs.size(); i < end; ++i) {
const shared_ptr<EncryptEMailTask> task(new EncryptEMailTask);
task->setInput(inputs[i]);
diff --git a/kleopatra/crypto/gui/decryptverifyfileswizard.cpp b/kleopatra/crypto/gui/decryptverifyfileswizard.cpp
index f056836..073d97c 100644
--- a/kleopatra/crypto/gui/decryptverifyfileswizard.cpp
+++ b/kleopatra/crypto/gui/decryptverifyfileswizard.cpp
@@ -267,7 +267,7 @@ void OperationsWidget::ensureIndexAvailable(unsigned int idx)
assert(qobject_cast<QBoxLayout *>(m_ui.scrollArea.widget()->layout()));
QBoxLayout &blay = *static_cast<QBoxLayout *>(m_ui.scrollArea.widget()->layout());
- for (unsigned int i = m_widgets.size() ; i < idx + 1 ; ++i) {
+ for (unsigned int i = m_widgets.size(); i < idx + 1; ++i) {
if (i) {
blay.insertWidget(blay.count() - 1, new HLine(m_ui.scrollArea.widget()));
}
diff --git a/kleopatra/crypto/gui/decryptverifyoperationwidget.cpp b/kleopatra/crypto/gui/decryptverifyoperationwidget.cpp
index d078d8a..6e54c2d 100644
--- a/kleopatra/crypto/gui/decryptverifyoperationwidget.cpp
+++ b/kleopatra/crypto/gui/decryptverifyoperationwidget.cpp
@@ -201,7 +201,7 @@ void DecryptVerifyOperationWidget::setMode(Mode mode, const shared_ptr<ArchiveDe
d->ui.signedDataLB.setBuddy(signedDataWidget);
d->ui.archiveCB.setChecked(ad.get() != 0);
- for (int i = 0, end = d->ui.archivesCB.count() ; i != end ; ++i)
+ for (int i = 0, end = d->ui.archivesCB.count(); i != end; ++i)
if (ad == d->ui.archivesCB.itemData(i).value< shared_ptr<ArchiveDefinition> >()) {
d->ui.archivesCB.setCurrentIndex(i);
return;
diff --git a/kleopatra/crypto/gui/newsignencryptfileswizard.cpp b/kleopatra/crypto/gui/newsignencryptfileswizard.cpp
index 6ca8c44..8dc19b1 100644
--- a/kleopatra/crypto/gui/newsignencryptfileswizard.cpp
+++ b/kleopatra/crypto/gui/newsignencryptfileswizard.cpp
@@ -96,7 +96,7 @@ enum Page {
static void enable_disable(QAbstractButton &button, const QAbstractItemView *view)
{
- const QItemSelectionModel *ism = view ? view->selectionModel() : 0 ;
+ const QItemSelectionModel *ism = view ? view->selectionModel() : 0;
button.setEnabled(ism && ism->hasSelection());
}
@@ -221,7 +221,7 @@ private:
static QStringList dummyFiles()
{
QStringList dummy;
- for (int i = 0 ; i < MaxLinesShownInline + 1 ; ++i) {
+ for (int i = 0; i < MaxLinesShownInline + 1; ++i) {
dummy.push_back(QString::number(i));
}
return dummy;
@@ -232,7 +232,7 @@ private:
return QLatin1String("<p>") + i18n("No files selected.") + QLatin1String("</p>");
}
QString html = QLatin1String("<p>") + i18np("Selected file:", "Selected files:", m_files.size()) + QLatin1String("</p>")
- + QLatin1String("<ul><li>") + join_max(m_files, MaxLinesShownInline, QStringLiteral("</li><li>")) + QLatin1String("</li></ul>") ;
+ + QLatin1String("<ul><li>") + join_max(m_files, MaxLinesShownInline, QStringLiteral("</li><li>")) + QLatin1String("</li></ul>");
if (m_files.size() > MaxLinesShownInline) {
html += QLatin1String("<p><a href=\"link:/\">") + i18nc("@action", "More...") + QLatin1String("</a></p>");
}
@@ -268,8 +268,8 @@ public Q_SLOTS:
if (ad == m_archiveDefinition) {
return;
}
- const QString oldExt = m_archiveDefinition ? m_archiveDefinition->extensions(m_protocol).front() : QString() ;
- const QString newExt = ad ? ad->extensions(m_protocol).front() : QString() ;
+ const QString oldExt = m_archiveDefinition ? m_archiveDefinition->extensions(m_protocol).front() : QString();
+ const QString newExt = ad ? ad->extensions(m_protocol).front() : QString();
QString fn = fileName();
if (fn.endsWith(oldExt)) {
fn.chop(oldExt.size() + 1);
@@ -282,7 +282,7 @@ public Q_SLOTS:
}
void setFileName(const QString &fn)
{
- const QString ext = m_archiveDefinition ? m_archiveDefinition->extensions(m_protocol).front() : QString() ;
+ const QString ext = m_archiveDefinition ? m_archiveDefinition->extensions(m_protocol).front() : QString();
if (m_archiveDefinition && !fn.endsWith(ext)) {
FileNameRequester::setFileName(fn + QLatin1Char('.') + ext);
} else {
@@ -332,17 +332,17 @@ public:
bool isSignEncryptSelected() const
{
- return field(QStringLiteral("signencrypt")).toBool() ;
+ return field(QStringLiteral("signencrypt")).toBool();
}
bool isSigningSelected() const
{
- return isSignOnlySelected() || isSignEncryptSelected() ;
+ return isSignOnlySelected() || isSignEncryptSelected();
}
bool isEncryptionSelected() const
{
- return isEncryptOnlySelected() || isSignEncryptSelected() ;
+ return isEncryptOnlySelected() || isSignEncryptSelected();
}
Protocol protocol() const
@@ -591,20 +591,19 @@ public:
&& (isSigningSelected() || isEncryptionSelected());
}
- bool validatePage() Q_DECL_OVERRIDE
- {
+ bool validatePage() Q_DECL_OVERRIDE {
if (isSignOnlySelected() && isArchiveRequested())
return KMessageBox::warningContinueCancel(this,
- xi18nc("@info",
- "<para>Archiving in combination with sign-only currently requires what are known as opaque signatures - "
- "unlike detached ones, these embed the content in the signature.</para>"
- "<para>This format is rather unusual. You might want to archive the files separately, "
- "and then sign the archive as one file with Kleopatra.</para>"
- "<para>Future versions of Kleopatra are expected to also support detached signatures in this case.</para>"),
- i18nc("@title:window", "Unusual Signature Warning"),
- KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
- QStringLiteral("signencryptfileswizard-archive+sign-only-warning"))
- == KMessageBox::Continue ;
+ xi18nc("@info",
+ "<para>Archiving in combination with sign-only currently requires what are known as opaque signatures - "
+ "unlike detached ones, these embed the content in the signature.</para>"
+ "<para>This format is rather unusual. You might want to archive the files separately, "
+ "and then sign the archive as one file with Kleopatra.</para>"
+ "<para>Future versions of Kleopatra are expected to also support detached signatures in this case.</para>"),
+ i18nc("@title:window", "Unusual Signature Warning"),
+ KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
+ QStringLiteral("signencryptfileswizard-archive+sign-only-warning"))
+ == KMessageBox::Continue;
else {
return true;
}
@@ -612,10 +611,9 @@ public:
int nextId() const Q_DECL_OVERRIDE
{
- return isEncryptionSelected() ? RecipientsPageId : SignerPageId ;
+ return isEncryptionSelected() ? RecipientsPageId : SignerPageId;
}
- void doSetPresetProtocol() Q_DECL_OVERRIDE
- {
+ void doSetPresetProtocol() Q_DECL_OVERRIDE {
updateSignEncryptArchiveWidgetStates();
}
@@ -651,15 +649,15 @@ private:
{
m_archiveCB.setEnabled(m_archiveUserMutable);
- const bool mustEncrypt = m_encryptionPreset && !m_encryptionUserMutable ;
- const bool mustSign = m_signingPreset && !m_signingUserMutable ;
+ const bool mustEncrypt = m_encryptionPreset && !m_encryptionUserMutable;
+ const bool mustSign = m_signingPreset && !m_signingUserMutable;
- const bool mayEncrypt = m_encryptionPreset || m_encryptionUserMutable ;
- const bool maySign = m_signingPreset || m_signingUserMutable ;
+ const bool mayEncrypt = m_encryptionPreset || m_encryptionUserMutable;
+ const bool maySign = m_signingPreset || m_signingUserMutable;
- const bool canSignEncrypt = protocol() != CMS && mayEncrypt && maySign ;
- const bool canSignOnly = maySign && !mustEncrypt ;
- const bool canEncryptOnly = mayEncrypt && !mustSign ;
+ const bool canSignEncrypt = protocol() != CMS && mayEncrypt && maySign;
+ const bool canSignOnly = maySign && !mustEncrypt;
+ const bool canEncryptOnly = mayEncrypt && !mustSign;
m_signencrypt.setEnabled(canSignEncrypt);
m_encrypt.setEnabled(canEncryptOnly);
@@ -779,24 +777,25 @@ public:
static bool need_grep(Protocol now, Protocol then)
{
- return now != UnknownProtocol && then == UnknownProtocol ;
+ return now != UnknownProtocol && then == UnknownProtocol;
}
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
setCommitPage(!isSigningSelected());
const Protocol currentEffectiveProtocol = effectiveProtocol();
- if (need_reload(currentEffectiveProtocol, m_lastEffectiveProtocol)) {
+ if (need_reload(currentEffectiveProtocol, m_lastEffectiveProtocol))
+ {
std::vector<Key> keys = KeyCache::instance()->keys();
_detail::grep_can_encrypt(keys);
if (currentEffectiveProtocol != UnknownProtocol) {
_detail::grep_protocol(keys, currentEffectiveProtocol);
}
m_unselectedKTV.setKeys(keys);
- } else if (need_grep(currentEffectiveProtocol, m_lastEffectiveProtocol)) {
+ } else if (need_grep(currentEffectiveProtocol, m_lastEffectiveProtocol))
+ {
remove_all_keys_not_xyz(m_unselectedKTV, currentEffectiveProtocol);
remove_all_keys_not_xyz(m_selectedKTV, currentEffectiveProtocol);
}
@@ -804,20 +803,20 @@ public:
m_lastEffectiveProtocol = currentEffectiveProtocol;
}
- bool validatePage() Q_DECL_OVERRIDE
- {
+ bool validatePage() Q_DECL_OVERRIDE {
const std::vector<Key> &r = keys();
- if (_detail::none_of_secret(r)) {
+ if (_detail::none_of_secret(r))
+ {
if (KMessageBox::warningContinueCancel(this,
- xi18nc("@info",
- "<para>None of the recipients you are encrypting to seems to be your own.</para>"
- "<para>This means that you will not be able to decrypt the data anymore, once encrypted.</para>"
- "<para>Do you want to continue, or cancel to change the recipient selection?</para>"),
- i18nc("@title:window", "Encrypt-To-Self Warning"),
- KStandardGuiItem::cont(),
- KStandardGuiItem::cancel(),
- QStringLiteral("warn-encrypt-to-non-self"), KMessageBox::Notify | KMessageBox::Dangerous)
- == KMessageBox::Cancel) {
+ xi18nc("@info",
+ "<para>None of the recipients you are encrypting to seems to be your own.</para>"
+ "<para>This means that you will not be able to decrypt the data anymore, once encrypted.</para>"
+ "<para>Do you want to continue, or cancel to change the recipient selection?</para>"),
+ i18nc("@title:window", "Encrypt-To-Self Warning"),
+ KStandardGuiItem::cont(),
+ KStandardGuiItem::cancel(),
+ QStringLiteral("warn-encrypt-to-non-self"), KMessageBox::Notify | KMessageBox::Dangerous)
+ == KMessageBox::Cancel) {
return false;
} else if (isRemoveUnencryptedFilesEnabled())
if (KMessageBox::warningContinueCancel(this,
@@ -935,13 +934,13 @@ public:
int nextId() const Q_DECL_OVERRIDE
{
- return ResultPageId ;
+ return ResultPageId;
}
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
- if (QWizard *wiz = wizard()) {
+ if (QWizard *wiz = wizard())
+ {
// need to do this here, since wizard() == 0 in the ctor
const NewSignEncryptFilesWizard *filesWizard = qobject_cast<NewSignEncryptFilesWizard *>(wiz);
disconnect(filesWizard, &NewSignEncryptFilesWizard::operationPrepared, this, &SignerPage::slotCommitSigningPreferences);
@@ -951,13 +950,15 @@ public:
bool pgp = effectiveProtocol() == OpenPGP;
bool cms = effectiveProtocol() == CMS;
- if (effectiveProtocol() == UnknownProtocol) {
+ if (effectiveProtocol() == UnknownProtocol)
+ {
pgp = cms = true;
}
assert(pgp || cms);
- if (isSignOnlySelected()) {
+ if (isSignOnlySelected())
+ {
// free choice of OpenPGP and/or CMS
// (except when protocol() requires otherwise):
pgpCB.setEnabled(pgp);
@@ -971,10 +972,12 @@ public:
// make up the recipients:
const std::vector<Key> &recipients = resolvedRecipients();
- if (_detail::none_of_protocol(recipients, OpenPGP)) {
+ if (_detail::none_of_protocol(recipients, OpenPGP))
+ {
pgp = false;
}
- if (_detail::none_of_protocol(recipients, CMS)) {
+ if (_detail::none_of_protocol(recipients, CMS))
+ {
cms = false;
}
@@ -986,10 +989,11 @@ public:
setButtonText(QWizard::CommitButton, i18nc("@action", "Sign && Encrypt"));
}
- if (!signPref) {
+ if (!signPref)
+ {
signPref.reset(new KConfigBasedSigningPreferences(KSharedConfig::openConfig()));
widget.setSelectedCertificates(signPref->preferredCertificate(OpenPGP),
- signPref->preferredCertificate(CMS));
+ signPref->preferredCertificate(CMS));
}
}
@@ -1207,12 +1211,12 @@ void NewSignEncryptFilesWizard::setFiles(const QStringList &files)
bool NewSignEncryptFilesWizard::isSigningSelected() const
{
- return field(QStringLiteral("sign")).toBool() || field(QStringLiteral("signencrypt")).toBool() ;
+ return field(QStringLiteral("sign")).toBool() || field(QStringLiteral("signencrypt")).toBool();
}
bool NewSignEncryptFilesWizard::isEncryptionSelected() const
{
- return field(QStringLiteral("encrypt")).toBool() || field(QStringLiteral("signencrypt")).toBool() ;
+ return field(QStringLiteral("encrypt")).toBool() || field(QStringLiteral("signencrypt")).toBool();
}
bool NewSignEncryptFilesWizard::isAsciiArmorEnabled() const
diff --git a/kleopatra/crypto/gui/signencryptemailconflictdialog.cpp b/kleopatra/crypto/gui/signencryptemailconflictdialog.cpp
index daa1c99..c3aab07 100644
--- a/kleopatra/crypto/gui/signencryptemailconflictdialog.cpp
+++ b/kleopatra/crypto/gui/signencryptemailconflictdialog.cpp
@@ -153,15 +153,15 @@ public Q_SLOTS:
}
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
- {
+ void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE {
QStylePainter p(this);
p.setPen(palette().color(QPalette::Text));
QStyleOptionComboBox opt;
initStyleOption(&opt);
p.drawComplexControl(QStyle::CC_ComboBox, opt);
- if (currentIndex() == -1) {
+ if (currentIndex() == -1)
+ {
opt.currentText = m_initialText;
opt.currentIcon = m_initialIcon;
}
@@ -208,7 +208,7 @@ public:
{
std::vector<Key> result;
result.reserve(count());
- for (int i = 0, end = count() ; i != end ; ++i) {
+ for (int i = 0, end = count(); i != end; ++i) {
result.push_back(qvariant_cast<Key>(itemData(i)));
}
return result;;
@@ -216,7 +216,7 @@ public:
int findOrAdd(const Key &key)
{
- for (int i = 0, end = count() ; i != end ; ++i)
+ for (int i = 0, end = count(); i != end; ++i)
if (_detail::ByFingerprint<std::equal_to>()(key, qvariant_cast<Key>(itemData(i)))) {
return i;
}
@@ -350,7 +350,7 @@ public:
bool wasInitiallyAmbiguous(Protocol proto) const
{
- return (proto == OpenPGP && pgpAmbiguous)
+ return (proto == OpenPGP && pgpAmbiguous)
|| (proto == CMS && cmsAmbiguous);
}
@@ -358,7 +358,7 @@ public:
{
kleo_assert(proto == OpenPGP || proto == CMS);
const KeysComboBox *const cb = comboBox(proto);
- return cb->currentIndex() == -1 ;
+ return cb->currentIndex() == -1;
}
Key key(Protocol proto) const
@@ -441,7 +441,7 @@ static QString make_top_label_conflict_text(bool sign, bool enc)
enc ? i18n("Kleopatra cannot unambiguously determine matching certificates "
"for all recipients of the message.\n"
"Please select the correct certificates for each recipient:") :
- /* else */ (kleo_assert_fail(sign || enc), QString()) ;
+ /* else */ (kleo_assert_fail(sign || enc), QString());
}
static QString make_top_label_quickmode_text(bool sign, bool enc)
@@ -449,7 +449,7 @@ static QString make_top_label_quickmode_text(bool sign, bool enc)
return
enc ? i18n("Please verify that correct certificates have been selected for each recipient:") :
sign ? i18n("Please verify that the correct certificate has been selected for the sender:") :
- /*else*/ (kleo_assert_fail(sign || enc), QString()) ;
+ /*else*/ (kleo_assert_fail(sign || enc), QString());
}
class SignEncryptEMailConflictDialog::Private
@@ -481,7 +481,7 @@ private:
const Protocol proto = q->selectedProtocol();
const bool quickMode = q->isQuickMode();
- const bool needProtocolSelection = presetProtocol == UnknownProtocol ;
+ const bool needProtocolSelection = presetProtocol == UnknownProtocol;
const bool needShowAllRecipientsCB =
quickMode ? false :
@@ -861,7 +861,7 @@ void SignEncryptEMailConflictDialog::pickProtocol()
bool SignEncryptEMailConflictDialog::isComplete() const
{
const Protocol proto = selectedProtocol();
- return proto != UnknownProtocol && d->isComplete(proto) ;
+ return proto != UnknownProtocol && d->isComplete(proto);
}
bool SignEncryptEMailConflictDialog::Private::isComplete(Protocol proto) const
@@ -888,12 +888,12 @@ static std::vector<Key> get_keys(const std::vector<Line> &lines, Protocol proto)
std::vector<Key> SignEncryptEMailConflictDialog::resolvedSigningKeys() const
{
- return d->sign ? get_keys(d->ui.signers, selectedProtocol()) : std::vector<Key>() ;
+ return d->sign ? get_keys(d->ui.signers, selectedProtocol()) : std::vector<Key>();
}
std::vector<Key> SignEncryptEMailConflictDialog::resolvedEncryptionKeys() const
{
- return d->encrypt ? get_keys(d->ui.recipients, selectedProtocol()) : std::vector<Key>() ;
+ return d->encrypt ? get_keys(d->ui.recipients, selectedProtocol()) : std::vector<Key>();
}
void SignEncryptEMailConflictDialog::setQuickMode(bool on)
diff --git a/kleopatra/crypto/gui/verifychecksumsdialog.cpp b/kleopatra/crypto/gui/verifychecksumsdialog.cpp
index 0359d96..594d6ff 100644
--- a/kleopatra/crypto/gui/verifychecksumsdialog.cpp
+++ b/kleopatra/crypto/gui/verifychecksumsdialog.cpp
@@ -136,7 +136,7 @@ public Q_SLOTS:
QHash<QString, VerifyChecksumsDialog::Status> oldStatusMap;
swap(statusMap, oldStatusMap);
- for (QHash<QString, VerifyChecksumsDialog::Status>::const_iterator it = oldStatusMap.constBegin(), end = oldStatusMap.constEnd() ; it != end ; ++it) {
+ for (QHash<QString, VerifyChecksumsDialog::Status>::const_iterator it = oldStatusMap.constBegin(), end = oldStatusMap.constEnd(); it != end; ++it) {
emitDataChangedFor(it.key());
}
}
@@ -158,7 +158,7 @@ private:
static int find_layout_item(const QBoxLayout &blay)
{
- for (int i = 0, end = blay.count() ; i < end ; ++i)
+ for (int i = 0, end = blay.count(); i < end; ++i)
if (QLayoutItem *item = blay.itemAt(i))
if (item->layout()) {
return i;
@@ -331,12 +331,12 @@ private:
{
// create new BaseWidgets:
- for (unsigned int i = baseWidgets.size(), end = bases.size() ; i < end ; ++i) {
+ for (unsigned int i = baseWidgets.size(), end = bases.size(); i < end; ++i) {
baseWidgets.push_back(new BaseWidget(model, vlay.parentWidget(), &vlay));
}
// shed surplus BaseWidgets:
- for (unsigned int i = bases.size(), end = baseWidgets.size() ; i < end ; ++i) {
+ for (unsigned int i = bases.size(), end = baseWidgets.size(); i < end; ++i) {
delete baseWidgets.back();
baseWidgets.pop_back();
}
@@ -344,7 +344,7 @@ private:
assert(static_cast<unsigned>(bases.size()) == baseWidgets.size());
// update bases:
- for (unsigned int i = 0 ; i < baseWidgets.size() ; ++i) {
+ for (unsigned int i = 0; i < baseWidgets.size(); ++i) {
baseWidgets[i]->setBase(bases[i]);
}
@@ -360,7 +360,7 @@ private:
{
const int tot = progressBar.maximum();
const int cur = progressBar.value();
- return !tot || cur != tot ;
+ return !tot || cur != tot;
}
} ui;
diff --git a/kleopatra/crypto/newsignencryptemailcontroller.cpp b/kleopatra/crypto/newsignencryptemailcontroller.cpp
index fd923fd..34b3ccf 100644
--- a/kleopatra/crypto/newsignencryptemailcontroller.cpp
+++ b/kleopatra/crypto/newsignencryptemailcontroller.cpp
@@ -433,7 +433,7 @@ void NewSignEncryptEMailController::startEncryption(const std::vector< shared_pt
kleo_assert(!d->recipients.empty());
- for (unsigned int i = 0, end = inputs.size() ; i < end ; ++i) {
+ for (unsigned int i = 0, end = inputs.size(); i < end; ++i) {
const shared_ptr<EncryptEMailTask> task(new EncryptEMailTask);
@@ -482,7 +482,7 @@ void NewSignEncryptEMailController::startSigning(const std::vector< shared_ptr<I
kleo_assert(!d->signers.empty());
kleo_assert(kdtools::none_of(d->signers, mem_fn(&Key::isNull)));
- for (unsigned int i = 0, end = inputs.size() ; i < end ; ++i) {
+ for (unsigned int i = 0, end = inputs.size(); i < end; ++i) {
const shared_ptr<SignEMailTask> task(new SignEMailTask);
diff --git a/kleopatra/crypto/recipient.cpp b/kleopatra/crypto/recipient.cpp
index 1e40477..1cd8880 100644
--- a/kleopatra/crypto/recipient.cpp
+++ b/kleopatra/crypto/recipient.cpp
@@ -57,20 +57,20 @@ namespace Types
static bool operator==(const AddrSpec &lhs, const AddrSpec &rhs)
{
return lhs.localPart == rhs.localPart
- && lhs.domain == rhs.domain ;
+ && lhs.domain == rhs.domain;
}
static bool operator==(const Mailbox &lhs, const Mailbox &rhs)
{
return lhs.name() == rhs.name()
- && lhs.addrSpec() == rhs.addrSpec() ;
+ && lhs.addrSpec() == rhs.addrSpec();
}
static bool determine_ambiguous(const Mailbox &mb, const std::vector<Key> &keys)
{
Q_UNUSED(mb);
// ### really do check when we don't only show matching keys
- return keys.size() != 1 ;
+ return keys.size() != 1;
}
} // namespace Types
@@ -152,7 +152,7 @@ const std::vector<Key> &Recipient::encryptionCertificateCandidates(GpgME::Protoc
proto == OpenPGP ? d->pgpEncryptionKeys :
proto == CMS ? d->cmsEncryptionKeys :
// even though gcc warns about this line, it's completely ok, promise:
- kleo_assert_fail(proto == OpenPGP || proto == CMS) ;
+ kleo_assert_fail(proto == OpenPGP || proto == CMS);
#endif
}
diff --git a/kleopatra/crypto/recipient.h b/kleopatra/crypto/recipient.h
index e7bd1ea..94b92a1 100644
--- a/kleopatra/crypto/recipient.h
+++ b/kleopatra/crypto/recipient.h
@@ -88,7 +88,7 @@ public:
friend inline bool operator==(const Recipient &lhs, const Recipient &rhs)
{
- return rhs.d == lhs.d || lhs.deepEquals(rhs) ;
+ return rhs.d == lhs.d || lhs.deepEquals(rhs);
}
private:
diff --git a/kleopatra/crypto/sender.cpp b/kleopatra/crypto/sender.cpp
index a29ed6e..cc581c6 100644
--- a/kleopatra/crypto/sender.cpp
+++ b/kleopatra/crypto/sender.cpp
@@ -57,20 +57,20 @@ namespace Types
static bool operator==(const AddrSpec &lhs, const AddrSpec &rhs)
{
return lhs.localPart == rhs.localPart
- && lhs.domain == rhs.domain ;
+ && lhs.domain == rhs.domain;
}
static bool operator==(const Mailbox &lhs, const Mailbox &rhs)
{
return lhs.name() == rhs.name()
- && lhs.addrSpec() == rhs.addrSpec() ;
+ && lhs.addrSpec() == rhs.addrSpec();
}
static bool determine_ambiguous(const Mailbox &mb, const std::vector<Key> &keys)
{
Q_UNUSED(mb);
// ### really do check when we don't only show matching keys
- return keys.size() != 1 ;
+ return keys.size() != 1;
}
} // namespace Types
} // namespace KMime
@@ -167,7 +167,7 @@ const std::vector<Key> &Sender::signingCertificateCandidates(GpgME::Protocol pro
proto == OpenPGP ? d->pgpSigners :
proto == CMS ? d->cmsSigners :
// even though gcc warns about this line, it's completely ok, promise:
- kleo_assert_fail(proto == OpenPGP || proto == CMS) ;
+ kleo_assert_fail(proto == OpenPGP || proto == CMS);
#endif
}
@@ -185,7 +185,7 @@ const std::vector<Key> &Sender::encryptToSelfCertificateCandidates(GpgME::Protoc
proto == OpenPGP ? d->pgpEncryptToSelfKeys :
proto == CMS ? d->cmsEncryptToSelfKeys :
// even though gcc warns about this line, it's completely ok, promise:
- kleo_assert_fail(proto == OpenPGP || proto == CMS) ;
+ kleo_assert_fail(proto == OpenPGP || proto == CMS);
#endif
}
diff --git a/kleopatra/crypto/signemailcontroller.cpp b/kleopatra/crypto/signemailcontroller.cpp
index ba6a858..eb0d3b1 100644
--- a/kleopatra/crypto/signemailcontroller.cpp
+++ b/kleopatra/crypto/signemailcontroller.cpp
@@ -211,7 +211,7 @@ void SignEMailController::setInputsAndOutputs(const std::vector< shared_ptr<Inpu
const std::vector<Key> keys = d->wizard->resolvedSigners();
kleo_assert(!keys.empty());
- for (unsigned int i = 0, end = inputs.size() ; i < end ; ++i) {
+ for (unsigned int i = 0, end = inputs.size(); i < end; ++i) {
const shared_ptr<SignEMailTask> task(new SignEMailTask);
task->setInput(inputs[i]);
diff --git a/kleopatra/crypto/signemailtask.cpp b/kleopatra/crypto/signemailtask.cpp
index 15fb358..0345342 100644
--- a/kleopatra/crypto/signemailtask.cpp
+++ b/kleopatra/crypto/signemailtask.cpp
@@ -250,7 +250,7 @@ static QString collect_micalgs(const GpgME::SigningResult &result, GpgME::Protoc
boost::bind(&QString::toLower, boost::bind(&QString::fromLatin1, boost::bind(&GpgME::CreatedSignature::hashAlgorithmAsString, _1), -1)));
#endif
if (proto == GpgME::OpenPGP)
- for (QStringList::iterator it = micalgs.begin(), end = micalgs.end() ; it != end ; ++it) {
+ for (QStringList::iterator it = micalgs.begin(), end = micalgs.end(); it != end; ++it) {
it->prepend(QStringLiteral("pgp-"));
}
micalgs.sort();
diff --git a/kleopatra/crypto/signencryptfilescontroller.cpp b/kleopatra/crypto/signencryptfilescontroller.cpp
index 34c7fbf..7c09e73 100644
--- a/kleopatra/crypto/signencryptfilescontroller.cpp
+++ b/kleopatra/crypto/signencryptfilescontroller.cpp
@@ -309,13 +309,13 @@ void SignEncryptFilesController::start()
static const char *extension(bool pgp, bool sign, bool encrypt, bool ascii, bool detached)
{
- unsigned int cls = pgp ? Class::OpenPGP : Class::CMS ;
+ unsigned int cls = pgp ? Class::OpenPGP : Class::CMS;
if (encrypt) {
cls |= Class::CipherText;
} else if (sign) {
- cls |= detached ? Class::DetachedSignature : Class::OpaqueSignature ;
+ cls |= detached ? Class::DetachedSignature : Class::OpaqueSignature;
}
- cls |= ascii ? Class::Ascii : Class::Binary ;
+ cls |= ascii ? Class::Ascii : Class::Binary;
if (const char *const ext = outputFileExtension(cls)) {
return ext;
} else {
@@ -370,7 +370,7 @@ createArchiveSignEncryptTaskForFiles(const QStringList &files, const QString &ou
kleo_assert(ad);
- const Protocol proto = pgp ? OpenPGP : CMS ;
+ const Protocol proto = pgp ? OpenPGP : CMS;
task->setInputFileNames(files);
task->setInput(ad->createInputFromPackCommand(proto, files));
diff --git a/kleopatra/crypto/signencryptfilestask.cpp b/kleopatra/crypto/signencryptfilestask.cpp
index 018b095..91d29a7 100644
--- a/kleopatra/crypto/signencryptfilestask.cpp
+++ b/kleopatra/crypto/signencryptfilestask.cpp
@@ -462,7 +462,7 @@ QString SignEncryptFilesTask::tag() const
unsigned long long SignEncryptFilesTask::inputSize() const
{
- return d->input ? d->input->size() : 0U ;
+ return d->input ? d->input->size() : 0U;
}
void SignEncryptFilesTask::doStart()
@@ -673,7 +673,7 @@ QString SignEncryptFilesResult::errorString() const
return
sign ? makeResultDetails(m_sresult, m_inputErrorString, m_outputErrorString) :
- /*else*/ makeResultDetails(m_eresult, m_inputErrorString, m_outputErrorString) ;
+ /*else*/ makeResultDetails(m_eresult, m_inputErrorString, m_outputErrorString);
}
Task::Result::VisualCode SignEncryptFilesResult::code() const
diff --git a/kleopatra/crypto/task_p.h b/kleopatra/crypto/task_p.h
index 1c37d9e..2557bbb 100644
--- a/kleopatra/crypto/task_p.h
+++ b/kleopatra/crypto/task_p.h
@@ -63,8 +63,7 @@ public:
}
void cancel() Q_DECL_OVERRIDE {}
private:
- void doStart() Q_DECL_OVERRIDE
- {
+ void doStart() Q_DECL_OVERRIDE {
QTimer::singleShot(0, this, &SimpleTask::slotEmitResult);
}
unsigned long long inputSize() const Q_DECL_OVERRIDE
diff --git a/kleopatra/crypto/verifychecksumscontroller.cpp b/kleopatra/crypto/verifychecksumscontroller.cpp
index 33f5164..4701009 100644
--- a/kleopatra/crypto/verifychecksumscontroller.cpp
+++ b/kleopatra/crypto/verifychecksumscontroller.cpp
@@ -79,7 +79,7 @@ static const bool HAVE_UNIX = false;
static const QLatin1String CHECKSUM_DEFINITION_ID_ENTRY("checksum-definition-id");
-static const Qt::CaseSensitivity fs_cs = HAVE_UNIX ? Qt::CaseSensitive : Qt::CaseInsensitive ; // can we use QAbstractFileEngine::caseSensitive()?
+static const Qt::CaseSensitivity fs_cs = HAVE_UNIX ? Qt::CaseSensitive : Qt::CaseInsensitive; // can we use QAbstractFileEngine::caseSensitive()?
#if 0
static QStringList fs_sort(QStringList l)
@@ -359,13 +359,13 @@ namespace
struct less_dir : std::binary_function<QDir, QDir, bool> {
bool operator()(const QDir &lhs, const QDir &rhs) const
{
- return QString::compare(lhs.absolutePath(), rhs.absolutePath(), fs_cs) < 0 ;
+ return QString::compare(lhs.absolutePath(), rhs.absolutePath(), fs_cs) < 0;
}
};
struct less_file : std::binary_function<QString, QString, bool> {
bool operator()(const QString &lhs, const QString &rhs) const
{
- return QString::compare(lhs, rhs, fs_cs) < 0 ;
+ return QString::compare(lhs, rhs, fs_cs) < 0;
}
};
struct sumfile_contains_file : std::unary_function<QString, bool> {
@@ -412,7 +412,7 @@ static QStringList find_base_directiories(const QStringList &files)
std::set<QDir, less_dir> dirs;
Q_FOREACH (const QString &file, files) {
const QFileInfo fi(file);
- const QDir dir = fi.isDir() ? QDir(file) : fi.dir() ;
+ const QDir dir = fi.isDir() ? QDir(file) : fi.dir();
dirs.insert(dir);
}
@@ -496,7 +496,7 @@ static std::vector<SumFile> find_sums_by_input_files(const QStringList &files, Q
std::vector<SumFile> sumfiles;
sumfiles.reserve(dirs2sums.size());
- for (std::map<QDir, std::set<QString, less_file>, less_dir>::const_iterator it = dirs2sums.begin(), end = dirs2sums.end() ; it != end ; ++it) {
+ for (std::map<QDir, std::set<QString, less_file>, less_dir>::const_iterator it = dirs2sums.begin(), end = dirs2sums.end(); it != end; ++it) {
if (it->second.empty()) {
continue;
@@ -544,11 +544,11 @@ static const struct {
{ "OK", VerifyChecksumsDialog::OK },
{ "FAILED", VerifyChecksumsDialog::Failed },
};
-static const size_t numStatusStrings = sizeof statusStrings / sizeof * statusStrings ;
+static const size_t numStatusStrings = sizeof statusStrings / sizeof * statusStrings;
static VerifyChecksumsDialog::Status string2status(const QByteArray &str)
{
- for (unsigned int i = 0 ; i < numStatusStrings ; ++i)
+ for (unsigned int i = 0; i < numStatusStrings; ++i)
if (str == statusStrings[i].string) {
return statusStrings[i].status;
}
@@ -659,7 +659,7 @@ void VerifyChecksumsController::Private::run()
const QStringList env = c_lang_environment();
// re-scale 'total' to fit into ints (wish QProgressDialog would use quint64...)
- const quint64 factor = total / std::numeric_limits<int>::max() + 1 ;
+ const quint64 factor = total / std::numeric_limits<int>::max() + 1;
quint64 done = 0;
Q_FOREACH (const SumFile &sumFile, sumfiles) {
diff --git a/kleopatra/dialogs/adduseriddialog.cpp b/kleopatra/dialogs/adduseriddialog.cpp
index accd9b4..9432d61 100644
--- a/kleopatra/dialogs/adduseriddialog.cpp
+++ b/kleopatra/dialogs/adduseriddialog.cpp
@@ -84,7 +84,7 @@ static QString attributeLabel(const QString &attr, bool pgp)
if (attr.isEmpty()) {
return QString();
}
- const QString label = /*pgp ?*/ pgpLabel(attr) /*: Kleo::DNAttributeMapper::instance()->name2label( attr )*/ ;
+ const QString label = /*pgp ?*/ pgpLabel(attr) /*: Kleo::DNAttributeMapper::instance()->name2label( attr )*/;
if (!label.isEmpty())
if (pgp) {
return label;
@@ -214,13 +214,13 @@ private:
int row;
QValidator *validator = 0;
if (attr == QLatin1String("EMAIL")) {
- validator = regex.isEmpty() ? Validation::email() : Validation::email(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::email() : Validation::email(QRegExp(regex));
row = row_index_of(emailLE, gridLayout);
} else if (attr == QLatin1String("NAME")) {
- validator = regex.isEmpty() ? Validation::pgpName() : Validation::pgpName(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::pgpName() : Validation::pgpName(QRegExp(regex));
row = row_index_of(nameLE, gridLayout);
} else if (attr == QLatin1String("COMMENT")) {
- validator = regex.isEmpty() ? Validation::pgpComment() : Validation::pgpComment(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::pgpComment() : Validation::pgpComment(QRegExp(regex));
row = row_index_of(commentLE, gridLayout);
} else {
continue;
@@ -285,7 +285,7 @@ static bool has_intermediate_input(const QLineEdit *le)
QString text = le->text();
int pos = le->cursorPosition();
const QValidator *const v = le->validator();
- return !v || v->validate(text, pos) == QValidator::Intermediate ;
+ return !v || v->validate(text, pos) == QValidator::Intermediate;
}
static bool requirementsAreMet(const QVector<Line> &list, QString &error)
diff --git a/kleopatra/dialogs/certificatedetailsdialog.cpp b/kleopatra/dialogs/certificatedetailsdialog.cpp
index 9379060..d6265f5 100644
--- a/kleopatra/dialogs/certificatedetailsdialog.cpp
+++ b/kleopatra/dialogs/certificatedetailsdialog.cpp
@@ -446,8 +446,8 @@ private:
const QBrush &fg = ui.chainTW->palette().brush(QPalette::Disabled, QPalette::WindowText);
last->setForeground(0, fg);
}
- for (std::vector<Key>::const_reverse_iterator it = chain.rbegin(), end = chain.rend() ; it != end ; ++it) {
- last = last ? new QTreeWidgetItem(last) : new QTreeWidgetItem(ui.chainTW) ;
+ for (std::vector<Key>::const_reverse_iterator it = chain.rbegin(), end = chain.rend(); it != end; ++it) {
+ last = last ? new QTreeWidgetItem(last) : new QTreeWidgetItem(ui.chainTW);
last->setText(0, DN(it->userID(0).id()).prettyDN());
//last->setSelectable( true );
}
@@ -493,7 +493,7 @@ private:
setupUi(mainWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Help |
- QDialogButtonBox::Close);
+ QDialogButtonBox::Close);
chainTW->header()->setResizeMode(0, QHeaderView::Stretch);
dumpLTW->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
@@ -509,8 +509,8 @@ private:
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qq, &QDialog::reject);
QObject::connect(buttonBox, &QDialogButtonBox::helpRequested, qq, [] {
- KHelpClient::invokeHelp(QStringLiteral("kleopatra"));
- });
+ KHelpClient::invokeHelp(QStringLiteral("kleopatra"));
+ });
}
} ui;
};
diff --git a/kleopatra/dialogs/certificateselectiondialog.cpp b/kleopatra/dialogs/certificateselectiondialog.cpp
index f510bb4..7eff9dd 100644
--- a/kleopatra/dialogs/certificateselectiondialog.cpp
+++ b/kleopatra/dialogs/certificateselectiondialog.cpp
@@ -275,7 +275,7 @@ std::vector<Key> CertificateSelectionDialog::selectedCertificates() const
Key CertificateSelectionDialog::selectedCertificate() const
{
const std::vector<Key> keys = selectedCertificates();
- return keys.empty() ? Key() : keys.front() ;
+ return keys.empty() ? Key() : keys.front();
}
void CertificateSelectionDialog::hideEvent(QHideEvent *e)
@@ -290,7 +290,7 @@ void CertificateSelectionDialog::hideEvent(QHideEvent *e)
void CertificateSelectionDialog::Private::slotKeysMayHaveChanged()
{
q->setEnabled(true);
- std::vector<Key> keys = (options & SecretKeys) ? KeyCache::instance()->secretKeys() : KeyCache::instance()->keys() ;
+ std::vector<Key> keys = (options & SecretKeys) ? KeyCache::instance()->secretKeys() : KeyCache::instance()->keys();
filterAllowedKeys(keys);
const std::vector<Key> selected = q->selectedCertificates();
if (AbstractKeyListModel *const model = ui.tabWidget.flatModel()) {
diff --git a/kleopatra/dialogs/certifycertificatedialog.cpp b/kleopatra/dialogs/certifycertificatedialog.cpp
index 54b2cc1..6960b26 100644
--- a/kleopatra/dialogs/certifycertificatedialog.cpp
+++ b/kleopatra/dialogs/certifycertificatedialog.cpp
@@ -83,7 +83,7 @@ void UserIDModel::setCertificateToCertify(const Key &key)
void UserIDModel::setCheckedUserIDs(const std::vector<unsigned int> &uids)
{
const std::vector<unsigned int> sorted = kdtools::sorted(uids);
- for (unsigned int i = 0, end = rowCount() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = rowCount(); i != end; ++i) {
item(i)->setCheckState(kdtools::binary_search(sorted, i) ? Qt::Checked : Qt::Unchecked);
}
}
@@ -354,7 +354,7 @@ public:
Key key() const
{
- return selectUserIDsPage ? selectUserIDsPage->certificateToCertify() : Key() ;
+ return selectUserIDsPage ? selectUserIDsPage->certificateToCertify() : Key();
}
void ensureSummaryPageVisible();
@@ -473,7 +473,7 @@ struct UidEqual : std::binary_function<UserID, UserID, bool> {
{
return qstrcmp(lhs.parent().primaryFingerprint(),
rhs.parent().primaryFingerprint()) == 0
- && qstrcmp(lhs.id(), rhs.id()) == 0 ;
+ && qstrcmp(lhs.id(), rhs.id()) == 0;
}
};
}
diff --git a/kleopatra/dialogs/expirydialog.cpp b/kleopatra/dialogs/expirydialog.cpp
index b14699f..9ace42d 100644
--- a/kleopatra/dialogs/expirydialog.cpp
+++ b/kleopatra/dialogs/expirydialog.cpp
@@ -168,7 +168,7 @@ QDate ExpiryDialog::dateOfExpiry() const
return
d->ui.inRB->isChecked() ? d->inDate() :
d->ui.onRB->isChecked() ? d->ui.onCW->selectedDate() :
- QDate() ;
+ QDate();
}
void ExpiryDialog::Private::slotInUnitChanged()
diff --git a/kleopatra/dialogs/exportsecretkeydialog.cpp b/kleopatra/dialogs/exportsecretkeydialog.cpp
index a2f1bc4..9c84dfe 100644
--- a/kleopatra/dialogs/exportsecretkeydialog.cpp
+++ b/kleopatra/dialogs/exportsecretkeydialog.cpp
@@ -112,7 +112,7 @@ private:
}
bool found = false;
- for (unsigned int i = 0 ; i < sizeof extensions / sizeof * extensions ; ++i)
+ for (unsigned int i = 0; i < sizeof extensions / sizeof * extensions; ++i)
if (fn.endsWith(QLatin1String(extensions[i]), Qt::CaseInsensitive)) {
fn.chop(4);
found = true;
@@ -142,7 +142,7 @@ private:
outputFileFR->setFilter(QDir::Files);
outputFileFR->setNameFilter(i18n("Secret Key Files (*.pem *.p12 *.gpg *.asc *.pgp)"));
- for (unsigned int i = 0 ; i < numCharsets ; ++i) {
+ for (unsigned int i = 0; i < numCharsets; ++i) {
charsetCB->addItem(QString::fromLatin1(charsets[i]));
}
charsetCB->setCurrentIndex(0);
@@ -187,7 +187,7 @@ QString ExportSecretKeyDialog::fileName() const
void ExportSecretKeyDialog::setCharset(const QByteArray &charset)
{
- for (unsigned int i = 0 ; i < sizeof charsets / sizeof * charsets ; ++i)
+ for (unsigned int i = 0; i < sizeof charsets / sizeof * charsets; ++i)
if (charset == charsets[i]) {
d->ui.charsetCB->setCurrentIndex(i);
return;
diff --git a/kleopatra/dialogs/selftestdialog.cpp b/kleopatra/dialogs/selftestdialog.cpp
index 1d34146..084b7e5 100644
--- a/kleopatra/dialogs/selftestdialog.cpp
+++ b/kleopatra/dialogs/selftestdialog.cpp
@@ -87,7 +87,7 @@ public:
int rowCount(const QModelIndex &idx) const Q_DECL_OVERRIDE
{
- return idx.isValid() ? 0 : m_tests.size() ;
+ return idx.isValid() ? 0 : m_tests.size();
}
int columnCount(const QModelIndex &) const Q_DECL_OVERRIDE
{
@@ -206,7 +206,7 @@ private:
if (!src_parent.isValid() && src_row >= 0 &&
src_row < model->rowCount(src_parent)) {
if (const shared_ptr<SelfTest> &t = model->at(src_row)) {
- return !t->passed() ;
+ return !t->passed();
} else {
qCWarning(KLEOPATRA_LOG) << "NULL test??";
}
@@ -301,7 +301,7 @@ private:
return QModelIndex();
}
const QModelIndexList mil = ism->selectedRows();
- return mil.empty() ? QModelIndex() : proxy.mapToSource(mil.front()) ;
+ return mil.empty() ? QModelIndex() : proxy.mapToSource(mil.front());
}
int selectedRowIndex() const
{
diff --git a/kleopatra/dialogs/setinitialpindialog.cpp b/kleopatra/dialogs/setinitialpindialog.cpp
index 69c75b6..908ec4c 100644
--- a/kleopatra/dialogs/setinitialpindialog.cpp
+++ b/kleopatra/dialogs/setinitialpindialog.cpp
@@ -188,13 +188,13 @@ SetInitialPinDialog::~SetInitialPinDialog() {}
void SetInitialPinDialog::setNksPinPresent(bool on)
{
- d->nksState = on ? AlreadySet : NotSet ;
+ d->nksState = on ? AlreadySet : NotSet;
d->updateWidgets();
}
void SetInitialPinDialog::setSigGPinPresent(bool on)
{
- d->sigGState = on ? AlreadySet : NotSet ;
+ d->sigGState = on ? AlreadySet : NotSet;
d->updateWidgets();
}
@@ -204,7 +204,7 @@ void SetInitialPinDialog::setNksPinSettingResult(const Error &err)
d->nksState =
err.isCanceled() ? NotSet :
err ? Failed :
- Ok ;
+ Ok;
d->updateWidgets();
}
@@ -214,7 +214,7 @@ void SetInitialPinDialog::setSigGPinSettingResult(const Error &err)
d->sigGState =
err.isCanceled() ? NotSet :
err ? Failed :
- Ok ;
+ Ok;
d->updateWidgets();
}
diff --git a/kleopatra/kleopatra_options.h b/kleopatra/kleopatra_options.h
index f9cfc89..9399fa2 100644
--- a/kleopatra/kleopatra_options.h
+++ b/kleopatra/kleopatra_options.h
@@ -37,47 +37,48 @@
#include <QCommandLineParser>
#include <KLocalizedString>
-static void kleopatra_options(QCommandLineParser *parser) {
+static void kleopatra_options(QCommandLineParser *parser)
+{
QList<QCommandLineOption> options;
options << QCommandLineOption(QStringList() << QStringLiteral("openpgp")
- << QStringLiteral("p"),
+ << QStringLiteral("p"),
i18n("Use OpenPGP for the following operation"))
<< QCommandLineOption(QStringList() << QStringLiteral("cms")
- << QStringLiteral("c"),
+ << QStringLiteral("c"),
i18n("Use CMS (X.509, S/MIME) for the following operation"))
- #ifdef HAVE_USABLE_ASSUAN
+#ifdef HAVE_USABLE_ASSUAN
<< QCommandLineOption(QStringLiteral("uiserver-socket"),
i18n("Location of the socket the ui server is listening on"),
QStringLiteral("argument"))
<< QCommandLineOption(QStringLiteral("daemon"),
i18n("Run UI server only, hide main window"))
- #endif
- << QCommandLineOption(QStringList() << QStringLiteral("import-certificate")
- << QStringLiteral("i"),
+#endif
+ << QCommandLineOption(QStringList() << QStringLiteral("import-certificate")
+ << QStringLiteral("i"),
i18n("Import certificate file(s)"))
<< QCommandLineOption(QStringList() << QStringLiteral("encrypt")
- << QStringLiteral("e"),
+ << QStringLiteral("e"),
i18n("Encrypt file(s)"))
<< QCommandLineOption(QStringList() << QStringLiteral("sign")
- << QStringLiteral("s"),
+ << QStringLiteral("s"),
i18n("Sign file(s)"))
<< QCommandLineOption(QStringList() << QStringLiteral("sign-encrypt")
- << QStringLiteral("E"),
+ << QStringLiteral("E"),
i18n("Sign and/or encrypt file(s)"))
<< QCommandLineOption(QStringLiteral("encrypt-sign"),
i18n("Same as --sign-encrypt, do not use"))
<< QCommandLineOption(QStringList() << QStringLiteral("decrypt")
- << QStringLiteral("d"),
+ << QStringLiteral("d"),
i18n("Decrypt file(s)"))
<< QCommandLineOption(QStringList() << QStringLiteral("verify")
- << QStringLiteral("V"),
+ << QStringLiteral("V"),
i18n("Verify file/signature"))
<< QCommandLineOption(QStringList() << QStringLiteral("decrypt-verify")
- << QStringLiteral("D"),
+ << QStringLiteral("D"),
i18n("Decrypt and/or verify file(s)"))
<< QCommandLineOption(QStringList() << QStringLiteral("query")
- << QStringLiteral("q"),
+ << QStringLiteral("q"),
i18n("Search for Certificate by fingerprint"),
QStringLiteral("fingerprint"))
<< QCommandLineOption(QStringLiteral("parent-windowid"),
diff --git a/kleopatra/kleopatraapplication.cpp b/kleopatra/kleopatraapplication.cpp
index 0d722e8..a9c7934 100644
--- a/kleopatra/kleopatraapplication.cpp
+++ b/kleopatra/kleopatraapplication.cpp
@@ -159,7 +159,7 @@ public:
const QByteArray envOptions = qgetenv("KLEOPATRA_LOGOPTIONS");
const bool logAll = envOptions.trimmed() == "all";
- const QList<QByteArray> options = envOptions.isEmpty() ? default_logging_options() : envOptions.split(',') ;
+ const QList<QByteArray> options = envOptions.isEmpty() ? default_logging_options() : envOptions.split(',');
const QByteArray dirNative = qgetenv("KLEOPATRA_LOGDIR");
if (dirNative.isEmpty()) {
@@ -213,8 +213,8 @@ namespace
typedef void (KleopatraApplication::*Func)(const QStringList &, GpgME::Protocol);
}
-void KleopatraApplication::slotActivateRequested(const QStringList& arguments,
- const QString &workingDirectory)
+void KleopatraApplication::slotActivateRequested(const QStringList &arguments,
+ const QString &workingDirectory)
{
QCommandLineParser parser;
@@ -239,8 +239,8 @@ void KleopatraApplication::slotActivateRequested(const QStringList& arguments,
}
}
-QString KleopatraApplication::newInstance(const QCommandLineParser& parser,
- const QString &workingDirectory)
+QString KleopatraApplication::newInstance(const QCommandLineParser &parser,
+ const QString &workingDirectory)
{
if (d->ignoreNewInstance) {
qCDebug(KLEOPATRA_LOG) << "New instance ignored because of ignoreNewInstance";
@@ -249,7 +249,7 @@ QString KleopatraApplication::newInstance(const QCommandLineParser& parser,
QStringList files;
const QDir cwd = QDir(workingDirectory);
- Q_FOREACH (const QString& file, parser.positionalArguments()) {
+ Q_FOREACH (const QString &file, parser.positionalArguments()) {
// We do not check that file exists here. Better handle
// these errors in the UI.
if (QFileInfo(file).isAbsolute()) {
@@ -269,7 +269,7 @@ QString KleopatraApplication::newInstance(const QCommandLineParser& parser,
if (parser.isSet(QStringLiteral("cms"))) {
qCDebug(KLEOPATRA_LOG) << "found CMS";
if (protocol == GpgME::OpenPGP) {
- return i18n("Ambiguous protocol: --openpgp and --cms");
+ return i18n("Ambiguous protocol: --openpgp and --cms");
}
protocol = GpgME::CMS;
}
diff --git a/kleopatra/kleopatraapplication.h b/kleopatra/kleopatraapplication.h
index e271a38..412fbcc 100644
--- a/kleopatra/kleopatraapplication.h
+++ b/kleopatra/kleopatraapplication.h
@@ -61,15 +61,15 @@ public:
* If ignoreNewInstance is set this function does nothing.
* The parser should have been initialized with kleopatra_options and
* already processed.
- * If kleopatra is not session restored
+ * If kleopatra is not session restored
*
* @param parser: The command line parser to use.
* @param workingDirectory: Optional working directory for file arguments.
*
* @returns an empty QString on success. A localized error message otherwise.
* */
- QString newInstance(const QCommandLineParser& parser,
- const QString& workingDirectory=QString());
+ QString newInstance(const QCommandLineParser &parser,
+ const QString &workingDirectory = QString());
void setMainWindow(MainWindow *mw);
diff --git a/kleopatra/kwatchgnupg/aboutdata.cpp b/kleopatra/kwatchgnupg/aboutdata.cpp
index af344e1..e058a86 100644
--- a/kleopatra/kwatchgnupg/aboutdata.cpp
+++ b/kleopatra/kwatchgnupg/aboutdata.cpp
@@ -56,7 +56,7 @@ AboutData::AboutData()
{
using ::authors;
//using ::credits;
- for (unsigned int i = 0 ; i < sizeof authors / sizeof * authors ; ++i)
+ for (unsigned int i = 0; i < sizeof authors / sizeof * authors; ++i)
addAuthor(i18n(authors[i].name), i18n(authors[i].desc),
QLatin1String(authors[i].email), QLatin1String(authors[i].web));
}
diff --git a/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp b/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp
index 8d738c2..6039883 100644
--- a/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp
+++ b/kleopatra/kwatchgnupg/kwatchgnupgmainwin.cpp
@@ -81,9 +81,8 @@ KWatchGnuPGMainWindow::KWatchGnuPGMainWindow(QWidget *parent)
slotReadConfig();
mSysTray = new KWatchGnuPGTray(this);
- QAction* act = mSysTray->action(QStringLiteral("quit"));
- if (act)
- {
+ QAction *act = mSysTray->action(QStringLiteral("quit"));
+ if (act) {
connect(act, &QAction::triggered, this, &KWatchGnuPGMainWindow::slotQuit);
}
diff --git a/kleopatra/libkleopatraclient/core/command.cpp b/kleopatra/libkleopatraclient/core/command.cpp
index 3e6ce9c..fe3b387 100644
--- a/kleopatra/libkleopatraclient/core/command.cpp
+++ b/kleopatra/libkleopatraclient/core/command.cpp
@@ -63,7 +63,7 @@ static std::string hexencode(const std::string &in)
static const char hex[] = "0123456789ABCDEF";
- for (std::string::const_iterator it = in.begin(), end = in.end() ; it != end ; ++it)
+ for (std::string::const_iterator it = in.begin(), end = in.end(); it != end; ++it)
switch (const unsigned char ch = *it) {
default:
if ((ch >= '!' && ch <= '~') || ch > 0xA0) {
@@ -619,7 +619,7 @@ void Command::Private::run()
}
// give it a bit of time to start up and try a couple of times
- for (int i = 0 ; err && i < 20 ; ++i) {
+ for (int i = 0; err && i < 20; ++i) {
msleep(500);
#ifndef HAVE_ASSUAN2
err = assuan_socket_connect(&naked_ctx, QFile::encodeName(socketName).constData(), -1);
@@ -670,7 +670,7 @@ void Command::Private::run()
}
}
- for (std::map<std::string, Option>::const_iterator it = in.options.begin(), end = in.options.end() ; it != end ; ++it)
+ for (std::map<std::string, Option>::const_iterator it = in.options.begin(), end = in.options.end(); it != end; ++it)
if ((err = send_option(ctx, it->first.c_str(), it->second.hasValue ? it->second.value.toString() : QVariant()))) {
if (it->second.isCritical) {
out.errorString = i18n("Failed to send critical option %1: %2", QString::fromLatin1(it->first.c_str()), to_error_string(err));
diff --git a/kleopatra/libkleopatraclient/core/selectcertificatecommand.cpp b/kleopatra/libkleopatraclient/core/selectcertificatecommand.cpp
index a3935c5..29c1dea 100644
--- a/kleopatra/libkleopatraclient/core/selectcertificatecommand.cpp
+++ b/kleopatra/libkleopatraclient/core/selectcertificatecommand.cpp
@@ -142,6 +142,6 @@ void SelectCertificateCommand::setSelectedCertificate(const QString &cert)
QString SelectCertificateCommand::selectedCertificate() const
{
const QStringList sl = selectedCertificates();
- return sl.empty() ? QString() : sl.front() ;
+ return sl.empty() ? QString() : sl.front();
}
diff --git a/kleopatra/libkleopatraclient/gui/certificaterequester.cpp b/kleopatra/libkleopatraclient/gui/certificaterequester.cpp
index 5fd900b..9426e06 100644
--- a/kleopatra/libkleopatraclient/gui/certificaterequester.cpp
+++ b/kleopatra/libkleopatraclient/gui/certificaterequester.cpp
@@ -234,7 +234,7 @@ void CertificateRequester::setSelectedCertificate(const QString &cert)
QString CertificateRequester::selectedCertificate() const
{
- return d->selectedCertificates.empty() ? QString() : d->selectedCertificates.front() ;
+ return d->selectedCertificates.empty() ? QString() : d->selectedCertificates.front();
}
void CertificateRequester::Private::slotButtonClicked()
diff --git a/kleopatra/libkleopatraclient/tests/test_util.h b/kleopatra/libkleopatraclient/tests/test_util.h
index 6ff89dd..8e154d9 100644
--- a/kleopatra/libkleopatraclient/tests/test_util.h
+++ b/kleopatra/libkleopatraclient/tests/test_util.h
@@ -8,7 +8,7 @@
static QStringList filePathsFromArgs(int argc, char *argv[])
{
QStringList result;
- for (int i = 1 ; i < argc ; ++i) {
+ for (int i = 1; i < argc; ++i) {
result.push_back(QFileInfo(QFile::decodeName(argv[i])).absoluteFilePath());
}
return result;
diff --git a/kleopatra/main.cpp b/kleopatra/main.cpp
index 3348662..61d441c 100644
--- a/kleopatra/main.cpp
+++ b/kleopatra/main.cpp
@@ -106,7 +106,7 @@ namespace
template <typename T>
boost::shared_ptr<T> make_shared_ptr(T *t)
{
- return t ? boost::shared_ptr<T>(t) : boost::shared_ptr<T>() ;
+ return t ? boost::shared_ptr<T>(t) : boost::shared_ptr<T>();
}
}
@@ -118,7 +118,7 @@ static QPixmap UserIcon_nocached(const char *name)
KIconLoader *const il = KIconLoader::global();
assert(il);
const QString iconPath = il->iconPath(QLatin1String(name), KIconLoader::User);
- return iconPath.isEmpty() ? il->unknown() : QPixmap(iconPath) ;
+ return iconPath.isEmpty() ? il->unknown() : QPixmap(iconPath);
}
#ifndef QT_NO_SPLASHSCREEN
@@ -217,9 +217,9 @@ int main(int argc, char **argv)
QObject::connect(&service, &KDBusService::activateRequested,
&app, &KleopatraApplication::slotActivateRequested);
QObject::connect(&app, &KleopatraApplication::setExitValue,
- &service, [&service](int i) {
- service.setExitValue(i);
- });
+ &service, [&service](int i) {
+ service.setExitValue(i);
+ });
AboutData aboutData;
diff --git a/kleopatra/mainwindow_desktop.cpp b/kleopatra/mainwindow_desktop.cpp
index 651ac28..c900c05 100644
--- a/kleopatra/mainwindow_desktop.cpp
+++ b/kleopatra/mainwindow_desktop.cpp
@@ -528,13 +528,13 @@ void MainWindow::dropEvent(QDropEvent *e)
QMenu menu;
QAction *const signEncrypt = menu.addAction(i18n("Sign/Encrypt..."));
- QAction *const decryptVerify = mayBeAnyMessageType(classification) ? menu.addAction(i18n("Decrypt/Verify...")) : 0 ;
+ QAction *const decryptVerify = mayBeAnyMessageType(classification) ? menu.addAction(i18n("Decrypt/Verify...")) : 0;
if (signEncrypt || decryptVerify) {
menu.addSeparator();
}
- QAction *const importCerts = mayBeAnyCertStoreType(classification) ? menu.addAction(i18n("Import Certificates")) : 0 ;
- QAction *const importCRLs = mayBeCertificateRevocationList(classification) ? menu.addAction(i18n("Import CRLs")) : 0 ;
+ QAction *const importCerts = mayBeAnyCertStoreType(classification) ? menu.addAction(i18n("Import Certificates")) : 0;
+ QAction *const importCRLs = mayBeCertificateRevocationList(classification) ? menu.addAction(i18n("Import CRLs")) : 0;
if (importCerts || importCRLs) {
menu.addSeparator();
}
diff --git a/kleopatra/models/keycache.cpp b/kleopatra/models/keycache.cpp
index 89b6221..983a354 100644
--- a/kleopatra/models/keycache.cpp
+++ b/kleopatra/models/keycache.cpp
@@ -474,7 +474,7 @@ struct ready_for_signing : std::unary_function<Key, bool> {
return true;
#else
return key.hasSecret() &&
- key.canReallySign() && !key.isRevoked() && !key.isExpired() && !key.isDisabled() && !key.isInvalid() ;
+ key.canReallySign() && !key.isRevoked() && !key.isExpired() && !key.isDisabled() && !key.isInvalid();
#endif
#undef DO
}
@@ -493,7 +493,7 @@ struct ready_for_encryption : std::unary_function<Key, bool> {
return true;
#else
return
- key.canEncrypt() && !key.isRevoked() && !key.isExpired() && !key.isDisabled() && !key.isInvalid() ;
+ key.canEncrypt() && !key.isRevoked() && !key.isExpired() && !key.isDisabled() && !key.isInvalid();
#endif
}
#undef DO
@@ -1051,7 +1051,7 @@ Error KeyCache::RefreshKeysJob::Private::startKeyListing(const char *backend)
const QString label = protocol == Kleo::CryptoBackendFactory::instance()->smime()
? i18n("Listing X.509 certificates")
- : i18n("Listing OpenPGP certificates") ;
+ : i18n("Listing OpenPGP certificates");
(void)ProgressManager::createForJob(job, label);
connect(q, &RefreshKeysJob::canceled,
diff --git a/kleopatra/models/keylistmodel.cpp b/kleopatra/models/keylistmodel.cpp
index 7ee8e4d..02c5e38 100644
--- a/kleopatra/models/keylistmodel.cpp
+++ b/kleopatra/models/keylistmodel.cpp
@@ -221,7 +221,7 @@ QModelIndex AbstractKeyListModel::addKey(const Key &key)
{
const std::vector<Key> vec(1, key);
const QList<QModelIndex> l = doAddKeys(vec);
- return l.empty() ? QModelIndex() : l.front() ;
+ return l.empty() ? QModelIndex() : l.front();
}
void AbstractKeyListModel::removeKey(const Key &key)
@@ -267,7 +267,7 @@ QVariant AbstractKeyListModel::headerData(int section, Qt::Orientation o, int ro
case ValidUntil: return i18n("Valid Until");
case TechnicalDetails: return i18n("Details");
case ShortKeyID: return i18n("Key-ID");
- case NumColumns: ;
+ case NumColumns:;
}
return QVariant();
}
@@ -338,7 +338,7 @@ QVariant AbstractKeyListModel::data(const QModelIndex &index, int role) const
} else if (role == Qt::FontRole) {
return KeyFilterManager::instance()->font(key, (column == ShortKeyID) ? QFont(QStringLiteral("courier")) : QFont());
} else if (role == Qt::DecorationRole) {
- return column == Icon ? returnIfValid(KeyFilterManager::instance()->icon(key)) : QVariant() ;
+ return column == Icon ? returnIfValid(KeyFilterManager::instance()->icon(key)) : QVariant();
} else if (role == Qt::BackgroundRole) {
return returnIfValid(KeyFilterManager::instance()->bgColor(key));
} else if (role == Qt::ForegroundRole) {
@@ -361,7 +361,7 @@ public:
using Base::index;
QModelIndex index(int row, int column, const QModelIndex &pidx = QModelIndex()) const Q_DECL_OVERRIDE
{
- return this->hasIndex(row, column, pidx) ? this->createIndex(row, column, Q_NULLPTR) : QModelIndex() ;
+ return this->hasIndex(row, column, pidx) ? this->createIndex(row, column, Q_NULLPTR) : QModelIndex();
}
private:
@@ -371,7 +371,7 @@ private:
}
bool hasChildren(const QModelIndex &pidx) const Q_DECL_OVERRIDE
{
- return (pidx.model() == this || !pidx.isValid()) && this->rowCount(pidx) > 0 && this->columnCount(pidx) > 0 ;
+ return (pidx.model() == this || !pidx.isValid()) && this->rowCount(pidx) > 0 && this->columnCount(pidx) > 0;
}
};
@@ -389,7 +389,7 @@ public:
int rowCount(const QModelIndex &pidx) const Q_DECL_OVERRIDE
{
- return pidx.isValid() ? 0 : mKeysByFingerprint.size() ;
+ return pidx.isValid() ? 0 : mKeysByFingerprint.size();
}
private:
@@ -419,7 +419,7 @@ public:
bool hasChildren(const QModelIndex &pidx) const Q_DECL_OVERRIDE
{
- return rowCount(pidx) > 0 ;
+ return rowCount(pidx) > 0;
}
private:
@@ -500,7 +500,7 @@ QList<QModelIndex> FlatKeyListModel::doAddKeys(const std::vector<Key> &keys)
return QList<QModelIndex>();
}
- for (std::vector<Key>::const_iterator it = keys.begin(), end = keys.end() ; it != end ; ++it) {
+ for (std::vector<Key>::const_iterator it = keys.begin(), end = keys.end(); it != end; ++it) {
// find an insertion point:
const std::vector<Key>::iterator pos = std::upper_bound(mKeysByFingerprint.begin(), mKeysByFingerprint.end(), *it, _detail::ByFingerprint<std::less>());
@@ -747,7 +747,7 @@ static std::vector<Key> topological_sort(const std::vector<Key> &keys)
boost::adjacency_list<> graph(keys.size());
// add edges from children to parents:
- for (unsigned int i = 0, end = keys.size() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = keys.size(); i != end; ++i) {
const char *const issuer_fpr = cleanChainID(keys[i]);
if (!issuer_fpr || !*issuer_fpr) {
continue;
@@ -863,7 +863,7 @@ QList<QModelIndex> HierarchicalKeyListModel::doAddKeys(const std::vector<Key> &k
const QModelIndex new_parent = index(key);
// Q_EMIT the rowMoved() signals in reversed direction, so the
// implementation can use a stack for mapping.
- for (int i = children.size() - 1 ; i >= 0 ; --i) {
+ for (int i = children.size() - 1; i >= 0; --i) {
Q_EMIT rowMoved(new_parent, i);
}
}
diff --git a/kleopatra/models/keylistsortfilterproxymodel.cpp b/kleopatra/models/keylistsortfilterproxymodel.cpp
index 05c4be9..d71d9e6 100644
--- a/kleopatra/models/keylistsortfilterproxymodel.cpp
+++ b/kleopatra/models/keylistsortfilterproxymodel.cpp
@@ -171,7 +171,7 @@ bool KeyListSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelI
// 0. Keep parents of matching children:
//
const QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
- for (int i = 0, end = sourceModel()->rowCount(index) ; i != end ; ++i)
+ for (int i = 0, end = sourceModel()->rowCount(index); i != end; ++i)
if (filterAcceptsRow(i, index)) {
return true;
}
diff --git a/kleopatra/models/subkeylistmodel.cpp b/kleopatra/models/subkeylistmodel.cpp
index f222838..06084da 100644
--- a/kleopatra/models/subkeylistmodel.cpp
+++ b/kleopatra/models/subkeylistmodel.cpp
@@ -123,7 +123,7 @@ std::vector<Subkey> SubkeyListModel::subkeys(const QList<QModelIndex> &indexes)
QModelIndex SubkeyListModel::index(const Subkey &subkey, int col) const
{
// O(N), but not sorted, so no better way...
- for (unsigned int row = 0, end = d->key.numSubkeys() ; row != end ; ++row)
+ for (unsigned int row = 0, end = d->key.numSubkeys(); row != end; ++row)
if (qstricmp(subkey.keyID(), d->key.subkey(row).keyID()) == 0) {
return index(row, col);
}
@@ -155,7 +155,7 @@ int SubkeyListModel::columnCount(const QModelIndex &) const
int SubkeyListModel::rowCount(const QModelIndex &pidx) const
{
- return pidx.isValid() ? 0 : d->key.numSubkeys() ;
+ return pidx.isValid() ? 0 : d->key.numSubkeys();
}
QVariant SubkeyListModel::headerData(int section, Qt::Orientation o, int role) const
@@ -169,7 +169,7 @@ QVariant SubkeyListModel::headerData(int section, Qt::Orientation o, int role) c
case ValidUntil: return i18n("Valid Until");
case Status: return i18n("Status");
case Bits: return i18n("Strength");
- case NumColumns: ;
+ case NumColumns:;
}
return QVariant();
}
diff --git a/kleopatra/models/useridlistmodel.cpp b/kleopatra/models/useridlistmodel.cpp
index 7c0b39a..3ea0fff 100644
--- a/kleopatra/models/useridlistmodel.cpp
+++ b/kleopatra/models/useridlistmodel.cpp
@@ -67,7 +67,7 @@ static inline int extract_uid_number(const QModelIndex &idx)
static inline bool is_signature_level(const QModelIndex &idx)
{
- return idx.isValid()/* && idx.internalId() >= 0*/ ;
+ return idx.isValid()/* && idx.internalId() >= 0*/;
}
}
@@ -115,7 +115,7 @@ void UserIDListModel::setKey(const Key &key)
if (key.numUserIDs() > 0 && oldKey.numUserIDs() == key.numUserIDs()) {
bool identical = true;
- for (unsigned int i = 0, end = key.numUserIDs() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = key.numUserIDs(); i != end; ++i) {
if (key.userID(i).numSignatures() != oldKey.userID(i).numSignatures()) {
identical = false;
break;
@@ -173,7 +173,7 @@ std::vector<UserID::Signature> UserIDListModel::signatures(const QList<QModelInd
QModelIndex UserIDListModel::index(const UserID &userID, int col) const
{
// O(N), but not sorted, so no better way...
- for (unsigned int row = 0, end = d->key.numUserIDs() ; row != end ; ++row)
+ for (unsigned int row = 0, end = d->key.numUserIDs(); row != end; ++row)
if (qstricmp(userID.id(), d->key.userID(row).id()) == 0) {
return createIndex(row, col, -1);
}
@@ -284,7 +284,7 @@ QVariant UserIDListModel::headerData(int section, Qt::Orientation o, int role) c
case ValidFrom: return i18n("Valid From");
case ValidUntil: return i18n("Valid Until");
case Status: return i18n("Status");
- case NumColumns: ;
+ case NumColumns:;
}
return QVariant();
}
diff --git a/kleopatra/newcertificatewizard/listwidget.cpp b/kleopatra/newcertificatewizard/listwidget.cpp
index 37c3f8f..ca925a8 100644
--- a/kleopatra/newcertificatewizard/listwidget.cpp
+++ b/kleopatra/newcertificatewizard/listwidget.cpp
@@ -158,7 +158,7 @@ private:
int selectedRow() const
{
const QModelIndexList mil = selectedIndexes();
- return mil.empty() ? -1 : mil.front().row() ;
+ return mil.empty() ? -1 : mil.front().row();
}
void selectRow(int idx)
{
diff --git a/kleopatra/newcertificatewizard/newcertificatewizard.cpp b/kleopatra/newcertificatewizard/newcertificatewizard.cpp
index 177fc5c..faf1a7f 100644
--- a/kleopatra/newcertificatewizard/newcertificatewizard.cpp
+++ b/kleopatra/newcertificatewizard/newcertificatewizard.cpp
@@ -193,7 +193,7 @@ protected:
QAbstractButton *button(QWizard::WizardButton button) const
{
- return QWizardPage::wizard() ? QWizardPage::wizard()->button(button) : 0 ;
+ return QWizardPage::wizard() ? QWizardPage::wizard()->button(button) : 0;
}
bool isButtonVisible(QWizard::WizardButton button) const
@@ -345,14 +345,14 @@ public:
{
return
ui.dsaRB->isChecked() ? get_keysize(ui.dsaKeyStrengthCB) :
- ui.rsaRB->isChecked() ? get_keysize(ui.rsaKeyStrengthCB) : 0 ;
+ ui.rsaRB->isChecked() ? get_keysize(ui.rsaKeyStrengthCB) : 0;
}
void setKeyType(unsigned int algo)
{
QRadioButton *const rb =
is_rsa(algo) ? ui.rsaRB :
- is_dsa(algo) ? ui.dsaRB : 0 ;
+ is_dsa(algo) ? ui.dsaRB : 0;
if (rb) {
rb->setChecked(true);
}
@@ -362,7 +362,7 @@ public:
return
ui.dsaRB->isChecked() ? GPGME_PK_DSA :
ui.rsaRB->isChecked() ? GPGME_PK_RSA :
- 0 ;
+ 0;
}
void setSubkeyType(unsigned int algo)
@@ -442,7 +442,7 @@ public:
}
QDate expiryDate() const
{
- return ui.expiryCB->isChecked() ? ui.expiryDE->date() : QDate() ;
+ return ui.expiryCB->isChecked() ? ui.expiryDE->date() : QDate();
}
Q_SIGNALS:
@@ -540,12 +540,12 @@ public:
{
return
ui.pgpCLB->isChecked() ? OpenPGP :
- ui.x509CLB->isChecked() ? CMS : UnknownProtocol ;
+ ui.x509CLB->isChecked() ? CMS : UnknownProtocol;
}
- void initializePage() Q_DECL_OVERRIDE
- {
- if (!initialized) {
+ void initializePage() Q_DECL_OVERRIDE {
+ if (!initialized)
+ {
connect(ui.pgpCLB, &QAbstractButton::clicked, wizard(), &QWizard::next, Qt::QueuedConnection);
connect(ui.x509CLB, &QAbstractButton::clicked, wizard(), &QWizard::next, Qt::QueuedConnection);
}
@@ -554,7 +554,7 @@ public:
bool isComplete() const Q_DECL_OVERRIDE
{
- return protocol() != UnknownProtocol ;
+ return protocol() != UnknownProtocol;
}
private:
@@ -599,13 +599,11 @@ public:
}
bool isComplete() const Q_DECL_OVERRIDE;
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
updateForm();
dialog.setProtocol(pgp() ? OpenPGP : CMS);
}
- void cleanupPage() Q_DECL_OVERRIDE
- {
+ void cleanupPage() Q_DECL_OVERRIDE {
saveValues();
}
@@ -646,8 +644,7 @@ public:
setButtonText(QWizard::CommitButton, i18nc("@action", "Create Key"));
}
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
slotShowDetails();
}
@@ -683,8 +680,7 @@ public:
return !job;
}
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
startJob();
}
@@ -776,11 +772,11 @@ public:
registerField(QStringLiteral("fingerprint"), le);
}
- void initializePage() Q_DECL_OVERRIDE
- {
+ void initializePage() Q_DECL_OVERRIDE {
const bool error = isError();
- if (error) {
+ if (error)
+ {
setTitle(i18nc("@title", "Key Creation Failed"));
setSubTitle(i18n("Key pair creation failed. Please find details about the failure below."));
} else {
@@ -790,18 +786,19 @@ public:
ui.resultTB ->setVisible(!error);
ui.errorTB ->setVisible(error);
- ui.dragQueen ->setVisible(!error && !pgp());
+ ui.dragQueen ->setVisible(!error &&!pgp());
ui.restartWizardPB ->setVisible(error);
ui.nextStepsGB ->setVisible(!error);
ui.saveRequestToFilePB ->setVisible(!pgp());
ui.makeBackupPB ->setVisible(pgp());
- ui.createRevocationRequestPB->setVisible(pgp() && false); // not implemented
+ ui.createRevocationRequestPB->setVisible(pgp() &&false); // not implemented
ui.sendCertificateByEMailPB ->setVisible(pgp());
ui.sendRequestByEMailPB ->setVisible(!pgp());
ui.uploadToKeyserverPB ->setVisible(pgp());
- if (!error && !pgp()) {
+ if (!error && !pgp())
+ {
if (signingAllowed() && !encryptionAllowed()) {
successfullyCreatedSigningCertificate = true;
} else if (!signingAllowed() && encryptionAllowed()) {
@@ -811,8 +808,8 @@ public:
}
}
- ui.createSigningCertificatePB->setVisible(successfullyCreatedEncryptionCertificate && !successfullyCreatedSigningCertificate);
- ui.createEncryptionCertificatePB->setVisible(successfullyCreatedSigningCertificate && !successfullyCreatedEncryptionCertificate);
+ ui.createSigningCertificatePB->setVisible(successfullyCreatedEncryptionCertificate &&!successfullyCreatedSigningCertificate);
+ ui.createEncryptionCertificatePB->setVisible(successfullyCreatedSigningCertificate &&!successfullyCreatedEncryptionCertificate);
setButtonVisible(QWizard::CancelButton, error);
@@ -822,8 +819,7 @@ public:
initialized = true;
}
- void cleanupPage() Q_DECL_OVERRIDE
- {
+ void cleanupPage() Q_DECL_OVERRIDE {
setButtonVisible(QWizard::CancelButton, true);
}
@@ -934,7 +930,7 @@ private Q_SLOTS:
QByteArray encoded = "mailto:?to=" + QUrl::toPercentEncoding(to)
+ "&subject=" + QUrl::toPercentEncoding(subject)
- + "&body=" + QUrl::toPercentEncoding(body) ;
+ + "&body=" + QUrl::toPercentEncoding(body);
if (!attachment.isEmpty()) {
encoded += "&attach=" + ol_quote(QUrl::toPercentEncoding(QFileInfo(attachment).absoluteFilePath()));
}
@@ -1005,7 +1001,7 @@ private:
setField(QStringLiteral("encryptionAllowed"), !encr);
// restart and skip to Overview Page:
wizard()->restart();
- for (int i = wizard()->currentId() ; i < NewCertificateWizard::OverviewPageId ; ++i) {
+ for (int i = wizard()->currentId(); i < NewCertificateWizard::OverviewPageId; ++i) {
wizard()->next();
}
}
@@ -1108,7 +1104,7 @@ static QString attributeLabel(const QString &attr, bool pgp)
if (attr.isEmpty()) {
return QString();
}
- const QString label = pgp ? pgpLabel(attr) : Kleo::DNAttributeMapper::instance()->name2label(attr) ;
+ const QString label = pgp ? pgpLabel(attr) : Kleo::DNAttributeMapper::instance()->name2label(attr);
if (!label.isEmpty())
if (pgp) {
return label;
@@ -1141,7 +1137,7 @@ static QString attributeFromKey(QString key)
static const char *oidForAttributeName(const QString &attr)
{
QByteArray attrUtf8 = attr.toUtf8();
- for (unsigned int i = 0 ; i < numOidMaps ; ++i)
+ for (unsigned int i = 0; i < numOidMaps; ++i)
if (qstricmp(attrUtf8, oidmap[i].name) == 0) {
return oidmap[i].oid;
}
@@ -1150,14 +1146,14 @@ static const char *oidForAttributeName(const QString &attr)
QDir WizardPage::tmpDir() const
{
- return wizard() ? QDir(wizard()->d->tmp.path()) : QDir::home() ;
+ return wizard() ? QDir(wizard()->d->tmp.path()) : QDir::home();
}
void EnterDetailsPage::registerDialogPropertiesAsFields()
{
const QMetaObject *const mo = dialog.metaObject();
- for (unsigned int i = mo->propertyOffset(), end = i + mo->propertyCount() ; i != end ; ++i) {
+ for (unsigned int i = mo->propertyOffset(), end = i + mo->propertyCount(); i != end; ++i) {
const QMetaProperty mp = mo->property(i);
if (mp.isValid()) {
registerField(QLatin1String(mp.name()), &dialog, mp.name(), SIGNAL(accepted()));
@@ -1295,7 +1291,7 @@ void EnterDetailsPage::updateForm()
QValidator *validator = 0;
if (attr == QLatin1String("EMAIL")) {
row = row_index_of(ui.emailLE, ui.gridLayout);
- validator = regex.isEmpty() ? Validation::email() : Validation::email(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::email() : Validation::email(QRegExp(regex));
if (!pgp()) {
ui.addEmailToDnCB->show();
}
@@ -1304,14 +1300,14 @@ void EnterDetailsPage::updateForm()
continue;
}
if (pgp()) {
- validator = regex.isEmpty() ? Validation::pgpName() : Validation::pgpName(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::pgpName() : Validation::pgpName(QRegExp(regex));
}
row = row_index_of(ui.nameLE, ui.gridLayout);
} else if (attr == QLatin1String("COMMENT")) {
if (!pgp()) {
continue;
}
- validator = regex.isEmpty() ? Validation::pgpComment() : Validation::pgpComment(QRegExp(regex)) ;
+ validator = regex.isEmpty() ? Validation::pgpComment() : Validation::pgpComment(QRegExp(regex));
row = row_index_of(ui.commentLE, ui.gridLayout);
} else {
known = false;
@@ -1349,7 +1345,7 @@ void EnterDetailsPage::updateForm()
QString EnterDetailsPage::cmsDN() const
{
DN dn;
- for (QVector<Line>::const_iterator it = lineList.begin(), end = lineList.end() ; it != end ; ++it) {
+ for (QVector<Line>::const_iterator it = lineList.begin(), end = lineList.end(); it != end; ++it) {
const QString text = it->edit->text().trimmed();
if (text.isEmpty()) {
continue;
@@ -1379,7 +1375,7 @@ static bool has_intermediate_input(const QLineEdit *le)
QString text = le->text();
int pos = le->cursorPosition();
const QValidator *const v = le->validator();
- return v && v->validate(text, pos) == QValidator::Intermediate ;
+ return v && v->validate(text, pos) == QValidator::Intermediate;
}
static bool requirementsAreMet(const QVector<Line> &list, QString &error)
@@ -1630,7 +1626,7 @@ QString KeyCreationPage::createGnupgKeyParms() const
static void fill_combobox(QComboBox &cb, const QList<int> &sizes, const QStringList &labels)
{
cb.clear();
- for (int i = 0, end = sizes.size() ; i != end ; ++i) {
+ for (int i = 0, end = sizes.size(); i != end; ++i) {
cb.addItem(i < labels.size() && !labels[i].trimmed().isEmpty()
? sizes[i] < 0
? i18ncp("%2: some admin-supplied text, %1: key size in bits", "%2 (1 bit; default)", "%2 (%1 bits; default)", -sizes[i], labels[i].trimmed())
@@ -1674,7 +1670,7 @@ void AdvancedSettingsDialog::loadDefaultKeyType()
const KConfigGroup config(KSharedConfig::openConfig(), "CertificateCreationWizard");
- const QString entry = protocol == CMS ? QLatin1String(CMS_KEY_TYPE_ENTRY) : QLatin1String(PGP_KEY_TYPE_ENTRY) ;
+ const QString entry = protocol == CMS ? QLatin1String(CMS_KEY_TYPE_ENTRY) : QLatin1String(PGP_KEY_TYPE_ENTRY);
const QString keyType = config.readEntry(entry).trimmed().toUpper();
if (protocol == OpenPGP && keyType == QLatin1String("DSA")) {
diff --git a/kleopatra/selftest/enginecheck.cpp b/kleopatra/selftest/enginecheck.cpp
index d8e64b6..9a6d8b7 100644
--- a/kleopatra/selftest/enginecheck.cpp
+++ b/kleopatra/selftest/enginecheck.cpp
@@ -172,7 +172,7 @@ static bool is_version(const char *actual, int major, int minor, int patch)
}
bool ok;
int actual_version[3];
- for (int i = 0 ; i < 3 ; ++i) {
+ for (int i = 0; i < 3; ++i) {
ok = false;
actual_version[i] = rx.cap(i + 1).toUInt(&ok);
assert(ok);
@@ -181,7 +181,7 @@ static bool is_version(const char *actual, int major, int minor, int patch)
qCDebug(KLEOPATRA_LOG) << "Parsed" << actual << "as: "
<< actual_version[0] << '.'
<< actual_version[1] << '.'
- << actual_version[2] << '.' ;
+ << actual_version[2] << '.';
const int required_version[] = { major, minor, patch };
@@ -189,9 +189,9 @@ static bool is_version(const char *actual, int major, int minor, int patch)
ok = !std::lexicographical_compare(begin(actual_version), end(actual_version),
begin(required_version), end(required_version));
if (ok) {
- qCDebug(KLEOPATRA_LOG) << QStringLiteral("%1.%2.%3").arg(major).arg(minor).arg(patch) << "<=" << actual ;
+ qCDebug(KLEOPATRA_LOG) << QStringLiteral("%1.%2.%3").arg(major).arg(minor).arg(patch) << "<=" << actual;
} else {
- qCDebug(KLEOPATRA_LOG) << QStringLiteral("%1.%2.%3").arg(major).arg(minor).arg(patch) << ">" << actual ;
+ qCDebug(KLEOPATRA_LOG) << QStringLiteral("%1.%2.%3").arg(major).arg(minor).arg(patch) << ">" << actual;
}
return ok;
}
diff --git a/kleopatra/selftest/gpgconfcheck.cpp b/kleopatra/selftest/gpgconfcheck.cpp
index dd4e69b..e035376 100644
--- a/kleopatra/selftest/gpgconfcheck.cpp
+++ b/kleopatra/selftest/gpgconfcheck.cpp
@@ -61,7 +61,7 @@ class GpgConfCheck : public SelfTestImplementation
QString m_component;
public:
explicit GpgConfCheck(const char *component)
- : SelfTestImplementation(i18nc("@title", "%1 Configuration Check", component &&*component ? QLatin1String(component) : QLatin1String("gpgconf"))),
+ : SelfTestImplementation(i18nc("@title", "%1 Configuration Check", component && * component ? QLatin1String(component) : QLatin1String("gpgconf"))),
m_component(QLatin1String(component))
{
runTest();
@@ -72,7 +72,7 @@ public:
if (m_component.isEmpty()) {
return QStringList() << QStringLiteral("--check-config");
} else {
- return QStringList() << QStringLiteral("--check-options") << m_component ;
+ return QStringList() << QStringLiteral("--check-options") << m_component;
}
}
@@ -124,7 +124,7 @@ public:
process.waitForFinished();
const QString output = QString::fromUtf8(process.readAll());
- const QString message = process.exitStatus() == QProcess::CrashExit ? i18n("The process terminated prematurely") : process.errorString() ;
+ const QString message = process.exitStatus() == QProcess::CrashExit ? i18n("The process terminated prematurely") : process.errorString();
if (process.exitStatus() != QProcess::NormalExit ||
process.error() != QProcess::UnknownError) {
@@ -136,7 +136,7 @@ public:
"You might want to execute \"gpgconf %3\" on the command line.\n",
message, m_component.isEmpty() ? QStringLiteral("GnuPG") : m_component, arguments().join(QStringLiteral(" ")));
if (!output.trimmed().isEmpty()) {
- m_explaination += QLatin1Char('\n') + i18n("Diagnostics:") + QLatin1Char('\n') + output ;
+ m_explaination += QLatin1Char('\n') + i18n("Diagnostics:") + QLatin1Char('\n') + output;
}
m_proposedFix.clear();
diff --git a/kleopatra/selftest/selftest.h b/kleopatra/selftest/selftest.h
index 9f30efd..caf3d44 100644
--- a/kleopatra/selftest/selftest.h
+++ b/kleopatra/selftest/selftest.h
@@ -55,7 +55,7 @@ public:
bool failed() const
{
- return !skipped() && !passed() ;
+ return !skipped() && !passed();
}
};
diff --git a/kleopatra/smartcard/readerstatus.cpp b/kleopatra/smartcard/readerstatus.cpp
index b1e7180..abf8105 100644
--- a/kleopatra/smartcard/readerstatus.cpp
+++ b/kleopatra/smartcard/readerstatus.cpp
@@ -431,7 +431,7 @@ static bool check_event_counter_changed(shared_ptr<Context> &gpg_agent, unsigned
counter = get_event_counter(gpg_agent);
if (oldCounter != counter) {
#ifdef DEBUG_SCREADER
- qCDebug(KLEOPATRA_LOG) << "ReaderStatusThread[2nd]: events:" << oldCounter << "->" << counter ;
+ qCDebug(KLEOPATRA_LOG) << "ReaderStatusThread[2nd]: events:" << oldCounter << "->" << counter;
#endif
return true;
} else {
@@ -562,13 +562,13 @@ private Q_SLOTS:
}
private:
- void run() Q_DECL_OVERRIDE
- {
+ void run() Q_DECL_OVERRIDE {
shared_ptr<Context> gpgAgent;
unsigned int eventCounter = -1;
- while (true) {
+ while (true)
+ {
QByteArray command;
bool nullSlot;
@@ -640,7 +640,7 @@ private:
std::vector<CardInfo>::const_iterator
nit = newCardInfos.begin(), nend = newCardInfos.end(),
- oit = oldCardInfos.begin(), oend = oldCardInfos.end() ;
+ oit = oldCardInfos.begin(), oend = oldCardInfos.end();
unsigned int idx = 0;
bool anyLC = false;
diff --git a/kleopatra/tests/test_keylistmodels.cpp b/kleopatra/tests/test_keylistmodels.cpp
index 02cc470..cc5c049 100644
--- a/kleopatra/tests/test_keylistmodels.cpp
+++ b/kleopatra/tests/test_keylistmodels.cpp
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
{
if (const GpgME::Error initError = GpgME::initializeLibrary(0)) {
- qCDebug(KLEOPATRA_LOG) << "Error initializing gpgme:" << QString::fromLocal8Bit(initError.asString()) ;
+ qCDebug(KLEOPATRA_LOG) << "Error initializing gpgme:" << QString::fromLocal8Bit(initError.asString());
return 1;
}
diff --git a/kleopatra/tests/test_uiserver.cpp b/kleopatra/tests/test_uiserver.cpp
index 81e3516..99e9804 100644
--- a/kleopatra/tests/test_uiserver.cpp
+++ b/kleopatra/tests/test_uiserver.cpp
@@ -67,7 +67,7 @@ static const bool HAVE_FD_PASSING = false;
static const bool HAVE_FD_PASSING = true;
#endif
-static const unsigned int ASSUAN_CONNECT_FLAGS = HAVE_FD_PASSING ? 1 : 0 ;
+static const unsigned int ASSUAN_CONNECT_FLAGS = HAVE_FD_PASSING ? 1 : 0;
static std::vector<int> inFDs, outFDs, msgFDs;
static std::vector<std::string> inFiles, outFiles, msgFiles;
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
std::vector<const char *> options;
std::string command;
- for (int optind = 2 ; optind < argc ; ++optind) {
+ for (int optind = 2; optind < argc; ++optind) {
const char *const arg = argv[optind];
if (qstrcmp(arg, "--input") == 0) {
const std::string file = argv[++optind];
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
assuan_set_log_stream(ctx, stderr);
#ifndef Q_OS_WIN32
- for (std::vector<int>::const_iterator it = inFDs.begin(), end = inFDs.end() ; it != end ; ++it) {
+ for (std::vector<int>::const_iterator it = inFDs.begin(), end = inFDs.end(); it != end; ++it) {
if (const gpg_error_t err = assuan_sendfd(ctx, *it)) {
qDebug("%s", Exception(err, "assuan_sendfd( inFD )").what());
return 1;
@@ -243,7 +243,7 @@ int main(int argc, char *argv[])
}
}
- for (std::vector<int>::const_iterator it = msgFDs.begin(), end = msgFDs.end() ; it != end ; ++it) {
+ for (std::vector<int>::const_iterator it = msgFDs.begin(), end = msgFDs.end(); it != end; ++it) {
if (const gpg_error_t err = assuan_sendfd(ctx, *it)) {
qDebug("%s", Exception(err, "assuan_sendfd( msgFD )").what());
return 1;
@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
}
}
- for (std::vector<int>::const_iterator it = outFDs.begin(), end = outFDs.end() ; it != end ; ++it) {
+ for (std::vector<int>::const_iterator it = outFDs.begin(), end = outFDs.end(); it != end; ++it) {
if (const gpg_error_t err = assuan_sendfd(ctx, *it)) {
qDebug("%s", Exception(err, "assuan_sendfd( outFD )").what());
return 1;
@@ -268,7 +268,7 @@ int main(int argc, char *argv[])
}
#endif
- for (std::vector<std::string>::const_iterator it = inFiles.begin(), end = inFiles.end() ; it != end ; ++it) {
+ for (std::vector<std::string>::const_iterator it = inFiles.begin(), end = inFiles.end(); it != end; ++it) {
char buffer[1024];
sprintf(buffer, "INPUT FILE=%s", hexencode(*it).c_str());
@@ -278,7 +278,7 @@ int main(int argc, char *argv[])
}
}
- for (std::vector<std::string>::const_iterator it = msgFiles.begin(), end = msgFiles.end() ; it != end ; ++it) {
+ for (std::vector<std::string>::const_iterator it = msgFiles.begin(), end = msgFiles.end(); it != end; ++it) {
char buffer[1024];
sprintf(buffer, "MESSAGE FILE=%s", hexencode(*it).c_str());
@@ -288,7 +288,7 @@ int main(int argc, char *argv[])
}
}
- for (std::vector<std::string>::const_iterator it = outFiles.begin(), end = outFiles.end() ; it != end ; ++it) {
+ for (std::vector<std::string>::const_iterator it = outFiles.begin(), end = outFiles.end(); it != end; ++it) {
char buffer[1024];
sprintf(buffer, "OUTPUT FILE=%s", hexencode(*it).c_str());
diff --git a/kleopatra/uiserver/assuanserverconnection.cpp b/kleopatra/uiserver/assuanserverconnection.cpp
index 8866368..6ab5c14 100644
--- a/kleopatra/uiserver/assuanserverconnection.cpp
+++ b/kleopatra/uiserver/assuanserverconnection.cpp
@@ -450,7 +450,7 @@ private:
AssuanServerConnection::Private &conn = *static_cast<AssuanServerConnection::Private *>(assuan_get_pointer(ctx_));
if (qstrcmp(line, "version") == 0) {
- static const char version[] = "Kleopatra " KLEOPATRA_VERSION_STRING ;
+ static const char version[] = "Kleopatra " KLEOPATRA_VERSION_STRING;
return assuan_process_done(ctx_, assuan_send_data(ctx_, version, sizeof version - 1));
}
@@ -795,7 +795,7 @@ private:
QByteArray dumpOptions() const
{
QByteArray result;
- for (std::map<std::string, QVariant>::const_iterator it = options.begin(), end = options.end() ; it != end ; ++it) {
+ for (std::map<std::string, QVariant>::const_iterator it = options.begin(), end = options.end(); it != end; ++it) {
result += it->first.c_str() + it->second.toString().toUtf8() + '\n';
}
return result;
@@ -837,7 +837,7 @@ private:
QByteArray dumpMementos() const
{
QByteArray result;
- for (std::map< QByteArray, shared_ptr<AssuanCommand::Memento> >::const_iterator it = mementos.begin(), end = mementos.end() ; it != end ; ++it) {
+ for (std::map< QByteArray, shared_ptr<AssuanCommand::Memento> >::const_iterator it = mementos.begin(), end = mementos.end(); it != end; ++it) {
char buf[2 + 2 * sizeof(void *) + 2];
sprintf(buf, "0x%p\n", (void *)it->second.get());
buf[sizeof(buf) - 1] = '\0';
@@ -969,7 +969,7 @@ AssuanServerConnection::Private::Private(assuan_fd_t fd_, const std::vector< sha
}
notifiers.reserve(notifiers.size() + numFDs);
- for (int i = 0 ; i < numFDs ; ++i) {
+ for (int i = 0; i < numFDs; ++i) {
const shared_ptr<QSocketNotifier> sn(new QSocketNotifier((intptr_t)fds[i], QSocketNotifier::Read), mem_fn(&QObject::deleteLater));
connect(sn.get(), &QSocketNotifier::activated, this, &Private::slotReadActivity);
notifiers.push_back(sn);
@@ -1272,7 +1272,7 @@ std::vector<U> keys(const std::map<U, V> &map)
{
std::vector<U> result;
result.resize(map.size());
- for (typename std::map<U, V>::const_iterator it = map.begin(), end = map.end() ; it != end ; ++it) {
+ for (typename std::map<U, V>::const_iterator it = map.begin(), end = map.end(); it != end; ++it) {
result.push_back(it->first);
}
return result;
@@ -1290,7 +1290,7 @@ const std::map< QByteArray, shared_ptr<AssuanCommand::Memento> > &AssuanCommand:
bool AssuanCommand::hasMemento(const QByteArray &tag) const
{
if (const unsigned int id = sessionId()) {
- return SessionDataHandler::instance()->sessionData(id)->mementos.count(tag) || mementos().count(tag) ;
+ return SessionDataHandler::instance()->sessionData(id)->mementos.count(tag) || mementos().count(tag);
} else {
return mementos().count(tag);
}
@@ -1563,7 +1563,7 @@ gpg_error_t AssuanCommandFactory::_handle(assuan_context_t ctx, char *line, cons
cmd->d->sessionId = conn.sessionId;
const std::map<std::string, std::string> cmdline_options = parse_commandline(line);
- for (std::map<std::string, std::string>::const_iterator it = cmdline_options.begin(), end = cmdline_options.end() ; it != end ; ++it) {
+ for (std::map<std::string, std::string>::const_iterator it = cmdline_options.begin(), end = cmdline_options.end(); it != end; ++it) {
cmd->d->options[it->first] = QString::fromUtf8(it->second.c_str());
}
diff --git a/kleopatra/uiserver/selectcertificatecommand.cpp b/kleopatra/uiserver/selectcertificatecommand.cpp
index 555ec6f..ce14efd 100644
--- a/kleopatra/uiserver/selectcertificatecommand.cpp
+++ b/kleopatra/uiserver/selectcertificatecommand.cpp
@@ -128,7 +128,7 @@ int SelectCertificateCommand::doStart()
d->ensureDialogCreated();
CertificateSelectionDialog::Options opts;
- for (unsigned int i = 0 ; i < sizeof option_table / sizeof * option_table ; ++i)
+ for (unsigned int i = 0; i < sizeof option_table / sizeof * option_table; ++i)
if (hasOption(option_table[i].name)) {
opts |= option_table[i].option;
}
diff --git a/kleopatra/uiserver/signencryptfilescommand.h b/kleopatra/uiserver/signencryptfilescommand.h
index 5bc862e..61f2ae4 100644
--- a/kleopatra/uiserver/signencryptfilescommand.h
+++ b/kleopatra/uiserver/signencryptfilescommand.h
@@ -64,7 +64,7 @@ protected:
private:
virtual unsigned int operation() const
{
- return SignAllowed | EncryptAllowed ;
+ return SignAllowed | EncryptAllowed;
}
private:
int doStart() Q_DECL_OVERRIDE;
diff --git a/kleopatra/uiserver/uiserver.cpp b/kleopatra/uiserver/uiserver.cpp
index 48b4d49..4ff6840 100644
--- a/kleopatra/uiserver/uiserver.cpp
+++ b/kleopatra/uiserver/uiserver.cpp
@@ -186,12 +186,12 @@ bool UiServer::waitForStopped(unsigned int ms)
bool UiServer::isStopped() const
{
- return d->connections.empty() && !d->isListening() ;
+ return d->connections.empty() && !d->isListening();
}
bool UiServer::isStopping() const
{
- return !d->connections.empty() && !d->isListening() ;
+ return !d->connections.empty() && !d->isListening();
}
void UiServer::Private::slotConnectionClosed(Kleo::AssuanServerConnection *conn)
diff --git a/kleopatra/utils/action_data.cpp b/kleopatra/utils/action_data.cpp
index 39288b8..2791fdd 100644
--- a/kleopatra/utils/action_data.cpp
+++ b/kleopatra/utils/action_data.cpp
@@ -43,7 +43,7 @@
QAction *Kleo::createAction(const action_data &ad, QObject *parent)
{
- QAction *const a = ad.toggle ? new KToggleAction(parent) : new QAction(parent) ;
+ QAction *const a = ad.toggle ? new KToggleAction(parent) : new QAction(parent);
a->setObjectName(QLatin1String(ad.name));
a->setText(ad.text);
if (!ad.tooltip.isEmpty()) {
@@ -84,14 +84,14 @@ QAction *Kleo::make_action_from_data_with_collection(const action_data &ad, KAct
void Kleo::make_actions_from_data(const action_data *ads, unsigned int size, QObject *parent)
{
- for (unsigned int i = 0 ; i < size ; ++i) {
+ for (unsigned int i = 0; i < size; ++i) {
make_action_from_data(ads[i], parent);
}
}
void Kleo::make_actions_from_data(const action_data *ads, unsigned int size, KActionCollection *coll)
{
- for (unsigned int i = 0 ; i < size ; ++i) {
+ for (unsigned int i = 0; i < size; ++i) {
coll->addAction(QLatin1String(ads[i].name), make_action_from_data_with_collection(ads[i], coll));
}
}
diff --git a/kleopatra/utils/archivedefinition.cpp b/kleopatra/utils/archivedefinition.cpp
index b24d358..0dfc161 100644
--- a/kleopatra/utils/archivedefinition.cpp
+++ b/kleopatra/utils/archivedefinition.cpp
@@ -127,8 +127,8 @@ static QString try_extensions(const QString &path)
static const char exts[][4] = {
"", "exe", "bat", "bin", "cmd",
};
- static const size_t numExts = sizeof exts / sizeof * exts ;
- for (unsigned int i = 0 ; i < numExts ; ++i) {
+ static const size_t numExts = sizeof exts / sizeof * exts;
+ for (unsigned int i = 0; i < numExts; ++i) {
const QFileInfo fi(path + QLatin1Char('.') + QLatin1String(exts[i]));
if (fi.exists()) {
return fi.filePath();
diff --git a/kleopatra/utils/classify.cpp b/kleopatra/utils/classify.cpp
index e2555c9..00c134f 100644
--- a/kleopatra/utils/classify.cpp
+++ b/kleopatra/utils/classify.cpp
@@ -181,7 +181,7 @@ unsigned int Kleo::classify(const QString &filename)
const unsigned int bestGuess =
it == end(classifications) ? defaultClassification
- /* else */ : it->classification ;
+ /* else */ : it->classification;
QFile file(filename);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -286,7 +286,7 @@ QString Kleo::findSignedData(const QString &signatureFileName)
return QString();
}
const QString baseName = chopped(signatureFileName, 4);
- return QFile::exists(baseName) ? baseName : QString() ;
+ return QFile::exists(baseName) ? baseName : QString();
}
/*!
@@ -298,7 +298,7 @@ QString Kleo::findSignedData(const QString &signatureFileName)
QStringList Kleo::findSignatures(const QString &signedDataFileName)
{
QStringList result;
- for (unsigned int i = 0, end = size(classifications) ; i < end ; ++i)
+ for (unsigned int i = 0, end = size(classifications); i < end; ++i)
if (classifications[i].classification & DetachedSignature) {
const QString candiate = signedDataFileName + QLatin1Char('.') + QLatin1String(classifications[i].extension);
if (QFile::exists(candiate)) {
@@ -339,7 +339,7 @@ const char *Kleo::outputFileExtension(unsigned int classification)
}
}
- for (unsigned int i = 0 ; i < sizeof classifications / sizeof * classifications ; ++i)
+ for (unsigned int i = 0; i < sizeof classifications / sizeof * classifications; ++i)
if ((classifications[i].classification & classification) == classification) {
return classifications[i].extension;
}
diff --git a/kleopatra/utils/formatting.cpp b/kleopatra/utils/formatting.cpp
index 45a05ad..a08a6b2 100644
--- a/kleopatra/utils/formatting.cpp
+++ b/kleopatra/utils/formatting.cpp
@@ -187,7 +187,7 @@ QString Formatting::prettyName(const UserID::Signature &sig)
QString Formatting::prettyEMail(const Key &key)
{
- for (unsigned int i = 0, end = key.numUserIDs() ; i < end ; ++i) {
+ for (unsigned int i = 0, end = key.numUserIDs(); i < end; ++i) {
const QString email = prettyEMail(key.userID(i));
if (!email.isEmpty()) {
return email;
@@ -333,7 +333,7 @@ QString Formatting::toolTip(const Key &key, int flags)
? i18n("Subject")
: i18n("User-ID"), prettyUserID(uids.front()));
if (uids.size() > 1)
- for (std::vector<UserID>::const_iterator it = uids.begin() + 1, end = uids.end() ; it != end ; ++it)
+ for (std::vector<UserID>::const_iterator it = uids.begin() + 1, end = uids.end(); it != end; ++it)
if (!it->isRevoked() && !it->isInvalid()) {
result += format_row(i18n("a.k.a."), prettyUserID(*it));
}
@@ -350,7 +350,7 @@ QString Formatting::toolTip(const Key &key, int flags)
result += format_row(i18n("Certificate usage"), format_keyusage(key));
}
if (flags & KeyID) {
- result += format_row(i18n("Key-ID"), QString::fromLatin1(key.shortKeyID())) ;
+ result += format_row(i18n("Key-ID"), QString::fromLatin1(key.shortKeyID()));
}
if (flags & Fingerprint) {
result += format_row(i18n("Fingerprint"), key.primaryFingerprint());
@@ -400,7 +400,7 @@ static QString date2string(const QDate &date)
template <typename T>
QString expiration_date_string(const T &tee)
{
- return tee.neverExpires() ? QString() : date2string(time_t2date(tee.expirationTime())) ;
+ return tee.neverExpires() ? QString() : date2string(time_t2date(tee.expirationTime()));
}
template <typename T>
QDate creation_date(const T &tee)
@@ -708,7 +708,7 @@ QString Formatting::importMetaData(const Import &import)
if (status & Import::NewKey)
return (status & Import::ContainedSecretKey)
? i18n("This certificate was new to your keystore. The secret key is available.")
- : i18n("This certificate is new to your keystore.") ;
+ : i18n("This certificate is new to your keystore.");
QStringList results;
if (status & Import::NewUserIDs) {
diff --git a/kleopatra/utils/gnupg-helper.cpp b/kleopatra/utils/gnupg-helper.cpp
index eaa1619..c7ffdbd 100644
--- a/kleopatra/utils/gnupg-helper.cpp
+++ b/kleopatra/utils/gnupg-helper.cpp
@@ -74,7 +74,7 @@ int Kleo::makeGnuPGError(int code)
static QString findGpgExe(GpgME::Engine engine, const QString &exe)
{
const GpgME::EngineInfo info = GpgME::engineInfo(engine);
- return info.fileName() ? QFile::decodeName(info.fileName()) : QStandardPaths::findExecutable(exe) ;
+ return info.fileName() ? QFile::decodeName(info.fileName()) : QStandardPaths::findExecutable(exe);
}
QString Kleo::gpgConfPath()
diff --git a/kleopatra/utils/gui-helper.h b/kleopatra/utils/gui-helper.h
index d8442b7..4e85896 100644
--- a/kleopatra/utils/gui-helper.h
+++ b/kleopatra/utils/gui-helper.h
@@ -50,7 +50,7 @@ static inline bool xconnect(const QObject *a, const char *signal,
{
return
QObject::connect(a, signal, b, slot) &&
- QObject::connect(b, signal, a, slot) ;
+ QObject::connect(b, signal, a, slot);
}
}
diff --git a/kleopatra/utils/headerview.cpp b/kleopatra/utils/headerview.cpp
index 7fd5e75..78a4404 100644
--- a/kleopatra/utils/headerview.cpp
+++ b/kleopatra/utils/headerview.cpp
@@ -55,7 +55,7 @@ static std::vector<int> section_sizes(const QHeaderView *view)
assert(view);
std::vector<int> result;
result.reserve(view->count());
- for (int i = 0, end = view->count() ; i != end ; ++i) {
+ for (int i = 0, end = view->count(); i != end; ++i) {
result.push_back(view->sectionSize(i));
}
return result;
@@ -64,7 +64,7 @@ static std::vector<int> section_sizes(const QHeaderView *view)
static void apply_section_sizes(QHeaderView *view, const std::vector<int> &newSizes)
{
assert(view);
- for (unsigned int i = 0, end = newSizes.size() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = newSizes.size(); i != end; ++i) {
view->resizeSection(i, newSizes[i]);
}
}
@@ -75,7 +75,7 @@ namespace
template <typename T_container>
inline typename T_container::value_type lookup(const T_container &c, unsigned int i, const typename T_container::value_type &defaultValue)
{
- return i < c.size() ? c[i] : defaultValue ;
+ return i < c.size() ? c[i] : defaultValue;
}
}
@@ -119,7 +119,7 @@ public:
return;
}
ensureNumSections(newCount);
- for (unsigned int i = 0, end = std::min<unsigned int>(newCount, modes.size()) ; i < end ; ++i) {
+ for (unsigned int i = 0, end = std::min<unsigned int>(newCount, modes.size()); i < end; ++i) {
q->QHeaderView::setResizeMode(i, modes[i]);
}
apply_section_sizes(q, sizes);
@@ -166,7 +166,7 @@ static std::vector<int> calculate_section_sizes(const std::vector<int> &oldSizes
int oldLength = 0, fixedLength = 0, stretchLength = 0;
int numStretchSections = 0;
- for (unsigned int i = 0, end = oldSizes.size() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = oldSizes.size(); i != end; ++i) {
oldLength += oldSizes[i];
if (lookup(modes, i, QHeaderView::Fixed) == QHeaderView::Stretch) {
stretchLength += oldSizes[i];
@@ -185,7 +185,7 @@ static std::vector<int> calculate_section_sizes(const std::vector<int> &oldSizes
std::vector<int> newSizes;
newSizes.reserve(oldSizes.size());
- for (unsigned int i = 0, end = oldSizes.size() ; i != end ; ++i)
+ for (unsigned int i = 0, end = oldSizes.size(); i != end; ++i)
newSizes.push_back(std::max(minSize,
lookup(modes, i, QHeaderView::Fixed) == QHeaderView::Stretch
? stretchLength ? stretchableSpace * oldSizes[i] / stretchLength : stretchableSpace / numStretchSections
@@ -255,7 +255,7 @@ void HeaderView::mouseReleaseEvent(QMouseEvent *e)
void HeaderView::updateGeometries()
{
- const std::vector<int> oldSizes = d->mousePressed ? section_sizes(this) : d->sizes ;
+ const std::vector<int> oldSizes = d->mousePressed ? section_sizes(this) : d->sizes;
hvDebug() << "before" << section_sizes(this) << '(' << d->sizes << ')';
diff --git a/kleopatra/utils/hex.cpp b/kleopatra/utils/hex.cpp
index 782711e..854174a 100644
--- a/kleopatra/utils/hex.cpp
+++ b/kleopatra/utils/hex.cpp
@@ -64,7 +64,7 @@ std::string Kleo::hexdecode(const std::string &in)
{
std::string result;
result.reserve(in.size());
- for (std::string::const_iterator it = in.begin(), end = in.end() ; it != end ; ++it)
+ for (std::string::const_iterator it = in.begin(), end = in.end(); it != end; ++it)
if (*it == '%') {
++it;
unsigned char ch = '\0';
@@ -93,7 +93,7 @@ std::string Kleo::hexencode(const std::string &in)
static const char hex[] = "0123456789ABCDEF";
- for (std::string::const_iterator it = in.begin(), end = in.end() ; it != end ; ++it)
+ for (std::string::const_iterator it = in.begin(), end = in.end(); it != end; ++it)
switch (const unsigned char ch = *it) {
default:
if ((ch >= '!' && ch <= '~') || ch > 0xA0) {
diff --git a/kleopatra/utils/input.cpp b/kleopatra/utils/input.cpp
index 6ef6c45..e6202bd 100644
--- a/kleopatra/utils/input.cpp
+++ b/kleopatra/utils/input.cpp
@@ -342,7 +342,7 @@ ProcessStdOutInput::ProcessStdOutInput(const QString &cmd, const QStringList &ar
m_proc(new Process)
{
const QIODevice::OpenMode openMode =
- stdin_.isEmpty() ? QIODevice::ReadOnly : QIODevice::ReadWrite ;
+ stdin_.isEmpty() ? QIODevice::ReadOnly : QIODevice::ReadWrite;
qCDebug(KLEOPATRA_LOG) << "cd" << wd.absolutePath() << endl << cmd << args << Outputter(stdin_);
if (cmd.isEmpty())
throw Exception(gpg_error(GPG_ERR_INV_ARG),
diff --git a/kleopatra/utils/kdlogtextwidget.cpp b/kleopatra/utils/kdlogtextwidget.cpp
index 421db52..16e0a3b 100644
--- a/kleopatra/utils/kdlogtextwidget.cpp
+++ b/kleopatra/utils/kdlogtextwidget.cpp
@@ -385,7 +385,7 @@ void KDLogTextWidget::paintEvent(QPaintEvent *e)
p.drawRect(visible);
#if 0 // leaves garbage
- for (unsigned int i = visibleLines.first % 2 ? visibleLines.first + 1 : visibleLines.first, end = visibleLines.second ; i < end ; i += 2) {
+ for (unsigned int i = visibleLines.first % 2 ? visibleLines.first + 1 : visibleLines.first, end = visibleLines.second; i < end; i += 2) {
p.drawRect(d->lineRect(i));
}
@@ -398,7 +398,7 @@ void KDLogTextWidget::paintEvent(QPaintEvent *e)
#endif
p.setBrush(palette().alternateBase());
- for (unsigned int i = visibleLines.first % 2 ? visibleLines.first : visibleLines.first + 1, end = visibleLines.second ; i < end ; i += 2) {
+ for (unsigned int i = visibleLines.first % 2 ? visibleLines.first : visibleLines.first + 1, end = visibleLines.second; i < end; i += 2) {
p.drawRect(d->lineRect(i));
}
@@ -409,10 +409,10 @@ void KDLogTextWidget::paintEvent(QPaintEvent *e)
}
// ### unused optimization: paint lines by styles to minimise pen changes.
- for (unsigned int i = visibleLines.first, end = visibleLines.second ; i != end ; ++i) {
+ for (unsigned int i = visibleLines.first, end = visibleLines.second; i != end; ++i) {
const Private::LineItem &li = d->lines[i];
assert(!li.styleID || d->styleByID.contains(li.styleID));
- const Private::Style &st = li.styleID ? d->styleByID[li.styleID] : defaultStyle ;
+ const Private::Style &st = li.styleID ? d->styleByID[li.styleID] : defaultStyle;
p.setPen(st.color);
p.drawText(0, i * cache.fontMetrics.lineSpacing + cache.fontMetrics.ascent, li.text);
@@ -521,7 +521,7 @@ void KDLogTextWidget::Private::enforceHistorySize()
if (numLimes <= historySize) {
return;
}
- const int remove = numLimes - historySize ;
+ const int remove = numLimes - historySize;
lines.erase(lines.begin(), lines.begin() + remove);
// can't quickly update the dimensions if the fontMetrics aren't uptodate.
@@ -564,7 +564,7 @@ void KDLogTextWidget::Private::updateScrollRanges()
updateCache();
if (QScrollBar *const sb = q->verticalScrollBar()) {
- const int document = lines.size() * cache.fontMetrics.lineSpacing ;
+ const int document = lines.size() * cache.fontMetrics.lineSpacing;
const int viewport = q->viewport()->height();
const int singleStep = cache.fontMetrics.lineSpacing;
set_scrollbar_properties(*sb, document, viewport, singleStep, Qt::Vertical);
@@ -623,7 +623,7 @@ int KDLogTextWidget::Private::lineByYCoordinate(int y) const
if (cache.fontMetrics.lineSpacing == 0) {
return -1;
}
- const int raw = y / cache.fontMetrics.lineSpacing ;
+ const int raw = y / cache.fontMetrics.lineSpacing;
if (raw < 0) {
return -1;
}
@@ -635,7 +635,7 @@ int KDLogTextWidget::Private::lineByYCoordinate(int y) const
static int get_scrollbar_offset(const QScrollBar *sb)
{
- return sb ? sb->value() : 0 ;
+ return sb ? sb->value() : 0;
}
QPoint KDLogTextWidget::Private::scrollOffset() const
diff --git a/kleopatra/utils/kdpipeiodevice.cpp b/kleopatra/utils/kdpipeiodevice.cpp
index def776c..f3068df 100644
--- a/kleopatra/utils/kdpipeiodevice.cpp
+++ b/kleopatra/utils/kdpipeiodevice.cpp
@@ -77,7 +77,7 @@ public:
unsigned int bytesInBuffer() const
{
- return (wptr + sizeof buffer - rptr) % sizeof buffer ;
+ return (wptr + sizeof buffer - rptr) % sizeof buffer;
}
bool bufferFull() const
@@ -93,7 +93,7 @@ public:
bool bufferContains(char ch)
{
const unsigned int bib = bytesInBuffer();
- for (unsigned int i = rptr ; i < rptr + bib ; ++i)
+ for (unsigned int i = rptr; i < rptr + bib; ++i)
if (buffer[i % sizeof buffer] == ch) {
return true;
}
@@ -531,7 +531,7 @@ bool KDPipeIODevice::waitForBytesWritten(int msecs)
LOCKED(w);
QDebug("KDPipeIODevice::waitForBytesWritten (%p,w=%p): entered locked area",
(void *)this, (void *) w);
- return w->bufferEmpty() || w->error || w->bufferEmptyCondition.wait(&w->mutex, msecs) ;
+ return w->bufferEmpty() || w->error || w->bufferEmptyCondition.wait(&w->mutex, msecs);
}
bool KDPipeIODevice::waitForReadyRead(int msecs)
@@ -553,7 +553,7 @@ bool KDPipeIODevice::waitForReadyRead(int msecs)
return true;
}
assert(false); // ### wtf?
- return r->bufferNotEmptyCondition.wait(&r->mutex, msecs) ;
+ return r->bufferNotEmptyCondition.wait(&r->mutex, msecs);
}
template <typename T>
@@ -633,7 +633,7 @@ qint64 KDPipeIODevice::readData(char *data, qint64 maxSize)
// woken with an empty buffer must mean either EOF or error:
assert(r->eof || r->error);
r->eofShortCut = true;
- return r->eof ? 0 : -1 ;
+ return r->eof ? 0 : -1;
}
QDebug("%p: KDPipeIODevice::readData: got bufferNotEmptyCondition, trying to read %lld bytes",
@@ -647,7 +647,7 @@ qint64 KDPipeIODevice::readData(char *data, qint64 maxSize)
qint64 Reader::readData(char *data, qint64 maxSize)
{
- qint64 numRead = rptr < wptr ? wptr - rptr : sizeof buffer - rptr ;
+ qint64 numRead = rptr < wptr ? wptr - rptr : sizeof buffer - rptr;
if (numRead > maxSize) {
numRead = maxSize;
}
@@ -657,7 +657,7 @@ qint64 Reader::readData(char *data, qint64 maxSize)
memcpy(data, buffer + rptr, numRead);
- rptr = (rptr + numRead) % sizeof buffer ;
+ rptr = (rptr + numRead) % sizeof buffer;
if (!bufferFull()) {
QDebug("%p: KDPipeIODevice::readData: signal bufferNotFullCondition", (void *) this);
diff --git a/kleopatra/utils/log.cpp b/kleopatra/utils/log.cpp
index 9747fd0..963b786 100644
--- a/kleopatra/utils/log.cpp
+++ b/kleopatra/utils/log.cpp
@@ -88,7 +88,7 @@ void Log::messageHandler(QtMsgType type, const char *msg)
toWrite -= written;
}
//append newline:
- while (fprintf(file, "\n") == 0) ;
+ while (fprintf(file, "\n") == 0);
fflush(file);
}
diff --git a/kleopatra/utils/output.cpp b/kleopatra/utils/output.cpp
index 7e543a5..2b9d080 100644
--- a/kleopatra/utils/output.cpp
+++ b/kleopatra/utils/output.cpp
@@ -111,9 +111,9 @@ public:
explicit TemporaryFile(QObject *parent) : QTemporaryFile(parent) {}
explicit TemporaryFile(const QString &templateName, QObject *parent) : QTemporaryFile(templateName, parent) {}
- void close() Q_DECL_OVERRIDE
- {
- if (isOpen()) {
+ void close() Q_DECL_OVERRIDE {
+ if (isOpen())
+ {
m_oldFileName = fileName();
}
QTemporaryFile::close();
@@ -197,16 +197,14 @@ public:
{
return m_customLabel.isEmpty() ? m_defaultLabel : m_customLabel;
}
- void setLabel(const QString &label) Q_DECL_OVERRIDE
- {
+ void setLabel(const QString &label) Q_DECL_OVERRIDE {
m_customLabel = label;
}
void setDefaultLabel(const QString &l)
{
m_defaultLabel = l;
}
- void setBinaryOpt(bool value) Q_DECL_OVERRIDE
- {
+ void setBinaryOpt(bool value) Q_DECL_OVERRIDE {
m_binaryOpt = value;
}
bool binaryOpt() const Q_DECL_OVERRIDE
@@ -226,32 +224,35 @@ public:
{
return m_isFinalized;
}
- void finalize() Q_DECL_OVERRIDE
- {
+ void finalize() Q_DECL_OVERRIDE {
qCDebug(KLEOPATRA_LOG) << this;
- if (m_isFinalized || m_isFinalizing) {
+ if (m_isFinalized || m_isFinalizing)
+ {
return;
}
m_isFinalizing = true;
try {
doFinalize();
- } catch (...) {
+ } catch (...)
+ {
m_isFinalizing = false;
throw;
}
m_isFinalizing = false;
m_isFinalized = true;
- if (m_cancelPending) {
+ if (m_cancelPending)
+ {
cancel();
}
}
- void cancel() Q_DECL_OVERRIDE
- {
+ void cancel() Q_DECL_OVERRIDE {
qCDebug(KLEOPATRA_LOG) << this;
- if (m_isFinalizing) {
+ if (m_isFinalizing)
+ {
m_cancelPending = true;
- } else if (!m_canceled) {
+ } else if (!m_canceled)
+ {
m_isFinalizing = true;
try {
doCancel();
@@ -292,12 +293,10 @@ public:
{
return m_io;
}
- void doFinalize() Q_DECL_OVERRIDE
- {
+ void doFinalize() Q_DECL_OVERRIDE {
m_io->reallyClose();
}
- void doCancel() Q_DECL_OVERRIDE
- {
+ void doCancel() Q_DECL_OVERRIDE {
doFinalize();
}
private:
@@ -313,8 +312,7 @@ public:
{
return m_proc;
}
- void doFinalize() Q_DECL_OVERRIDE
- {
+ void doFinalize() Q_DECL_OVERRIDE {
/*
Make sure the data is written in the output here. If this
is not done the output will be written in small chunks
@@ -324,16 +322,16 @@ public:
take ~30 seconds to write out a 10MB file in the 512 byte
chunks gpgme serves. */
qCDebug(KLEOPATRA_LOG) << "Waiting for " << m_proc->bytesToWrite()
- << " Bytes to be written";
+ << " Bytes to be written";
while (m_proc->waitForBytesWritten(PROCESS_MAX_RUNTIME_TIMEOUT));
- if (!m_proc->isClosed()) {
+ if (!m_proc->isClosed())
+ {
m_proc->close();
}
m_proc->waitForFinished(PROCESS_MAX_RUNTIME_TIMEOUT);
}
- void doCancel() Q_DECL_OVERRIDE
- {
+ void doCancel() Q_DECL_OVERRIDE {
m_proc->terminate();
QTimer::singleShot(PROCESS_TERMINATE_TIMEOUT, m_proc.get(), &QProcess::kill);
}
@@ -366,8 +364,7 @@ public:
return m_tmpFile;
}
void doFinalize() Q_DECL_OVERRIDE;
- void doCancel() Q_DECL_OVERRIDE
- {
+ void doCancel() Q_DECL_OVERRIDE {
qCDebug(KLEOPATRA_LOG) << this;
}
private:
@@ -493,7 +490,7 @@ void FileOutput::doFinalize()
m_tmpFile.reset(); // really close the file - needed on Windows for renaming :/
kleo_assert(!guard); // if this triggers, we need to audit for holder of shared_ptr<QIODevice>s.
- qCDebug(KLEOPATRA_LOG) << this << " renaming " << tmpFileName << "->" << m_fileName ;
+ qCDebug(KLEOPATRA_LOG) << this << " renaming " << tmpFileName << "->" << m_fileName;
if (QFile::rename(tmpFileName, m_fileName)) {
qCDebug(KLEOPATRA_LOG) << this << "succeeded";
@@ -506,7 +503,7 @@ void FileOutput::doFinalize()
throw Exception(gpg_error(GPG_ERR_CANCELED),
i18n("Overwriting declined"));
- qCDebug(KLEOPATRA_LOG) << this << "going to overwrite" << m_fileName ;
+ qCDebug(KLEOPATRA_LOG) << this << "going to overwrite" << m_fileName;
if (!QFile::remove(m_fileName))
throw Exception(errno ? gpg_error_from_errno(errno) : gpg_error(GPG_ERR_EIO),
diff --git a/kleopatra/utils/systemtrayicon.cpp b/kleopatra/utils/systemtrayicon.cpp
index b4ed5a2..08a883e 100644
--- a/kleopatra/utils/systemtrayicon.cpp
+++ b/kleopatra/utils/systemtrayicon.cpp
@@ -179,7 +179,7 @@ bool SystemTrayIcon::eventFilter(QObject *o, QEvent *e)
case QEvent::Show:
case QEvent::DeferredDelete:
QMetaObject::invokeMethod(this, "slotEnableDisableActions", Qt::QueuedConnection);
- default: ;
+ default:;
}
else if (o == d->attentionWindow)
switch (e->type()) {
@@ -189,7 +189,7 @@ bool SystemTrayIcon::eventFilter(QObject *o, QEvent *e)
case QEvent::Show:
case QEvent::DeferredDelete:
QMetaObject::invokeMethod(this, "slotEnableDisableActions", Qt::QueuedConnection);
- default: ;
+ default:;
}
return false;
}
diff --git a/kleopatra/utils/validation.cpp b/kleopatra/utils/validation.cpp
index dfbd85a..0bd847f 100644
--- a/kleopatra/utils/validation.cpp
+++ b/kleopatra/utils/validation.cpp
@@ -99,7 +99,7 @@ public:
<< "\n domain :" << domain
<< "\n domainEncoded :" << domainEncoded
<< "\n domainRestored:" << domainRestored
- << "\n encoded :" << encoded ;
+ << "\n encoded :" << encoded;
if (domain != domainRestored) {
return Invalid;
}
@@ -110,7 +110,7 @@ public:
// regexValidate (e.g. adding a . after marc in
// [email protected], intending to eventually arrive at
- int adjustedPos = pos <= atIdx ? pos : encoded.size() ;
+ int adjustedPos = pos <= atIdx ? pos : encoded.size();
return regexValidate(encoded, adjustedPos);
}
diff --git a/kleopatra/view/keylistcontroller.cpp b/kleopatra/view/keylistcontroller.cpp
index 0da24ae..9009678 100644
--- a/kleopatra/view/keylistcontroller.cpp
+++ b/kleopatra/view/keylistcontroller.cpp
@@ -315,7 +315,7 @@ static const struct {
{ SIGNAL(viewAboutToBeRemoved(QAbstractItemView*)), SLOT(removeView(QAbstractItemView*)) },
{ SIGNAL(currentViewChanged(QAbstractItemView*)), SLOT(slotCurrentViewChanged(QAbstractItemView*)) },
};
-static const unsigned int numTabs2Controller = sizeof tabs2controller / sizeof * tabs2controller ;
+static const unsigned int numTabs2Controller = sizeof tabs2controller / sizeof * tabs2controller;
void KeyListController::Private::connectTabWidget()
{
@@ -323,7 +323,7 @@ void KeyListController::Private::connectTabWidget()
return;
}
kdtools::for_each(tabWidget->views(), boost::bind(&Private::addView, this, _1));
- for (unsigned int i = 0 ; i < numTabs2Controller ; ++i) {
+ for (unsigned int i = 0; i < numTabs2Controller; ++i) {
connect(tabWidget, tabs2controller[i].signal, q, tabs2controller[i].slot);
}
}
@@ -333,7 +333,7 @@ void KeyListController::Private::disconnectTabWidget()
if (!tabWidget) {
return;
}
- for (unsigned int i = 0 ; i < numTabs2Controller ; ++i) {
+ for (unsigned int i = 0; i < numTabs2Controller; ++i) {
disconnect(tabWidget, tabs2controller[i].signal, q, tabs2controller[i].slot);
}
kdtools::for_each(tabWidget->views(), boost::bind(&Private::removeView, this, _1));
diff --git a/kleopatra/view/keylistcontroller.h b/kleopatra/view/keylistcontroller.h
index 169dee2..11d36b1 100644
--- a/kleopatra/view/keylistcontroller.h
+++ b/kleopatra/view/keylistcontroller.h
@@ -92,7 +92,7 @@ public:
bool shutdownWarningRequired() const;
private:
- void registerAction(QAction *action, Command::Restrictions restrictions , Command * (*create)(QAbstractItemView *, KeyListController *));
+ void registerAction(QAction *action, Command::Restrictions restrictions, Command * (*create)(QAbstractItemView *, KeyListController *));
template <typename T_Command>
static Command *create(QAbstractItemView *v, KeyListController *c)
diff --git a/kleopatra/view/keytreeview.cpp b/kleopatra/view/keytreeview.cpp
index 7006aa3..5b29e28 100644
--- a/kleopatra/view/keytreeview.cpp
+++ b/kleopatra/view/keytreeview.cpp
@@ -411,11 +411,11 @@ static const struct {
SLOT(setKeyFilter(boost::shared_ptr<Kleo::KeyFilter>))
},
};
-static const unsigned int numConnections = sizeof connections / sizeof * connections ;
+static const unsigned int numConnections = sizeof connections / sizeof * connections;
void KeyTreeView::disconnectSearchBar(const QObject *bar)
{
- for (unsigned int i = 0 ; i < numConnections ; ++i) {
+ for (unsigned int i = 0; i < numConnections; ++i) {
disconnect(this, connections[i].signal, bar, connections[i].slot);
disconnect(bar, connections[i].signal, this, connections[i].slot);
}
@@ -423,7 +423,7 @@ void KeyTreeView::disconnectSearchBar(const QObject *bar)
bool KeyTreeView::connectSearchBar(const QObject *bar)
{
- for (unsigned int i = 0 ; i < numConnections ; ++i)
+ for (unsigned int i = 0; i < numConnections; ++i)
if (!connect(this, connections[i].signal, bar, connections[i].slot) ||
!connect(bar, connections[i].signal, this, connections[i].slot)) {
return false;
diff --git a/kleopatra/view/keytreeview.h b/kleopatra/view/keytreeview.h
index 1b56317..474110a 100644
--- a/kleopatra/view/keytreeview.h
+++ b/kleopatra/view/keytreeview.h
@@ -68,7 +68,7 @@ public:
AbstractKeyListModel *model() const
{
- return m_isHierarchical ? hierarchicalModel() : flatModel() ;
+ return m_isHierarchical ? hierarchicalModel() : flatModel();
}
AbstractKeyListModel *flatModel() const
diff --git a/kleopatra/view/tabwidget.cpp b/kleopatra/view/tabwidget.cpp
index f5ad12b..9e8671d 100644
--- a/kleopatra/view/tabwidget.cpp
+++ b/kleopatra/view/tabwidget.cpp
@@ -91,13 +91,13 @@ public:
QString title() const
{
- return m_title.isEmpty() && keyFilter() ? keyFilter()->name() : m_title ;
+ return m_title.isEmpty() && keyFilter() ? keyFilter()->name() : m_title;
}
void setTitle(const QString &title);
QString toolTip() const
{
- return m_toolTip.isEmpty() ? title() : m_toolTip ;
+ return m_toolTip.isEmpty() ? title() : m_toolTip;
}
void setToolTip(const QString &tip);
@@ -192,14 +192,14 @@ Page::Page(const KConfigGroup &group, QWidget *parent)
: KeyTreeView(group.readEntry(STRING_FILTER_ENTRY),
KeyFilterManager::instance()->keyFilterByID(group.readEntry(KEY_FILTER_ENTRY)),
0, parent),
- m_title(group.readEntry(TITLE_ENTRY)),
- m_toolTip(),
- m_isTemporary(false),
- m_canBeClosed(!group.isImmutable()),
- m_canBeRenamed(!group.isEntryImmutable(TITLE_ENTRY)),
- m_canChangeStringFilter(!group.isEntryImmutable(STRING_FILTER_ENTRY)),
- m_canChangeKeyFilter(!group.isEntryImmutable(KEY_FILTER_ENTRY)),
- m_canChangeHierarchical(!group.isEntryImmutable(HIERARCHICAL_VIEW_ENTRY))
+ m_title(group.readEntry(TITLE_ENTRY)),
+ m_toolTip(),
+ m_isTemporary(false),
+ m_canBeClosed(!group.isImmutable()),
+ m_canBeRenamed(!group.isEntryImmutable(TITLE_ENTRY)),
+ m_canChangeStringFilter(!group.isEntryImmutable(STRING_FILTER_ENTRY)),
+ m_canChangeKeyFilter(!group.isEntryImmutable(KEY_FILTER_ENTRY)),
+ m_canChangeHierarchical(!group.isEntryImmutable(HIERARCHICAL_VIEW_ENTRY))
{
init();
setHierarchicalView(group.readEntry(HIERARCHICAL_VIEW_ENTRY, true));
@@ -439,9 +439,9 @@ TabWidget::Private::Private(TabWidget *qq)
tabWidget.tabBar()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(&tabWidget, SIGNAL(currentChanged(int)), q, SLOT(currentIndexChanged(int)));
- connect(tabWidget.tabBar(), &QWidget::customContextMenuRequested, q, [this](const QPoint& p) {
- slotContextMenu(p);
- });
+ connect(tabWidget.tabBar(), &QWidget::customContextMenuRequested, q, [this](const QPoint & p) {
+ slotContextMenu(p);
+ });
const action_data actionDataNew = {
"window_new_tab", i18n("New Tab"), i18n("Open a new tab"),
@@ -485,11 +485,11 @@ TabWidget::Private::Private(TabWidget *qq)
},
};
- for (unsigned int i = 0 ; i < NumPageActions ; ++i) {
+ for (unsigned int i = 0; i < NumPageActions; ++i) {
currentPageActions[i] = make_action_from_data(actionData[i], q);
}
- for (unsigned int i = 0 ; i < NumPageActions ; ++i) {
+ for (unsigned int i = 0; i < NumPageActions; ++i) {
action_data ad = actionData[i];
assert(QString::fromLatin1(ad.name).startsWith(QStringLiteral("window_")));
ad.name = ad.name + strlen("window_");
@@ -509,7 +509,7 @@ void TabWidget::Private::slotContextMenu(const QPoint &p)
Page *const contextMenuPage = static_cast<Page *>(tabWidget.widget(tabUnderPos));
const Page *const current = currentPage();
- QAction **const actions = contextMenuPage == current ? currentPageActions : otherPageActions ;
+ QAction **const actions = contextMenuPage == current ? currentPageActions : otherPageActions;
enableDisablePageActions(actions, contextMenuPage);
@@ -579,9 +579,9 @@ void TabWidget::Private::enableDisablePageActions(QAction *actions[], const Page
actions[CollapseAll] ->setEnabled(p && p->isHierarchicalView());
if (tabWidget.count() < 2) {
- tabWidget.tabBar()->hide();
+ tabWidget.tabBar()->hide();
} else {
- tabWidget.tabBar()->show();
+ tabWidget.tabBar()->show();
}
}
@@ -718,7 +718,7 @@ void TabWidget::setFlatModel(AbstractKeyListModel *model)
return;
}
d->flatModel = model;
- for (unsigned int i = 0, end = count() ; i != end ; ++i)
+ for (unsigned int i = 0, end = count(); i != end; ++i)
if (Page *const page = d->page(i)) {
page->setFlatModel(model);
}
@@ -735,7 +735,7 @@ void TabWidget::setHierarchicalModel(AbstractKeyListModel *model)
return;
}
d->hierarchicalModel = model;
- for (unsigned int i = 0, end = count() ; i != end ; ++i)
+ for (unsigned int i = 0, end = count(); i != end; ++i)
if (Page *const page = d->page(i)) {
page->setHierarchicalModel(model);
}
@@ -775,7 +775,7 @@ std::vector<QAbstractItemView *> TabWidget::views() const
std::vector<QAbstractItemView *> result;
const unsigned int N = count();
result.reserve(N);
- for (unsigned int i = 0 ; i != N ; ++i)
+ for (unsigned int i = 0; i != N; ++i)
if (const Page *const p = d->page(i)) {
result.push_back(p->view());
}
@@ -798,7 +798,7 @@ unsigned int TabWidget::count() const
void TabWidget::setMultiSelection(bool on)
{
- for (unsigned int i = 0, end = count() ; i != end ; ++i)
+ for (unsigned int i = 0, end = count(); i != end; ++i)
if (const Page *const p = d->page(i))
if (QTreeView *const view = p->view()) {
view->setSelectionMode(on ? QAbstractItemView::ExtendedSelection : QAbstractItemView::SingleSelection);
@@ -811,7 +811,7 @@ void TabWidget::createActions(KActionCollection *coll)
return;
}
coll->addAction(d->newAction->objectName(), d->newAction);
- for (unsigned int i = 0 ; i < Private::NumPageActions ; ++i) {
+ for (unsigned int i = 0; i < Private::NumPageActions; ++i) {
QAction *a = d->currentPageActions[i];
coll->addAction(a->objectName(), a);
}
@@ -871,7 +871,7 @@ QTreeView *TabWidget::Private::addView(Page *page, Page *columnReference)
static QStringList extractViewGroups(const KConfig *config)
{
- return config ? config->groupList().filter(QRegExp(QStringLiteral("^View #\\d+$"))) : QStringList() ;
+ return config ? config->groupList().filter(QRegExp(QStringLiteral("^View #\\d+$"))) : QStringList();
}
// work around deleteGroup() not deleting groups out of groupList():
@@ -906,7 +906,7 @@ void TabWidget::saveViews(KConfig *config) const
config->deleteGroup(group);
}
unsigned int vg = 0;
- for (unsigned int i = 0, end = count() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = count(); i != end; ++i) {
if (const Page *const p = d->page(i)) {
if (p->isTemporary()) {
continue;
diff --git a/kmail/aboutdata.cpp b/kmail/aboutdata.cpp
index d7f00f7..e74ed7f 100644
--- a/kmail/aboutdata.cpp
+++ b/kmail/aboutdata.cpp
@@ -279,7 +279,7 @@ static const about_data credits[] = {
{ "Davide Bettio", Q_NULLPTR, "[email protected]", Q_NULLPTR },
{ "Pradeepto Bhattacharya", Q_NULLPTR, "[email protected]", Q_NULLPTR },
{ "Bruno Bigras", Q_NULLPTR, "[email protected]", Q_NULLPTR },
- { "Bertjan Broeksema", Q_NULLPTR , "[email protected]", Q_NULLPTR },
+ { "Bertjan Broeksema", Q_NULLPTR, "[email protected]", Q_NULLPTR },
{ "Albert Astals Cid", Q_NULLPTR, Q_NULLPTR, Q_NULLPTR }, // fix for bug:95441 (folder tree context menu doesn't show shortcuts assigned to the actions)
{ "Cornelius Schumacher", Q_NULLPTR, "[email protected]", Q_NULLPTR }, // implemented the new recipients editor and picker
{
@@ -373,13 +373,13 @@ AboutData::AboutData()
using KMail::authors;
using KMail::credits;
const unsigned int numberAuthors(sizeof authors / sizeof * authors);
- for (unsigned int i = 0 ; i < numberAuthors; ++i) {
+ for (unsigned int i = 0; i < numberAuthors; ++i) {
addAuthor(i18n(authors[i].name), authors[i].desc ? i18n(authors[i].desc) : QString(),
QLatin1String(authors[i].email), QLatin1String(authors[i].web));
}
const unsigned int numberCredits(sizeof credits / sizeof * credits);
- for (unsigned int i = 0 ; i < numberCredits; ++i) {
+ for (unsigned int i = 0; i < numberCredits; ++i) {
addCredit(i18n(credits[i].name), credits[i].desc ? i18n(credits[i].desc) : QString(),
QLatin1String(credits[i].email), QLatin1String(credits[i].web));
}
diff --git a/kmail/antispam-virus/antispamwizard.cpp b/kmail/antispam-virus/antispamwizard.cpp
index c557f2d..f3b265e 100644
--- a/kmail/antispam-virus/antispamwizard.cpp
+++ b/kmail/antispam-virus/antispamwizard.cpp
@@ -578,7 +578,7 @@ void AntiSpamWizard::checkToolAvailability()
void AntiSpamWizard::slotHelpClicked()
{
- KHelpClient::invokeHelp((mMode == AntiSpam) ? QStringLiteral("the-anti-spam-wizard") : QStringLiteral("the-anti-virus-wizard") , QStringLiteral("kmail"));
+ KHelpClient::invokeHelp((mMode == AntiSpam) ? QStringLiteral("the-anti-spam-wizard") : QStringLiteral("the-anti-virus-wizard"), QStringLiteral("kmail"));
}
void AntiSpamWizard::slotBuildSummary()
diff --git a/kmail/collectionpage/collectionmailinglistpage.cpp b/kmail/collectionpage/collectionmailinglistpage.cpp
index 754bcfe..3f8df8b 100644
--- a/kmail/collectionpage/collectionmailinglistpage.cpp
+++ b/kmail/collectionpage/collectionmailinglistpage.cpp
@@ -218,7 +218,7 @@ void CollectionMailingListPage::slotFetchDone(KJob *job)
Akonadi::Item::List items = fjob->items();
const int maxchecks = 5;
int num = items.size();
- for (int i = --num ; (i > num - maxchecks) && (i >= 0); --i) {
+ for (int i = --num; (i > num - maxchecks) && (i >= 0); --i) {
Akonadi::Item item = items[i];
if (item.hasPayload<KMime::Message::Ptr>()) {
KMime::Message::Ptr message = item.payload<KMime::Message::Ptr>();
diff --git a/kmail/configuredialog/configureappearancepage.cpp b/kmail/configuredialog/configureappearancepage.cpp
index 0ac9b95..d8ce176 100644
--- a/kmail/configuredialog/configureappearancepage.cpp
+++ b/kmail/configuredialog/configureappearancepage.cpp
@@ -180,7 +180,7 @@ AppearancePageFontsTab::AppearancePageFontsTab(QWidget *parent)
QStringList fontDescriptions;
fontDescriptions.reserve(numFontNames);
- for (int i = 0 ; i < numFontNames ; ++i) {
+ for (int i = 0; i < numFontNames; ++i) {
fontDescriptions << i18n(fontNames[i].displayName);
}
mFontLocationCombo->addItems(fontDescriptions);
@@ -222,7 +222,7 @@ void AppearancePage::FontsTab::slotFontSelectorChanged(int index)
if (mActiveFontIndex == 0) {
mFont[0] = mFontChooser->font();
// hardcode the family and size of "message body" dependant fonts:
- for (int i = 0 ; i < numFontNames ; ++i)
+ for (int i = 0; i < numFontNames; ++i)
if (!fontNames[i].enableFamilyAndSize) {
// ### shall we copy the font and set the save and re-set
// {regular,italic,bold,bold italic} property or should we
@@ -258,7 +258,7 @@ void AppearancePage::FontsTab::doLoadOther()
mFont[0] = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
- for (int i = 0 ; i < numFontNames ; ++i) {
+ for (int i = 0; i < numFontNames; ++i) {
const QString configName = QLatin1String(fontNames[i].configName);
if (configName == QLatin1String("MessageListFont")) {
mFont[i] = MessageList::MessageListSettings::self()->messageListFont();
@@ -294,7 +294,7 @@ void AppearancePage::FontsTab::save()
const bool customFonts = mCustomFontCheck->isChecked();
MessageCore::MessageCoreSettings::self()->setUseDefaultFonts(!customFonts);
- for (int i = 0 ; i < numFontNames ; ++i) {
+ for (int i = 0; i < numFontNames; ++i) {
const QString configName = QLatin1String(fontNames[i].configName);
if (customFonts && configName == QLatin1String("MessageListFont")) {
MessageList::MessageListSettings::self()->setMessageListFont(mFont[i]);
@@ -363,7 +363,7 @@ AppearancePageColorsTab::AppearancePageColorsTab(QWidget *parent)
// color list box:
mColorList = new ColorListBox(this);
mColorList->setEnabled(false); // since !mCustomColorCheck->isChecked()
- for (int i = 0 ; i < numColorNames ; ++i) {
+ for (int i = 0; i < numColorNames; ++i) {
mColorList->addColor(i18n(colorNames[i].displayName));
}
vlay->addWidget(mColorList, 1);
@@ -439,7 +439,7 @@ void AppearancePage::ColorsTab::loadColor(bool loadFromConfig)
scheme.background().color() // reader background color
};
- for (int i = 0 ; i < numColorNames ; ++i) {
+ for (int i = 0; i < numColorNames; ++i) {
if (loadFromConfig) {
const QString configName = QLatin1String(colorNames[i].configName);
if (configName == QLatin1String("UnreadMessageColor")) {
@@ -482,7 +482,7 @@ void AppearancePage::ColorsTab::save()
KColorScheme scheme(QPalette::Active, KColorScheme::View);
- for (int i = 0 ; i < numColorNames ; ++i) {
+ for (int i = 0; i < numColorNames; ++i) {
const QString configName = QLatin1String(colorNames[i].configName);
if (customColors && configName == QLatin1String("UnreadMessageColor")) {
MessageList::MessageListSettings::self()->setUnreadMessageColor(mColorList->color(i));
@@ -707,7 +707,7 @@ AppearancePageHeadersTab::AppearancePageHeadersTab(QWidget *parent)
mDateDisplay->setExclusive(true);
gvlay = new QVBoxLayout(mDateDisplayBox);
- for (int i = 0 ; i < numDateDisplayConfig ; ++i) {
+ for (int i = 0; i < numDateDisplayConfig; ++i) {
const char *label = dateDisplayConfig[i].displayName;
QString buttonLabel;
if (QString::fromLatin1(label).contains(QStringLiteral("%1"))) {
@@ -847,7 +847,7 @@ void AppearancePage::HeadersTab::setDateDisplay(int num, const QString &format)
mCustomDateFormatEdit->setText(format);
}
- for (int i = 0 ; i < numDateDisplayConfig ; ++i)
+ for (int i = 0; i < numDateDisplayConfig; ++i)
if (dateDisplay == dateDisplayConfig[i].dateDisplay) {
mDateDisplay->button(dateDisplay)->setChecked(true);
return;
diff --git a/kmail/configuredialog/configurecomposerpage.cpp b/kmail/configuredialog/configurecomposerpage.cpp
index 71f8e68..ec15b0f 100644
--- a/kmail/configuredialog/configurecomposerpage.cpp
+++ b/kmail/configuredialog/configurecomposerpage.cpp
@@ -936,8 +936,8 @@ void ComposerPage::CharsetTab::doLoadOther()
}
QStringList charsets = MessageComposer::MessageComposerSettings::preferredCharsets();
QStringList::Iterator end(charsets.end());
- for (QStringList::Iterator it = charsets.begin() ;
- it != end ; ++it)
+ for (QStringList::Iterator it = charsets.begin();
+ it != end; ++it)
if ((*it) == QLatin1String("locale")) {
QByteArray cset = kmkernel->networkCodec()->name();
cset = cset.toLower();
@@ -968,7 +968,7 @@ void ComposerPage::CharsetTab::save()
QStringList::Iterator it = charsetList.begin();
QStringList::Iterator end = charsetList.end();
- for (; it != end ; ++it)
+ for (; it != end; ++it)
if ((*it).endsWith(QLatin1String("(locale)"))) {
(*it) = QStringLiteral("locale");
}
@@ -1161,7 +1161,7 @@ void ComposerPage::HeadersTab::doLoadOther()
QTreeWidgetItem *item = Q_NULLPTR;
const int count = KMailSettings::self()->customMessageHeadersCount();
- for (int i = 0 ; i < count ; ++i) {
+ for (int i = 0; i < count; ++i) {
KConfigGroup config(KMKernel::self()->config(),
QLatin1String("Mime #") + QString::number(i));
const QString name = config.readEntry("name");
diff --git a/kmail/configuredialog/configuredialog_p.cpp b/kmail/configuredialog/configuredialog_p.cpp
index 7c30f22..1f39347 100644
--- a/kmail/configuredialog/configuredialog_p.cpp
+++ b/kmail/configuredialog/configuredialog_p.cpp
@@ -44,7 +44,7 @@ void ConfigModuleWithTabs::showEvent(QShowEvent *event)
void ConfigModuleWithTabs::load()
{
const int numberOfTab = mTabWidget->count();
- for (int i = 0 ; i < numberOfTab ; ++i) {
+ for (int i = 0; i < numberOfTab; ++i) {
ConfigModuleTab *tab = dynamic_cast<ConfigModuleTab *>(mTabWidget->widget(i));
if (tab) {
tab->load();
@@ -58,7 +58,7 @@ void ConfigModuleWithTabs::save()
if (mWasInitialized) {
KCModule::save();
const int numberOfTab = mTabWidget->count();
- for (int i = 0 ; i < numberOfTab ; ++i) {
+ for (int i = 0; i < numberOfTab; ++i) {
ConfigModuleTab *tab = dynamic_cast<ConfigModuleTab *>(mTabWidget->widget(i));
if (tab) {
tab->save();
diff --git a/kmail/configuredialog/configuremiscpage.cpp b/kmail/configuredialog/configuremiscpage.cpp
index 7641f30..861d0b7 100644
--- a/kmail/configuredialog/configuremiscpage.cpp
+++ b/kmail/configuredialog/configuremiscpage.cpp
@@ -82,7 +82,7 @@ MiscPageFolderTab::MiscPageFolderTab(QWidget *parent)
connect(mMMTab.mActionEnterFolder, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &MiscPageFolderTab::slotEmitChanged);
connect(mMMTab.mDelayedMarkTime, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &MiscPageFolderTab::slotEmitChanged);
connect(mMMTab.mDelayedMarkAsRead, &QAbstractButton::toggled, mMMTab.mDelayedMarkTime, &QWidget::setEnabled);
- connect(mMMTab.mDelayedMarkAsRead, &QAbstractButton::toggled, this , &ConfigModuleTab::slotEmitChanged);
+ connect(mMMTab.mDelayedMarkAsRead, &QAbstractButton::toggled, this, &ConfigModuleTab::slotEmitChanged);
connect(mMMTab.mShowPopupAfterDnD, &QCheckBox::stateChanged, this, &MiscPageFolderTab::slotEmitChanged);
connect(mOnStartupOpenFolder, &MailCommon::FolderRequester::folderChanged, this, &MiscPageFolderTab::slotEmitChanged);
connect(mMMTab.mEmptyTrashCheck, &QCheckBox::stateChanged, this, &MiscPageFolderTab::slotEmitChanged);
@@ -131,7 +131,7 @@ MiscPageAgentSettingsTab::MiscPageAgentSettingsTab(QWidget *parent)
: ConfigModuleTab(parent)
{
QHBoxLayout *l = new QHBoxLayout(this);
- l->setContentsMargins(0 , 0, 0, 0);
+ l->setContentsMargins(0, 0, 0, 0);
mConfigureAgent = new ConfigureAgentsWidget;
l->addWidget(mConfigureAgent);
@@ -163,7 +163,7 @@ MiscPageInviteTab::MiscPageInviteTab(QWidget *parent)
{
mInvitationUi = new MessageViewer::InvitationSettings(this);
QHBoxLayout *l = new QHBoxLayout(this);
- l->setContentsMargins(0 , 0, 0, 0);
+ l->setContentsMargins(0, 0, 0, 0);
l->addWidget(mInvitationUi);
connect(mInvitationUi, &MessageViewer::InvitationSettings::changed, this, &MiscPageInviteTab::slotEmitChanged);
}
@@ -203,7 +203,7 @@ MiscPagePrintingTab::MiscPagePrintingTab(QWidget *parent)
{
mPrintingUi = new MessageViewer::PrintingSettings(this);
QHBoxLayout *l = new QHBoxLayout(this);
- l->setContentsMargins(0 , 0, 0, 0);
+ l->setContentsMargins(0, 0, 0, 0);
l->addWidget(mPrintingUi);
connect(mPrintingUi, &MessageViewer::PrintingSettings::changed, this, &MiscPagePrintingTab::slotEmitChanged);
}
diff --git a/kmail/configuredialog/configuresecuritypage.cpp b/kmail/configuredialog/configuresecuritypage.cpp
index c963e1b..b273544 100644
--- a/kmail/configuredialog/configuresecuritypage.cpp
+++ b/kmail/configuredialog/configuresecuritypage.cpp
@@ -274,7 +274,7 @@ void SecurityPage::ComposerCryptoTab::doLoadOther()
loadWidget(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
loadWidget(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem());
- loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem()) ;
+ loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem());
loadWidget(mWidget->mNeverEncryptWhenSavingInDrafts, KMailSettings::self()->neverEncryptDraftsItem());
loadWidget(mWidget->mStoreEncrypted, KMailSettings::self()->cryptoStoreEncryptedItem());
@@ -286,7 +286,7 @@ void SecurityPage::ComposerCryptoTab::save()
saveCheckBox(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
saveCheckBox(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem());
- saveCheckBox(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem()) ;
+ saveCheckBox(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem());
saveCheckBox(mWidget->mNeverEncryptWhenSavingInDrafts, KMailSettings::self()->neverEncryptDraftsItem());
saveCheckBox(mWidget->mStoreEncrypted, KMailSettings::self()->cryptoStoreEncryptedItem());
saveCheckBox(mWidget->mShowEncSignIndicator, KMailSettings::self()->showCryptoLabelIndicatorItem());
@@ -297,7 +297,7 @@ void SecurityPage::ComposerCryptoTab::doLoadFromGlobalSettings()
loadWidget(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
loadWidget(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem());
- loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem()) ;
+ loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem());
loadWidget(mWidget->mNeverEncryptWhenSavingInDrafts, KMailSettings::self()->neverEncryptDraftsItem());
loadWidget(mWidget->mStoreEncrypted, KMailSettings::self()->cryptoStoreEncryptedItem());
loadWidget(mWidget->mShowEncSignIndicator, KMailSettings::self()->showCryptoLabelIndicatorItem());
diff --git a/kmail/dialog/archivefolderdialog.cpp b/kmail/dialog/archivefolderdialog.cpp
index 6b69e1e..6fe7098 100644
--- a/kmail/dialog/archivefolderdialog.cpp
+++ b/kmail/dialog/archivefolderdialog.cpp
@@ -53,7 +53,7 @@ QString ArchiveFolderDialog::standardArchivePath(const QString &folderName)
currentPath = QDir::homePath();
}
return currentPath + QLatin1Char('/') +
- i18nc("Start of the filename for a mail archive file" , "Archive") + QLatin1Char('_') + folderName + QLatin1Char('_') + QDate::currentDate().toString(Qt::ISODate) + QLatin1String(".tar.bz2");
+ i18nc("Start of the filename for a mail archive file", "Archive") + QLatin1Char('_') + folderName + QLatin1Char('_') + QDate::currentDate().toString(Qt::ISODate) + QLatin1String(".tar.bz2");
}
ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
diff --git a/kmail/dialog/kmknotify.cpp b/kmail/dialog/kmknotify.cpp
index 5387826..983e1e9 100644
--- a/kmail/dialog/kmknotify.cpp
+++ b/kmail/dialog/kmknotify.cpp
@@ -78,7 +78,7 @@ KMKnotify::KMKnotify(QWidget *parent)
mainLayout->addWidget(buttonBox);
connect(m_comboNotify, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &KMKnotify::slotComboChanged);
connect(okButton, &QPushButton::clicked, this, &KMKnotify::slotOk);
- connect(m_notifyWidget, &KNotifyConfigWidget::changed, this , &KMKnotify::slotConfigChanged);
+ connect(m_notifyWidget, &KNotifyConfigWidget::changed, this, &KMKnotify::slotConfigChanged);
initCombobox();
readConfig();
}
diff --git a/kmail/editor/kmcomposewin.cpp b/kmail/editor/kmcomposewin.cpp
index fce1162..7a1de97 100644
--- a/kmail/editor/kmcomposewin.cpp
+++ b/kmail/editor/kmcomposewin.cpp
@@ -1369,7 +1369,7 @@ void KMComposeWin::setupActions(void)
QStringList listCryptoFormat;
listCryptoFormat.reserve(numCryptoMessageFormats);
- for (int i = 0 ; i < numCryptoMessageFormats ; ++i) {
+ for (int i = 0; i < numCryptoMessageFormats; ++i) {
listCryptoFormat.push_back(Kleo::cryptoMessageFormatToLabel(cryptoMessageFormats[i]));
}
@@ -1579,7 +1579,7 @@ void KMComposeWin::setMessage(const KMime::Message::Ptr &newMsg, bool lastSignSt
// unless the identity is sticky
if (!stickyIdentity) {
disconnect(mComposerBase->identityCombo(), SIGNAL(identityChanged(uint)),
- this, SLOT(slotIdentityChanged(uint))) ;
+ this, SLOT(slotIdentityChanged(uint)));
}
// load the mId into the gui, sticky or not, without emitting
@@ -2906,7 +2906,7 @@ void KMComposeWin::disableHtml(MessageComposer::ComposerViewBase::Confirmation c
if (confirmation == MessageComposer::ComposerViewBase::LetUserConfirm && mComposerBase->editor()->composerControler()->isFormattingUsed() && !mForceDisableHtml) {
int choice = KMessageBox::warningYesNoCancel(this, i18n("Turning HTML mode off "
"will cause the text to lose the formatting. Are you sure?"),
- i18n("Lose the formatting?"), KGuiItem(i18n("Lose Formatting")), KGuiItem(i18n("Add Markup Plain Text")) , KStandardGuiItem::cancel(),
+ i18n("Lose the formatting?"), KGuiItem(i18n("Lose Formatting")), KGuiItem(i18n("Add Markup Plain Text")), KStandardGuiItem::cancel(),
QStringLiteral("LoseFormattingWarning"));
switch (choice) {
diff --git a/kmail/editor/kmcomposewin.h b/kmail/editor/kmcomposewin.h
index 9f5deef..df8417c 100644
--- a/kmail/editor/kmcomposewin.h
+++ b/kmail/editor/kmcomposewin.h
@@ -391,7 +391,7 @@ private Q_SLOTS:
void slotPrintComposeResult(KJob *job);
- void slotSendFailed(const QString &msg , MessageComposer::ComposerViewBase::FailedType type);
+ void slotSendFailed(const QString &msg, MessageComposer::ComposerViewBase::FailedType type);
void slotSendSuccessful();
/**
@@ -494,7 +494,7 @@ private:
/**
* Apply template to new or unmodified message.
*/
- void applyTemplate(uint uoid , uint uOldId);
+ void applyTemplate(uint uoid, uint uOldId);
/**
* Set the quote prefix according to identity.
diff --git a/kmail/identity/identitydialog.cpp b/kmail/identity/identitydialog.cpp
index 22edd8a..cbf23ea 100644
--- a/kmail/identity/identitydialog.cpp
+++ b/kmail/identity/identitydialog.cpp
@@ -624,7 +624,7 @@ bool DoesntMatchEMailAddress::operator()(const GpgME::Key &key) const
{
const std::vector<GpgME::UserID> uids = key.userIDs();
std::vector<GpgME::UserID>::const_iterator end = uids.end();
- for (std::vector<GpgME::UserID>::const_iterator it = uids.begin() ; it != end ; ++it)
+ for (std::vector<GpgME::UserID>::const_iterator it = uids.begin(); it != end; ++it)
if (checkForEmail(it->email() ? it->email() : it->id())) {
return false;
}
diff --git a/kmail/identity/identitypage.cpp b/kmail/identity/identitypage.cpp
index 0ff14e6..61e8775 100644
--- a/kmail/identity/identitypage.cpp
+++ b/kmail/identity/identitypage.cpp
@@ -152,7 +152,7 @@ void IdentityPage::slotNewIdentity()
break;
case NewIdentityDialog::Empty:
mIdentityManager->newFromScratch(identityName);
- default: ;
+ default:;
}
//
@@ -256,7 +256,7 @@ void IdentityPage::slotRenameIdentity()
mIPage.mIdentityList->editItem(item);
}
-void IdentityPage::slotRenameIdentity(KMail::IdentityListViewItem *item , const QString &text)
+void IdentityPage::slotRenameIdentity(KMail::IdentityListViewItem *item, const QString &text)
{
if (!item) {
return;
diff --git a/kmail/identity/xfaceconfigurator.cpp b/kmail/identity/xfaceconfigurator.cpp
index 0421ec7..f913e6a 100644
--- a/kmail/identity/xfaceconfigurator.cpp
+++ b/kmail/identity/xfaceconfigurator.cpp
@@ -223,7 +223,7 @@ void XFaceConfigurator::slotSelectFile()
Q_FOREACH (const QByteArray &mime, mimeTypes) {
filter += QString::fromLatin1(mime);
}
- const QUrl url = QFileDialog::getOpenFileUrl(this, QString() , QString(), i18n("Image (%1)", filter));
+ const QUrl url = QFileDialog::getOpenFileUrl(this, QString(), QString(), i18n("Image (%1)", filter));
if (!url.isEmpty()) {
setXfaceFromFile(url);
}
diff --git a/kmail/job/createfollowupreminderonexistingmessagejob.cpp b/kmail/job/createfollowupreminderonexistingmessagejob.cpp
index 235e028..6de931e 100644
--- a/kmail/job/createfollowupreminderonexistingmessagejob.cpp
+++ b/kmail/job/createfollowupreminderonexistingmessagejob.cpp
@@ -45,7 +45,7 @@ void CreateFollowupReminderOnExistingMessageJob::start()
void CreateFollowupReminderOnExistingMessageJob::doStart()
{
- Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob(mMessageItem , this);
+ Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob(mMessageItem, this);
job->fetchScope().fetchFullPayload(true);
connect(job, &KJob::result, this, &CreateFollowupReminderOnExistingMessageJob::itemFetchJobDone);
}
diff --git a/kmail/job/createnewcontactjob.cpp b/kmail/job/createnewcontactjob.cpp
index bde88f0..abe6ebc 100644
--- a/kmail/job/createnewcontactjob.cpp
+++ b/kmail/job/createnewcontactjob.cpp
@@ -67,7 +67,7 @@ void CreateNewContactJob::slotCollectionsFetched(KJob *job)
const Akonadi::CollectionFetchJob *addressBookJob = qobject_cast<Akonadi::CollectionFetchJob *>(job);
- Akonadi::Collection::List canCreateItemCollections ;
+ Akonadi::Collection::List canCreateItemCollections;
foreach (const Akonadi::Collection &collection, addressBookJob->collections()) {
if (Akonadi::Collection::CanCreateItem & collection.rights()) {
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 8b9e57b..311a1df 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -512,7 +512,7 @@ KMAddBookmarksCommand::KMAddBookmarksCommand(const QUrl &url, QWidget *parent)
KMCommand::Result KMAddBookmarksCommand::execute()
{
- const QString filename = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + QLatin1String("konqueror/bookmarks.xml") ;
+ const QString filename = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + QLatin1String("konqueror/bookmarks.xml");
QFileInfo fileInfo(filename);
QDir().mkpath(fileInfo.absolutePath());
KBookmarkManager *bookManager = KBookmarkManager::managerForFile(filename, QStringLiteral("konqueror"));
@@ -1404,7 +1404,7 @@ KMMetaFilterActionCommand::KMMetaFilterActionCommand(const QString &filterId,
void KMMetaFilterActionCommand::start()
{
KMCommand *filterCommand = new KMFilterActionCommand(
- mMainWidget, mMainWidget->messageListPane()->selectionAsMessageItemListId() , mFilterId);
+ mMainWidget, mMainWidget->messageListPane()->selectionAsMessageItemListId(), mFilterId);
filterCommand->start();
}
@@ -1473,7 +1473,7 @@ KMMoveCommand::KMMoveCommand(const Akonadi::Collection &destFolder,
}
KMMoveCommand::KMMoveCommand(const Akonadi::Collection &destFolder,
- const Akonadi::Item &msg ,
+ const Akonadi::Item &msg,
MessageList::Core::MessageItemSetReference ref)
: KMCommand(Q_NULLPTR, msg), mDestFolder(destFolder), mProgressItem(Q_NULLPTR), mRef(ref)
{
@@ -1579,7 +1579,7 @@ Akonadi::Collection KMTrashMsgCommand::findTrashFolder(const Akonadi::Collection
return Akonadi::Collection();
}
-KMSaveAttachmentsCommand::KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item &msg , MessageViewer::Viewer *viewer)
+KMSaveAttachmentsCommand::KMSaveAttachmentsCommand(QWidget *parent, const Akonadi::Item &msg, MessageViewer::Viewer *viewer)
: KMCommand(parent, msg),
mViewer(viewer)
{
diff --git a/kmail/kmcommands.h b/kmail/kmcommands.h
index d09b978..ffcdf59 100644
--- a/kmail/kmcommands.h
+++ b/kmail/kmcommands.h
@@ -276,7 +276,7 @@ class KMOpenMsgCommand : public KMCommand
public:
explicit KMOpenMsgCommand(QWidget *parent, const QUrl &url = QUrl(),
- const QString &encoding = QString() , KMMainWidget *main = Q_NULLPTR);
+ const QString &encoding = QString(), KMMainWidget *main = Q_NULLPTR);
private:
Result execute() Q_DECL_OVERRIDE;
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index 2f92378..93ffa55 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -608,7 +608,7 @@ int KMKernel::openComposer(const QString &to, const QString &cc,
}
QList<QUrl> attachURLs = QUrl::fromStringList(attachmentPaths);
QList<QUrl>::ConstIterator endAttachment(attachURLs.constEnd());
- for (QList<QUrl>::ConstIterator it = attachURLs.constBegin() ; it != endAttachment; ++it) {
+ for (QList<QUrl>::ConstIterator it = attachURLs.constBegin(); it != endAttachment; ++it) {
QMimeDatabase mimeDb;
if (mimeDb.mimeTypeForUrl(*it).name() == QLatin1String("inode/directory")) {
if (KMessageBox::questionYesNo(Q_NULLPTR, i18n("Do you want to attach this folder \"%1\"?", (*it).toDisplayString()), i18n("Attach Folder")) == KMessageBox::No) {
@@ -624,7 +624,7 @@ int KMKernel::openComposer(const QString &to, const QString &cc,
if (!customHeaders.isEmpty()) {
QMap<QByteArray, QString> extraCustomHeaders;
QStringList::ConstIterator end = customHeaders.constEnd();
- for (QStringList::ConstIterator it = customHeaders.constBegin() ; it != end ; ++it) {
+ for (QStringList::ConstIterator it = customHeaders.constBegin(); it != end; ++it) {
if (!(*it).isEmpty()) {
const int pos = (*it).indexOf(QLatin1Char(':'));
if (pos > 0) {
@@ -1261,7 +1261,7 @@ void KMKernel::recoverDeadLetters()
autoSaveWin->show();
autoSaveFile.close();
} else {
- KMessageBox::sorry(Q_NULLPTR, i18n("Failed to open autosave file at %1.\nReason: %2" ,
+ KMessageBox::sorry(Q_NULLPTR, i18n("Failed to open autosave file at %1.\nReason: %2",
file.absoluteFilePath(), autoSaveFile.errorString()),
i18n("Opening Autosave File Failed"));
}
@@ -1542,7 +1542,7 @@ void KMKernel::slotConfigChanged()
//static
QString KMKernel::localDataPath()
{
- return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kmail2/") ;
+ return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kmail2/");
}
//-------------------------------------------------------------------------------
@@ -2044,7 +2044,7 @@ const QAbstractItemModel *KMKernel::treeviewModelSelection()
}
}
-void KMKernel::slotInstanceWarning(const Akonadi::AgentInstance &instance , const QString &message)
+void KMKernel::slotInstanceWarning(const Akonadi::AgentInstance &instance, const QString &message)
{
const QString summary = i18nc("<source>: <error message>", "%1: %2", instance.name(), message);
KNotification::event(QStringLiteral("akonadi-instance-warning"),
diff --git a/kmail/kmkernel.h b/kmail/kmkernel.h
index f08c517..d09fdfe 100644
--- a/kmail/kmkernel.h
+++ b/kmail/kmkernel.h
@@ -193,7 +193,7 @@ public Q_SLOTS:
bool hidden,
const QString &messageFile,
const QStringList &attachmentPaths,
- const QStringList &customHeaders , const QString &replyTo = QString(), const QString &inReplyTo = QString());
+ const QStringList &customHeaders, const QString &replyTo = QString(), const QString &inReplyTo = QString());
/**
* Opens a composer window and prefills it with different
@@ -380,7 +380,7 @@ public:
void action(bool mailto, bool check, const QString &to, const QString &cc,
const QString &bcc, const QString &subj, const QString &body,
const QUrl &messageFile, const QList<QUrl> &attach,
- const QStringList &customHeaders , const QString &replyTo, const QString &inReplyTo);
+ const QStringList &customHeaders, const QString &replyTo, const QString &inReplyTo);
//sets online status for akonadi accounts. true for online, false for offline
void setAccountStatus(bool);
diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp
index d072131..e933ae0 100644
--- a/kmail/kmmainwidget.cpp
+++ b/kmail/kmmainwidget.cpp
@@ -524,7 +524,7 @@ void KMMainWidget::folderSelected(const Akonadi::Collection &col)
void KMMainWidget::slotShowSelectedFolderInPane()
{
if (mCurrentFolder && mCurrentFolder->collection().isValid()) {
- mMessagePane->setCurrentFolder(mCurrentFolder->collection(), false , mPreSelectionMode);
+ mMessagePane->setCurrentFolder(mCurrentFolder->collection(), false, mPreSelectionMode);
}
}
@@ -2621,7 +2621,7 @@ void KMMainWidget::slotMarkAll()
updateMessageActions();
}
-void KMMainWidget::slotMessagePopup(const Akonadi::Item &msg , const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint)
+void KMMainWidget::slotMessagePopup(const Akonadi::Item &msg, const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint)
{
updateMessageMenu();
@@ -2660,7 +2660,7 @@ void KMMainWidget::slotContactSearchJobForMessagePopupDone(KJob *job)
showMessagePopup(msg, url, imageUrl, aPoint, contactAlreadyExists, uniqueContactFound);
}
-void KMMainWidget::showMessagePopup(const Akonadi::Item &msg , const QUrl &url, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound)
+void KMMainWidget::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound)
{
QMenu *menu = new QMenu;
diff --git a/kmail/kmmainwidget.h b/kmail/kmmainwidget.h
index 1edb910..0e7d14f 100644
--- a/kmail/kmmainwidget.h
+++ b/kmail/kmmainwidget.h
@@ -435,7 +435,7 @@ protected Q_SLOTS:
*/
void showOfflinePage();
void showResourceOfflinePage();
- void updateVacationScriptStatus(bool active , const QString &serverName = QString());
+ void updateVacationScriptStatus(bool active, const QString &serverName = QString());
void slotItemAdded(const Akonadi::Item &, const Akonadi::Collection &col);
void slotItemRemoved(const Akonadi::Item &);
@@ -512,7 +512,7 @@ private:
void openFilterDialog(const QByteArray &field, const QString &value);
- void showMessagePopup(const Akonadi::Item &msg , const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound);
+ void showMessagePopup(const Akonadi::Item &msg, const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound);
private Q_SLOTS:
void slotMoveMessageToTrash();
diff --git a/kmail/kmreadermainwin.cpp b/kmail/kmreadermainwin.cpp
index 206ddc5..e66a73b 100644
--- a/kmail/kmreadermainwin.cpp
+++ b/kmail/kmreadermainwin.cpp
@@ -423,7 +423,7 @@ void KMReaderMainWin::slotCopyMoveResult(KJob *job)
}
}
-void KMReaderMainWin::slotMessagePopup(const Akonadi::Item &aMsg , const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint)
+void KMReaderMainWin::slotMessagePopup(const Akonadi::Item &aMsg, const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint)
{
mMsg = aMsg;
@@ -463,7 +463,7 @@ void KMReaderMainWin::slotContactSearchJobForMessagePopupDone(KJob *job)
showMessagePopup(msg, url, imageUrl, aPoint, contactAlreadyExists, uniqueContactFound);
}
-void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg , const QUrl &url, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound)
+void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound)
{
QMenu *menu = Q_NULLPTR;
diff --git a/kmail/kmreadermainwin.h b/kmail/kmreadermainwin.h
index 41c53b1..178a213 100644
--- a/kmail/kmreadermainwin.h
+++ b/kmail/kmreadermainwin.h
@@ -53,7 +53,7 @@ public:
void showMessage(const QString &encoding, const Akonadi::Item &msg, const Akonadi::Collection &parentCollection = Akonadi::Collection());
void showMessage(const QString &encoding, KMime::Message::Ptr message);
- void showMessagePopup(const Akonadi::Item &msg , const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound);
+ void showMessagePopup(const Akonadi::Item &msg, const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound);
private Q_SLOTS:
void slotMessagePopup(const Akonadi::Item &, const QUrl &, const QUrl &imageUrl, const QPoint &);
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 4886b27..2303c70 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -294,10 +294,10 @@ static const int numKMailNewFeatures =
QString KMReaderWin::newFeaturesMD5()
{
QByteArray str;
- for (int i = 0 ; i < numKMailChanges ; ++i) {
+ for (int i = 0; i < numKMailChanges; ++i) {
str += kmailChanges[i];
}
- for (int i = 0 ; i < numKMailNewFeatures ; ++i) {
+ for (int i = 0; i < numKMailNewFeatures; ++i) {
str += kmailNewFeatures[i];
}
QCryptographicHash md5(QCryptographicHash::Md5);
@@ -365,7 +365,7 @@ void KMReaderWin::displayAboutPage()
"(compared to KMail %1, which is part of KDE Software Compilation %2):</p>\n",
QLatin1String("1.13"), QLatin1String(KDEPIM_VERSION)); // prior KMail and KDE version
featuresText += QLatin1String("<ul>\n");
- for (int i = 0 ; i < numKMailNewFeatures ; ++i) {
+ for (int i = 0; i < numKMailNewFeatures; ++i) {
featuresText += QLatin1String("<li>") + i18n(kmailNewFeatures[i]) + QLatin1String("</li>\n");
}
featuresText += QLatin1String("</ul>\n");
@@ -391,7 +391,7 @@ void KMReaderWin::displayAboutPage()
"Important changes</span> (compared to KMail %1):</p>\n",
QLatin1String("1.13"));
changesText += QLatin1String("<ul>\n");
- for (int i = 0 ; i < numKMailChanges ; ++i) {
+ for (int i = 0; i < numKMailChanges; ++i) {
changesText += i18n("<li>%1</li>\n", i18n(kmailChanges[i]));
}
changesText += QLatin1String("</ul>\n");
@@ -751,7 +751,7 @@ void KMReaderWin::slotPrintComposeResult(KJob *job)
const QString overrideEncoding = MessageCore::MessageCoreSettings::self()->overrideCharacterEncoding();
KMPrintCommand *command = new KMPrintCommand(this, printItem, mViewer->headerStylePlugin(),
- mViewer->displayFormatMessageOverwrite(), mViewer->htmlLoadExternal() , useFixedFont, overrideEncoding);
+ mViewer->displayFormatMessageOverwrite(), mViewer->htmlLoadExternal(), useFixedFont, overrideEncoding);
command->setPrintPreview(preview);
command->start();
} else {
diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp
index 6f9bd0a..bee051d 100644
--- a/kmail/kmstartup.cpp
+++ b/kmail/kmstartup.cpp
@@ -33,7 +33,7 @@ void insertLibraryCataloguesAndIcons()
KIconLoader *il = KIconLoader::global();
unsigned int catalogSize = (sizeof catalogs / sizeof * catalogs);
- for (unsigned int i = 0 ; i < catalogSize ; ++i) {
+ for (unsigned int i = 0; i < catalogSize; ++i) {
il->addAppDir(QLatin1String(catalogs[i]));
}
diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp
index da14e42..45db422 100644
--- a/kmail/kmsystemtray.cpp
+++ b/kmail/kmsystemtray.cpp
@@ -266,12 +266,12 @@ void KMSystemTray::slotActivated()
{
KMMainWidget *mainWidget = kmkernel->getKMMainWidget();
if (!mainWidget) {
- return ;
+ return;
}
QWidget *mainWin = mainWidget->window();
if (!mainWin) {
- return ;
+ return;
}
KWindowInfo cur = KWindowSystem::windowInfo(mainWin->winId(), NET::WMDesktop);
@@ -433,7 +433,7 @@ void KMSystemTray::slotSelectCollection(QAction *act)
kmkernel->selectCollectionFromId(id);
KMMainWidget *mainWidget = kmkernel->getKMMainWidget();
if (!mainWidget) {
- return ;
+ return;
}
QWidget *mainWin = mainWidget->window();
if (mainWin && !mainWin->isVisible()) {
diff --git a/kmail/kmsystemtray.h b/kmail/kmsystemtray.h
index e5517fb..9633ba8 100644
--- a/kmail/kmsystemtray.h
+++ b/kmail/kmsystemtray.h
@@ -64,7 +64,7 @@ private Q_SLOTS:
void slotContextMenuAboutToShow();
void slotSelectCollection(QAction *act);
void initListOfCollection();
- void slotCollectionStatisticsChanged(Akonadi::Collection::Id , const Akonadi::CollectionStatistics &);
+ void slotCollectionStatisticsChanged(Akonadi::Collection::Id, const Akonadi::CollectionStatistics &);
void slotGeneralPaletteChanged();
void slotGeneralFontChanged();
diff --git a/kmail/messageactions.cpp b/kmail/messageactions.cpp
index b56e5db..e2d5ab7 100644
--- a/kmail/messageactions.cpp
+++ b/kmail/messageactions.cpp
@@ -632,7 +632,7 @@ void MessageActions::addMailingListAction(const QString &item, const QUrl &url)
protocol = i18n("web");
}
// item is a mailing list url description passed from the updateActions method above.
- QAction *act = new QAction(i18nc("%1 is a 'Contact Owner' or similar action. %2 is a protocol normally web or email though could be irc/ftp or other url variant", "%1 (%2)", item, protocol) , this);
+ QAction *act = new QAction(i18nc("%1 is a 'Contact Owner' or similar action. %2 is a protocol normally web or email though could be irc/ftp or other url variant", "%1 (%2)", item, protocol), this);
mMailListActionList.append(act);
const QVariant v(url);
act->setData(v);
diff --git a/kmail/messageactions.h b/kmail/messageactions.h
index b271690..5b27e66 100644
--- a/kmail/messageactions.h
+++ b/kmail/messageactions.h
@@ -74,7 +74,7 @@ public:
*/
void setupForwardingActionsList(KXMLGUIClient *guiClient);
- void setCurrentMessage(const Akonadi::Item &item , const Akonadi::Item::List &items = Akonadi::Item::List());
+ void setCurrentMessage(const Akonadi::Item &item, const Akonadi::Item::List &items = Akonadi::Item::List());
KActionMenu *replyMenu() const;
QAction *replyListAction() const;
diff --git a/kmail/searchdialog/searchdescriptionattribute.h b/kmail/searchdialog/searchdescriptionattribute.h
index 6a9fb50..9e0937f 100644
--- a/kmail/searchdialog/searchdescriptionattribute.h
+++ b/kmail/searchdialog/searchdescriptionattribute.h
@@ -32,7 +32,7 @@ class SearchDescriptionAttribute : public Akonadi::Attribute
{
public:
SearchDescriptionAttribute();
- QByteArray description() const ;
+ QByteArray description() const;
void setDescription(const QByteArray &desc);
Akonadi::Collection baseCollection() const;
void setBaseCollection(const Akonadi::Collection &);
diff --git a/kmail/searchdialog/searchwindow.cpp b/kmail/searchdialog/searchwindow.cpp
index 76fde18f..db0ed18 100644
--- a/kmail/searchdialog/searchwindow.cpp
+++ b/kmail/searchdialog/searchwindow.cpp
@@ -839,7 +839,7 @@ void SearchWindow::addRulesToSearchPattern(const SearchPattern &pattern)
QList<SearchRule::Ptr>::const_iterator end(pattern.constEnd());
p.reserve(pattern.count());
- for (it = pattern.constBegin() ; it != end ; ++it) {
+ for (it = pattern.constBegin(); it != end; ++it) {
p.append(SearchRule::createInstance(**it));
}
diff --git a/knotes/apps/knotesapp.cpp b/knotes/apps/knotesapp.cpp
index 3dfea61..a266af3 100644
--- a/knotes/apps/knotesapp.cpp
+++ b/knotes/apps/knotesapp.cpp
@@ -109,7 +109,7 @@ KNotesApp::KNotesApp()
}
new KNotesAdaptor(this);
- QDBusConnection::sessionBus().registerObject(QStringLiteral("/KNotes") , this);
+ QDBusConnection::sessionBus().registerObject(QStringLiteral("/KNotes"), this);
qApp->setQuitOnLastWindowClosed(false);
// create the GUI...
QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("document-new")),
@@ -299,7 +299,7 @@ void KNotesApp::createNote(const Akonadi::Item &item)
KNote *note = new KNote(m_noteGUI, item, mDebugBaloo);
mNotes.insert(item.id(), note);
connect(note, &KNote::sigShowNextNote,
- this, &KNotesApp::slotWalkThroughNotes) ;
+ this, &KNotesApp::slotWalkThroughNotes);
connect(note, SIGNAL(sigRequestNewNote()),
SLOT(newNote()));
connect(note, &KNote::sigNameChanged,
@@ -675,7 +675,7 @@ void KNotesApp::slotOpenFindDialog()
mFindDialog = new KNoteFindDialog(this);
connect(mFindDialog.data(), &KNoteFindDialog::noteSelected, this, &KNotesApp::slotSelectNote);
}
- QHash<Akonadi::Item::Id , Akonadi::Item> lst;
+ QHash<Akonadi::Item::Id, Akonadi::Item> lst;
QHashIterator<Akonadi::Item::Id, KNote *> i(mNotes);
while (i.hasNext()) {
diff --git a/knotes/configdialog/knotedisplayconfigwidget.h b/knotes/configdialog/knotedisplayconfigwidget.h
index 5ef2bf4..6e64c5b 100644
--- a/knotes/configdialog/knotedisplayconfigwidget.h
+++ b/knotes/configdialog/knotedisplayconfigwidget.h
@@ -30,7 +30,7 @@ class KNoteDisplayConfigWidget : public QWidget
{
Q_OBJECT
public:
- explicit KNoteDisplayConfigWidget(bool defaults , QWidget *parent = Q_NULLPTR);
+ explicit KNoteDisplayConfigWidget(bool defaults, QWidget *parent = Q_NULLPTR);
~KNoteDisplayConfigWidget();
void load(NoteShared::NoteDisplayAttribute *attr);
diff --git a/knotes/configdialog/knoteeditorconfigwidget.h b/knotes/configdialog/knoteeditorconfigwidget.h
index 233fea8..22efc13 100644
--- a/knotes/configdialog/knoteeditorconfigwidget.h
+++ b/knotes/configdialog/knoteeditorconfigwidget.h
@@ -31,7 +31,7 @@ class KNoteEditorConfigWidget : public QWidget
{
Q_OBJECT
public:
- explicit KNoteEditorConfigWidget(bool defaults , QWidget *parent = Q_NULLPTR);
+ explicit KNoteEditorConfigWidget(bool defaults, QWidget *parent = Q_NULLPTR);
~KNoteEditorConfigWidget();
void load(NoteShared::NoteDisplayAttribute *attr, bool isRichText);
diff --git a/knotes/finddialog/knotefinddialog.h b/knotes/finddialog/knotefinddialog.h
index ce87d79..305940b 100644
--- a/knotes/finddialog/knotefinddialog.h
+++ b/knotes/finddialog/knotefinddialog.h
@@ -48,7 +48,7 @@ private Q_SLOTS:
void slotItemDoubleClicked(QListWidgetItem *);
private:
- QHash<Akonadi::Item::Id , Akonadi::Item> mNotes;
+ QHash<Akonadi::Item::Id, Akonadi::Item> mNotes;
QLabel *mResultSearch;
QLineEdit *mSearchLineEdit;
QPushButton *mSearchButton;
@@ -61,7 +61,7 @@ class KNOTES_EXPORT KNoteFindDialog : public QDialog
public:
explicit KNoteFindDialog(QWidget *parent = Q_NULLPTR);
~KNoteFindDialog();
- void setExistingNotes(const QHash<Akonadi::Item::Id , Akonadi::Item> &notes);
+ void setExistingNotes(const QHash<Akonadi::Item::Id, Akonadi::Item> &notes);
Q_SIGNALS:
void noteSelected(Akonadi::Item::Id);
diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp
index 58dc7b7..39c2e3a 100644
--- a/knotes/knoteedit.cpp
+++ b/knotes/knoteedit.cpp
@@ -384,7 +384,7 @@ void KNoteEdit::slotTextColor()
if (m_note) {
m_note->setBlockSave(true);
}
- QColor c = QColorDialog::getColor(textColor(), this) ;
+ QColor c = QColorDialog::getColor(textColor(), this);
if (c.isValid()) {
setTextColor(c);
}
diff --git a/knotes/kontactplugin/knotes_part.cpp b/knotes/kontactplugin/knotes_part.cpp
index 67999da..ccc443a 100644
--- a/knotes/kontactplugin/knotes_part.cpp
+++ b/knotes/kontactplugin/knotes_part.cpp
@@ -92,7 +92,7 @@
KNotesPart::KNotesPart(QObject *parent)
: KParts::ReadOnlyPart(parent),
- mNotesWidget(Q_NULLPTR) ,
+ mNotesWidget(Q_NULLPTR),
mPublisher(Q_NULLPTR),
mNotePrintPreview(Q_NULLPTR),
mNoteTreeModel(Q_NULLPTR)
@@ -804,7 +804,7 @@ void KNotesPart::slotOpenFindDialog()
mNoteFindDialog = new KNoteFindDialog(widget());
connect(mNoteFindDialog.data(), &KNoteFindDialog::noteSelected, this, &KNotesPart::slotSelectNote);
}
- QHash<Akonadi::Item::Id , Akonadi::Item> lst;
+ QHash<Akonadi::Item::Id, Akonadi::Item> lst;
QHashIterator<Akonadi::Item::Id, KNotesIconViewItem *> i(mNotesWidget->notesView()->noteList());
while (i.hasNext()) {
i.next();
diff --git a/knotes/kontactplugin/knotes_plugin.cpp b/knotes/kontactplugin/knotes_plugin.cpp
index 47e8d94..fe5c81b 100644
--- a/knotes/kontactplugin/knotes_plugin.cpp
+++ b/knotes/kontactplugin/knotes_plugin.cpp
@@ -226,7 +226,7 @@ void KNotesUniqueAppHandler::loadCommandLineOptions(QCommandLineParser *parser)
int KNotesUniqueAppHandler::activate(const QStringList &args, const QString &workingDir)
{
- qCDebug(KNOTES_KONTACT_PLUGIN_LOG) ;
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG);
// Ensure part is loaded
(void)plugin()->part();
diff --git a/knotes/kontactplugin/knotesiconview.cpp b/knotes/kontactplugin/knotesiconview.cpp
index ece739f..2e67e1c 100644
--- a/knotes/kontactplugin/knotesiconview.cpp
+++ b/knotes/kontactplugin/knotesiconview.cpp
@@ -194,11 +194,11 @@ void KNotesIconViewItem::setChangeIconTextAndDescription(const QString &iconText
void KNotesIconViewItem::setIconText(const QString &text, bool save)
{
- QString replaceText ;
+ QString replaceText;
if (text.count() > 50) {
replaceText = text.left(50) + QLatin1String("...");
} else {
- replaceText = text ;
+ replaceText = text;
}
setText(replaceText);
diff --git a/knotes/kontactplugin/knotesiconview.h b/knotes/kontactplugin/knotesiconview.h
index d7b54e7..5bf3303 100644
--- a/knotes/kontactplugin/knotesiconview.h
+++ b/knotes/kontactplugin/knotesiconview.h
@@ -55,7 +55,7 @@ public:
bool readOnly() const;
void setReadOnly(bool b, bool save = true);
- void setIconText(const QString &text , bool save = true);
+ void setIconText(const QString &text, bool save = true);
QString realName() const;
int tabSize() const;
diff --git a/knotes/print/knoteprinter.cpp b/knotes/print/knoteprinter.cpp
index 99526e8..433664b 100644
--- a/knotes/print/knoteprinter.cpp
+++ b/knotes/print/knoteprinter.cpp
@@ -64,8 +64,8 @@ void KNotePrinter::doPrintPreview(const QString &htmlText)
printer.setCollateCopies(true);
QPrintPreviewDialog previewdlg(&printer, 0);
- connect(&previewdlg, &QPrintPreviewDialog::paintRequested, this, &KNotePrinter::slotPrinterPage) ;
- previewdlg.exec() ;
+ connect(&previewdlg, &QPrintPreviewDialog::paintRequested, this, &KNotePrinter::slotPrinterPage);
+ previewdlg.exec();
}
void KNotePrinter::slotPrinterPage(QPrinter *printer)
diff --git a/kontact/plugins/summary/summaryview_part.cpp b/kontact/plugins/summary/summaryview_part.cpp
index 0471b6d..e576730 100644
--- a/kontact/plugins/summary/summaryview_part.cpp
+++ b/kontact/plugins/summary/summaryview_part.cpp
@@ -395,27 +395,27 @@ void SummaryViewPart::slotAdjustPalette()
if (!QApplication::isRightToLeft()) {
mMainWidget->setStyleSheet(
QStringLiteral("#mMainWidget { "
- " background: palette(base);"
- " color: palette(text);"
- " background-image: url(:/summaryview/kontact_bg.png);"
- " background-position: bottom right;"
- " background-repeat: no-repeat; }"
- "QLabel { "
- " color: palette(text); }"
- "KUrlLabel { "
- " color: palette(link); }"));
+ " background: palette(base);"
+ " color: palette(text);"
+ " background-image: url(:/summaryview/kontact_bg.png);"
+ " background-position: bottom right;"
+ " background-repeat: no-repeat; }"
+ "QLabel { "
+ " color: palette(text); }"
+ "KUrlLabel { "
+ " color: palette(link); }"));
} else {
mMainWidget->setStyleSheet(
QStringLiteral("#mMainWidget { "
- " background: palette(base);"
- " color: palette(text);"
- " background-image: url(:/summaryview/kontact_bg.png);"
- " background-position: bottom left;"
- " background-repeat: no-repeat; }"
- "QLabel { "
- " color: palette(text); }"
- "KUrlLabel { "
- " color: palette(link); }"));
+ " background: palette(base);"
+ " color: palette(text);"
+ " background-image: url(:/summaryview/kontact_bg.png);"
+ " background-position: bottom left;"
+ " background-repeat: no-repeat; }"
+ "QLabel { "
+ " color: palette(text); }"
+ "KUrlLabel { "
+ " color: palette(link); }"));
}
}
diff --git a/korgac/korgacmain.cpp b/korgac/korgacmain.cpp
index 786e9ad..13ae230 100644
--- a/korgac/korgacmain.cpp
+++ b/korgac/korgacmain.cpp
@@ -41,7 +41,7 @@ Q_IMPORT_PLUGIN(akonadi_serializer_kcalcore)
int main(int argc, char **argv)
{
QApplication app(argc, argv);
- app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+ app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
Kdelibs4ConfigMigrator migrate(QStringLiteral("korgac"));
migrate.setConfigFiles(QStringList() << QStringLiteral("korgacrc"));
diff --git a/korgac/mailclient.cpp b/korgac/mailclient.cpp
index c8a4179..cb53f44 100644
--- a/korgac/mailclient.cpp
+++ b/korgac/mailclient.cpp
@@ -170,7 +170,7 @@ bool MailClient::mailTo(const KCalCore::IncidenceBase::Ptr &incidence,
QString subject;
if (incidence->type() != KCalCore::Incidence::TypeFreeBusy) {
- KCalCore::Incidence::Ptr inc = incidence.staticCast<KCalCore::Incidence>() ;
+ KCalCore::Incidence::Ptr inc = incidence.staticCast<KCalCore::Incidence>();
subject = inc->summary();
} else {
subject = i18n("Free Busy Message");
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp
index 62a171a..ab9d762 100644
--- a/korganizer/actionmanager.cpp
+++ b/korganizer/actionmanager.cpp
@@ -834,7 +834,7 @@ void ActionManager::file_new()
void ActionManager::file_open()
{
- const QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/") ;
+ const QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/");
const QUrl url = QFileDialog::getOpenFileUrl(dialogParent(), QString(), QUrl::fromLocalFile(defaultPath), QStringLiteral("text/calendar"));
file_open(url);
@@ -1175,7 +1175,7 @@ bool ActionManager::saveModifiedURL()
QUrl ActionManager::getSaveURL()
{
QUrl url =
- QFileDialog::getSaveFileUrl(dialogParent(), QString(), QString(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/")) ,
+ QFileDialog::getSaveFileUrl(dialogParent(), QString(), QString(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/")),
i18n("*.ics *.vcs|Calendar Files")
);
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1160dd9..4ce69c9 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2336,7 +2336,7 @@ void CalendarView::deleteTodoIncidence(const Akonadi::Item &todoItem, bool force
{
const KCalCore::Todo::Ptr todo = CalendarSupport::todo(todoItem);
if (!todo) {
- return ;
+ return;
}
// it a simple todo, ask and delete it.
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index b06d73d..0c90a9a 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -506,7 +506,7 @@ void KODayMatrix::mousePressEvent(QMouseEvent *e)
{
mSelStart = getDayIndexFrom(e->x(), e->y());
if (e->button() == Qt::RightButton) {
- popupMenu(mDays[mSelStart]) ;
+ popupMenu(mDays[mSelStart]);
} else if (e->button() == Qt::LeftButton) {
if (mSelStart > NUMDAYS - 1) {
mSelStart = NUMDAYS - 1;
diff --git a/korganizer/kontactplugin/korganizer/autotests/summaryeventtest.cpp b/korganizer/kontactplugin/korganizer/autotests/summaryeventtest.cpp
index cff3d85..ca15865 100644
--- a/korganizer/kontactplugin/korganizer/autotests/summaryeventtest.cpp
+++ b/korganizer/kontactplugin/korganizer/autotests/summaryeventtest.cpp
@@ -54,8 +54,8 @@ void SummaryEventTester::test_Multiday()
QCOMPARE(ev4->summaryText, QString(multidayWithTimeInProgress + QString::fromLatin1(" (%1/7)").arg(i + 2)));
QCOMPARE(ev4->timeRange, QStringLiteral("%1 - %2").arg(
- QLocale::system().toString(QTime(0, 0), QLocale::ShortFormat),
- QLocale::system().toString(QTime(23, 59), QLocale::ShortFormat)));
+ QLocale::system().toString(QTime(0, 0), QLocale::ShortFormat),
+ QLocale::system().toString(QTime(23, 59), QLocale::ShortFormat)));
//QCOMPARE( ev4->startDate, KLocale::global()->formatDate( QDate( today.addDays( i ) ), KLocale::FancyLongDate ) );
QCOMPARE(ev4->makeBold, i == 0);
@@ -115,8 +115,8 @@ void SummaryEventTester::test_Multiday()
foreach (const SummaryEventInfo *ev, eventsToday) {
if (ev->summaryText == multidayWithTimeInProgress + QLatin1String(" (2/7)")) {
QCOMPARE(ev->timeRange, QStringLiteral("%1 - %2").arg(
- QLocale::system().toString(QTime(0, 0), QLocale::ShortFormat),
- QLocale::system().toString(QTime(23, 59), QLocale::ShortFormat)));
+ QLocale::system().toString(QTime(0, 0), QLocale::ShortFormat),
+ QLocale::system().toString(QTime(23, 59), QLocale::ShortFormat)));
QCOMPARE(ev->startDate, QStringLiteral("Today"));
QCOMPARE(ev->daysToGo, QStringLiteral("now"));
QCOMPARE(ev->makeBold, true);
diff --git a/korganizer/korganizer.cpp b/korganizer/korganizer.cpp
index 780fe1d..6b58d84 100644
--- a/korganizer/korganizer.cpp
+++ b/korganizer/korganizer.cpp
@@ -75,7 +75,6 @@ void KOrganizer::init(bool document)
{
setHasDocument(document);
-
// Create calendar object, which manages all calendar information associated
// with this calendar view window.
mActionManager->createCalendarAkonadi();
@@ -192,7 +191,7 @@ bool KOrganizer::saveURL()
bool KOrganizer::saveAsURL(const QUrl &kurl)
{
- return mActionManager->saveAsURL(kurl) ;
+ return mActionManager->saveAsURL(kurl);
}
QUrl KOrganizer::getCurrentURL() const
diff --git a/korganizer/prefs/koprefsdialog.cpp b/korganizer/prefs/koprefsdialog.cpp
index 6a4d6f9..a5b85dd 100644
--- a/korganizer/prefs/koprefsdialog.cpp
+++ b/korganizer/prefs/koprefsdialog.cpp
@@ -1143,7 +1143,7 @@ void KOPrefsDialogGroupwareScheduling::usrWriteConfig()
mGroupwarePage->retrieveSavePassword->isChecked());
// clear the url cache for our user
- const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/freebusyurls") ;
+ const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/freebusyurls");
KConfig cfg(configFile);
cfg.deleteGroup(CalendarSupport::KCalPrefs::instance()->email());
@@ -1473,7 +1473,7 @@ KOPrefsDesignerFields::KOPrefsDesignerFields(QWidget *parent)
QString KOPrefsDesignerFields::localUiDir()
{
- const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/designer/event/") ;
+ const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/korganizer/designer/event/");
return dir;
}
diff --git a/korganizer/views/collectionview/autotests/modeltest.cpp b/korganizer/views/collectionview/autotests/modeltest.cpp
index bc36b99..0617daf 100644
--- a/korganizer/views/collectionview/autotests/modeltest.cpp
+++ b/korganizer/views/collectionview/autotests/modeltest.cpp
@@ -569,7 +569,7 @@ void ModelTest::rowsAboutToBeMoved(const QModelIndex &srcParent, int start, int
cs.parent = srcParent;
cs.oldSize = model->rowCount(srcParent);
cs.last = model->data(model->index(start - 1, 0, srcParent));
- qDebug() << start << model->data(model->index(start , 0, srcParent)).toString();
+ qDebug() << start << model->data(model->index(start, 0, srcParent)).toString();
cs.next = model->data(model->index(end + 1, 0, srcParent));
remove.push(cs);
Changing cd;
@@ -607,7 +607,7 @@ void ModelTest::rowsMoved(const QModelIndex &srcParent, int start, int end, cons
} else {
Q_ASSERT(cs.oldSize - (end - start + 1) == model->rowCount(srcParent));
qDebug() << start - 1 << model->data(model->index(start - 1, 0, srcParent)).toString() << cs.last.toString();
- qDebug() << start << model->data(model->index(start , 0, srcParent)).toString() << cs.next.toString();
+ qDebug() << start << model->data(model->index(start, 0, srcParent)).toString() << cs.next.toString();
Q_ASSERT(cs.last == model->data(model->index(start - 1, 0, srcParent)));
qDebug() << cs.next << model->data(model->index(start, 0, srcParent));
Q_ASSERT(cs.next == model->data(model->index(start, 0, srcParent)));
diff --git a/korganizer/views/multiagendaview/multiagendaview.cpp b/korganizer/views/multiagendaview/multiagendaview.cpp
index b15a747..778db0c 100644
--- a/korganizer/views/multiagendaview/multiagendaview.cpp
+++ b/korganizer/views/multiagendaview/multiagendaview.cpp
@@ -428,7 +428,7 @@ void MultiAgendaViewConfigDialog::Private::setUpColumns(int n)
sortProxy->setSourceModel(baseModel);
KRearrangeColumnsProxyModel *columnFilterProxy = new KRearrangeColumnsProxyModel(sortProxy);
- columnFilterProxy->setSourceColumns(QVector<int>()<<Akonadi::ETMCalendar::CollectionTitle);
+ columnFilterProxy->setSourceColumns(QVector<int>() << Akonadi::ETMCalendar::CollectionTitle);
columnFilterProxy->setSourceModel(sortProxy);
QItemSelectionModel *qsm = new QItemSelectionModel(columnFilterProxy, columnFilterProxy);
diff --git a/ktnef/attachpropertydialog.cpp b/ktnef/attachpropertydialog.cpp
index 3056f31..4b68032 100644
--- a/ktnef/attachpropertydialog.cpp
+++ b/ktnef/attachpropertydialog.cpp
@@ -188,7 +188,7 @@ bool AttachPropertyDialog::saveProperty(QTreeWidget *lv, KTNEFPropertySet *pSet,
QVariant prop = (tag.startsWith(QStringLiteral("attr_")) ?
pSet->attribute(key) :
pSet->property(key));
- QString filename = QFileDialog::getSaveFileName(parent , QString(), tag, QString());
+ QString filename = QFileDialog::getSaveFileName(parent, QString(), tag, QString());
if (!filename.isEmpty()) {
QFile f(filename);
if (f.open(QIODevice::WriteOnly)) {
diff --git a/ktnef/ktnefmain.cpp b/ktnef/ktnefmain.cpp
index 057f493..524a63e 100644
--- a/ktnef/ktnefmain.cpp
+++ b/ktnef/ktnefmain.cpp
@@ -303,7 +303,7 @@ void KTNEFMain::extractFile()
void KTNEFMain::extractFileTo()
{
- QString dir = QFileDialog::getExistingDirectory(this , QString(), mLastDir);
+ QString dir = QFileDialog::getExistingDirectory(this, QString(), mLastDir);
if (!dir.isEmpty()) {
extractTo(dir);
mLastDir = dir;
@@ -312,7 +312,7 @@ void KTNEFMain::extractFileTo()
void KTNEFMain::extractAllFiles()
{
- QString dir = QFileDialog::getExistingDirectory(this , QString(), mLastDir);
+ QString dir = QFileDialog::getExistingDirectory(this, QString(), mLastDir);
if (!dir.isEmpty()) {
mLastDir = dir;
dir.append(QLatin1String("/"));
@@ -341,7 +341,7 @@ void KTNEFMain::propertiesFile()
void KTNEFMain::optionDefaultDir()
{
- const QString dirname = QFileDialog::getExistingDirectory(this , QString(), mDefaultDir);
+ const QString dirname = QFileDialog::getExistingDirectory(this, QString(), mDefaultDir);
if (!dirname.isEmpty()) {
mDefaultDir = dirname;
@@ -528,7 +528,7 @@ void KTNEFMain::slotSaveMessageText()
}
QString rtf = mParser->message()->rtfString();
- QString filename = QFileDialog::getSaveFileName(this , QString(), QString(), QString());
+ QString filename = QFileDialog::getSaveFileName(this, QString(), QString(), QString());
if (!filename.isEmpty()) {
QFile f(filename);
if (f.open(QIODevice::WriteOnly)) {
diff --git a/ktnef/messagepropertydialog.cpp b/ktnef/messagepropertydialog.cpp
index 54770eb..8d31f1b 100644
--- a/ktnef/messagepropertydialog.cpp
+++ b/ktnef/messagepropertydialog.cpp
@@ -83,7 +83,7 @@ void MessagePropertyDialog::readConfig()
if (size.isValid()) {
resize(size);
}
- const QByteArray headerState = group.readEntry("HeaderState" , QByteArray());
+ const QByteArray headerState = group.readEntry("HeaderState", QByteArray());
if (!headerState.isEmpty()) {
mListView->header()->restoreState(headerState);
}
@@ -93,6 +93,6 @@ void MessagePropertyDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "MessagePropertyDialog");
group.writeEntry("Size", size());
- group.writeEntry("HeaderState" , mListView->header()->saveState());
+ group.writeEntry("HeaderState", mListView->header()->saveState());
group.sync();
}
diff --git a/ktnef/qwmf.cpp b/ktnef/qwmf.cpp
index 5c636cf..df34738 100644
--- a/ktnef/qwmf.cpp
+++ b/ktnef/qwmf.cpp
@@ -381,7 +381,7 @@ bool QWinMetaFile::paint(QPaintDevice *aTarget, bool absolute)
str += QLatin1String(metaFuncTab[ idx ].name);
str += QLatin1String(" : ");
- for (i = 0 ; i < cmd->numParm ; ++i) {
+ for (i = 0; i < cmd->numParm; ++i) {
param.setNum(cmd->parm[ i ]);
str += param;
str += QLatin1Char(' ');
@@ -500,9 +500,9 @@ void QWinMetaFile::polyPolygon(long, short *parm)
// define clipping region
QRect win = bbox();
startPolygon = 1 + parm[ 0 ];
- for (i = 0 ; i < parm[ 0 ] ; ++i) {
+ for (i = 0; i < parm[ 0 ]; ++i) {
QPolygon pa1(parm[ 1 + i ]);
- for (j = 0 ; j < parm[ 1 + i ] ; j++) {
+ for (j = 0; j < parm[ 1 + i ]; j++) {
pa1.setPoint(j, parm[ startPolygon ], parm[ startPolygon + 1 ]);
startPolygon += 2;
}
@@ -521,7 +521,7 @@ void QWinMetaFile::polyPolygon(long, short *parm)
QPolygon *pa;
int idxPolygon = 1 + parm[ 0 ];
- for (i = 0 ; i < parm[ 0 ] ; ++i) {
+ for (i = 0; i < parm[ 0 ]; ++i) {
pa = pointArray(parm[ 1 + i ], &parm[ idxPolygon ]);
mPainter.drawPolygon(*pa);
idxPolygon += parm[ 1 + i ] * 2;
@@ -553,10 +553,10 @@ void QWinMetaFile::roundRect(long, short *parm)
// convert (xRound, yRound) in percentage
if ((parm[ 3 ] - parm[ 5 ]) != 0) {
- xRnd = (parm[ 1 ] * 100) / (parm[ 3 ] - parm[ 5 ]) ;
+ xRnd = (parm[ 1 ] * 100) / (parm[ 3 ] - parm[ 5 ]);
}
if ((parm[ 2 ] - parm[ 4 ]) != 0) {
- yRnd = (parm[ 0 ] * 100) / (parm[ 2 ] - parm[ 4 ]) ;
+ yRnd = (parm[ 0 ] * 100) / (parm[ 2 ] - parm[ 4 ]);
}
mPainter.drawRoundRect(parm[ 5 ], parm[ 4 ], parm[ 3 ] - parm[ 5 ], parm[ 2 ] - parm[ 4 ], xRnd, yRnd);
@@ -647,7 +647,7 @@ void QWinMetaFile::saveDC(long, short *)
//-----------------------------------------------------------------------------
void QWinMetaFile::restoreDC(long, short *parm)
{
- for (int i = 0; i > parm[ 0 ] ; i--) {
+ for (int i = 0; i > parm[ 0 ]; i--) {
mPainter.restore();
}
}
@@ -765,7 +765,7 @@ void QWinMetaFile::extTextOut(long num, short *parm)
// offset for each char
int left = x;
mPainter.drawText(left, y, width, height, Qt::AlignLeft | Qt::AlignTop, QLatin1String(text.mid(0, 1)));
- for (int i = 1; i < parm[ 2 ] ; ++i) {
+ for (int i = 1; i < parm[ 2 ]; ++i) {
left += parm[ idxOffset + i - 1 ];
mPainter.drawText(left, y, width, height, Qt::AlignLeft | Qt::AlignTop, QLatin1String(text.mid(i, 1)));
}
@@ -984,7 +984,7 @@ void QWinMetaFile::createPenIndirect(long, short *parm)
}
//-----------------------------------------------------------------------------
-void QWinMetaFile::createFontIndirect(long , short *parm)
+void QWinMetaFile::createFontIndirect(long, short *parm)
{
WinObjFontHandle *handle = new WinObjFontHandle;
addHandle(handle);
@@ -1113,7 +1113,7 @@ void QWinMetaFile::addHandle(WinObjHandle *handle)
{
int idx;
- for (idx = 0; idx < MAX_OBJHANDLE ; idx++)
+ for (idx = 0; idx < MAX_OBJHANDLE; idx++)
if (mObjHandleTab[ idx ] == NULL) {
break;
}
@@ -1196,7 +1196,7 @@ QPainter::CompositionMode QWinMetaFile::winToQtComposition(long parm) const
};
int i;
- for (i = 0 ; i < 15 ; ++i)
+ for (i = 0; i < 15; ++i)
if (opTab[ i ].winRasterOp == parm) {
break;
}
diff --git a/ktnef/qwmf.h b/ktnef/qwmf.h
index 3af4498..57a5052 100644
--- a/ktnef/qwmf.h
+++ b/ktnef/qwmf.h
@@ -173,7 +173,7 @@ public: // should be protected but cannot
/****************** misc *******************/
/** nothing to do */
- void noop(long , short *);
+ void noop(long, short *);
/** end of meta file */
void end(long /*num*/, short * /*parms*/);
/** Resolution of the image in dots per inch */
diff --git a/libgravatar/src/misc/gravatarcache.cpp b/libgravatar/src/misc/gravatarcache.cpp
index 3f62054..6c649ab 100644
--- a/libgravatar/src/misc/gravatarcache.cpp
+++ b/libgravatar/src/misc/gravatarcache.cpp
@@ -67,7 +67,7 @@ void GravatarCache::saveGravatarPixmap(const QString &hashStr, const QPixmap &pi
const QString path = d->mGravatarPath + hashStr + QLatin1String(".png");
qCDebug(GRAVATAR_LOG) << " path " << path;
if (pixmap.save(path)) {
- qCDebug(GRAVATAR_LOG) <<" saved in cache "<< hashStr << path;
+ qCDebug(GRAVATAR_LOG) << " saved in cache " << hashStr << path;
d->mCachePixmap.insert(hashStr, new QPixmap(pixmap));
}
}
@@ -77,10 +77,10 @@ void GravatarCache::saveGravatarPixmap(const QString &hashStr, const QPixmap &pi
QPixmap GravatarCache::loadGravatarPixmap(const QString &hashStr, bool &gravatarStored)
{
gravatarStored = false;
- qCDebug(GRAVATAR_LOG) <<" hashStr"<<hashStr;
+ qCDebug(GRAVATAR_LOG) << " hashStr" << hashStr;
if (!hashStr.isEmpty()) {
if (d->mCachePixmap.contains(hashStr)) {
- qCDebug(GRAVATAR_LOG) <<" contains in cache "<< hashStr;
+ qCDebug(GRAVATAR_LOG) << " contains in cache " << hashStr;
gravatarStored = true;
return *(d->mCachePixmap.object(hashStr));
} else {
@@ -89,7 +89,7 @@ QPixmap GravatarCache::loadGravatarPixmap(const QString &hashStr, bool &gravatar
if (fi.exists()) {
QPixmap pix;
if (pix.load(path)) {
- qCDebug(GRAVATAR_LOG) << " add to cache "<<hashStr << path;
+ qCDebug(GRAVATAR_LOG) << " add to cache " << hashStr << path;
d->mCachePixmap.insert(hashStr, new QPixmap(pix));
gravatarStored = true;
return pix;
diff --git a/libkdepim/src/addressline/addresslineedit/addresseelineeditstatic.cpp b/libkdepim/src/addressline/addresslineedit/addresseelineeditstatic.cpp
index 4a4cd9d..cf999ef 100644
--- a/libkdepim/src/addressline/addresslineedit/addresseelineeditstatic.cpp
+++ b/libkdepim/src/addressline/addresslineedit/addresseelineeditstatic.cpp
@@ -71,7 +71,7 @@ void AddresseeLineEditStatic::updateLDAPWeights()
int clientIndex = 0;
foreach (const KLDAP::LdapClient *client, ldapSearch->clients()) {
const int sourceIndex =
- addCompletionSource(i18n("LDAP server: %1" , client->server().host()),
+ addCompletionSource(i18n("LDAP server: %1", client->server().host()),
client->completionWeight());
ldapClientToCompletionSourceMap.insert(clientIndex, sourceIndex);
diff --git a/libkdepim/src/addressline/recentaddress/recentaddresswidget.cpp b/libkdepim/src/addressline/recentaddress/recentaddresswidget.cpp
index defa7f4..53bab2f 100644
--- a/libkdepim/src/addressline/recentaddress/recentaddresswidget.cpp
+++ b/libkdepim/src/addressline/recentaddress/recentaddresswidget.cpp
@@ -58,7 +58,7 @@ RecentAddressWidget::RecentAddressWidget(QWidget *parent)
mNewButton = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add")), i18n("&Add"), this);
mNewButton->setObjectName(QStringLiteral("new_button"));
connect(mNewButton, &QPushButton::clicked, this, &RecentAddressWidget::slotAddItem);
- btnsLayout->insertWidget(0 , mNewButton);
+ btnsLayout->insertWidget(0, mNewButton);
mRemoveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("list-remove")), i18n("&Remove"), this);
mRemoveButton->setObjectName(QStringLiteral("remove_button"));
diff --git a/libkdepim/src/job/addemailaddressjob.cpp b/libkdepim/src/job/addemailaddressjob.cpp
index 5eeb38f..ce09fb6 100644
--- a/libkdepim/src/job/addemailaddressjob.cpp
+++ b/libkdepim/src/job/addemailaddressjob.cpp
@@ -120,7 +120,7 @@ public:
const Akonadi::CollectionFetchJob *addressBookJob =
qobject_cast<Akonadi::CollectionFetchJob *>(job);
- Akonadi::Collection::List canCreateItemCollections ;
+ Akonadi::Collection::List canCreateItemCollections;
foreach (const Akonadi::Collection &collection, addressBookJob->collections()) {
if (Akonadi::Collection::CanCreateItem & collection.rights()) {
diff --git a/libkdepim/src/job/addemaildisplayjob.cpp b/libkdepim/src/job/addemaildisplayjob.cpp
index 7590f91..51db242 100644
--- a/libkdepim/src/job/addemaildisplayjob.cpp
+++ b/libkdepim/src/job/addemaildisplayjob.cpp
@@ -143,7 +143,7 @@ public:
const Akonadi::CollectionFetchJob *addressBookJob =
qobject_cast<Akonadi::CollectionFetchJob *>(job);
- Akonadi::Collection::List canCreateItemCollections ;
+ Akonadi::Collection::List canCreateItemCollections;
foreach (const Akonadi::Collection &collection, addressBookJob->collections()) {
if (Akonadi::Collection::CanCreateItem & collection.rights()) {
diff --git a/libkdepim/src/ldap/ldapclientsearch.cpp b/libkdepim/src/ldap/ldapclientsearch.cpp
index 70633e7..ea9fc4e 100644
--- a/libkdepim/src/ldap/ldapclientsearch.cpp
+++ b/libkdepim/src/ldap/ldapclientsearch.cpp
@@ -204,7 +204,7 @@ void LdapClientSearch::Private::readConfig()
q->connect(&mDataTimer, SIGNAL(timeout()), SLOT(slotDataTimer()));
}
- mConfigFile = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/kabldaprc") ;
+ mConfigFile = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/kabldaprc");
KDirWatch::self()->addFile(mConfigFile);
}
diff --git a/libkdepim/src/ldap/ldapsearchdialog.cpp b/libkdepim/src/ldap/ldapsearchdialog.cpp
index ffa580a..156001c 100644
--- a/libkdepim/src/ldap/ldapsearchdialog.cpp
+++ b/libkdepim/src/ldap/ldapsearchdialog.cpp
@@ -711,7 +711,7 @@ void LdapSearchDialog::Private::restoreSettings()
// First clean the list to make sure it is empty at
// the beginning of the process
- qDeleteAll(mLdapClientList) ;
+ qDeleteAll(mLdapClientList);
mLdapClientList.clear();
KConfig *config = KLDAP::LdapClientSearchConfig::config();
diff --git a/libkdepim/src/progresswidget/progressmanager.cpp b/libkdepim/src/progresswidget/progressmanager.cpp
index 5308939..937e400 100644
--- a/libkdepim/src/progresswidget/progressmanager.cpp
+++ b/libkdepim/src/progresswidget/progressmanager.cpp
@@ -241,7 +241,7 @@ ProgressManager::~ProgressManager()
ProgressManager *ProgressManager::instance()
{
- return progressManagerPrivate.isDestroyed() ? Q_NULLPTR : &progressManagerPrivate->instance ;
+ return progressManagerPrivate.isDestroyed() ? Q_NULLPTR : &progressManagerPrivate->instance;
}
QString ProgressManager::getUniqueID()
diff --git a/libkdepim/src/widgets/kwidgetlister.cpp b/libkdepim/src/widgets/kwidgetlister.cpp
index e405ae2..5f33e54 100644
--- a/libkdepim/src/widgets/kwidgetlister.cpp
+++ b/libkdepim/src/widgets/kwidgetlister.cpp
@@ -228,12 +228,12 @@ void KWidgetLister::setNumberOfShownWidgetsTo(int aNum)
int missingWidgets = qMax(aNum - (int)d->mWidgetList.count(), 0);
// remove superfluous widgets
- for (; superfluousWidgets ; superfluousWidgets--) {
+ for (; superfluousWidgets; superfluousWidgets--) {
removeLastWidget();
}
// add missing widgets
- for (; missingWidgets ; missingWidgets--) {
+ for (; missingWidgets; missingWidgets--) {
addWidgetAtEnd();
}
}
diff --git a/libkdepim/tests/testldapclient.cpp b/libkdepim/tests/testldapclient.cpp
index 314bda5..1ef1750 100644
--- a/libkdepim/tests/testldapclient.cpp
+++ b/libkdepim/tests/testldapclient.cpp
@@ -91,7 +91,7 @@ void TestLDAPClient::cleanup()
void TestLDAPClient::testIntevation()
{
- qDebug() ;
+ qDebug();
mClient = new KLDAP::LdapClient(0, this);
#ifdef __GNUC__
@@ -190,7 +190,7 @@ void TestLDAPClient::slotLDAPError(const QString &err)
void TestLDAPClient::slotLDAPDone()
{
- qDebug() ;
+ qDebug();
Q_EMIT leaveModality();
}
diff --git a/libkdepimdbusinterfaces/src/dbusinterfaces/kmkernel.h b/libkdepimdbusinterfaces/src/dbusinterfaces/kmkernel.h
index b2333d9..181a087 100644
--- a/libkdepimdbusinterfaces/src/dbusinterfaces/kmkernel.h
+++ b/libkdepimdbusinterfaces/src/dbusinterfaces/kmkernel.h
@@ -196,7 +196,7 @@ public Q_SLOTS:
bool hidden,
const QString &messageFile,
const QStringList &attachmentPaths,
- const QStringList &customHeaders , const QString &replyTo = QString(), const QString &inReplyTo = QString());
+ const QStringList &customHeaders, const QString &replyTo = QString(), const QString &inReplyTo = QString());
/**
* Opens a composer window and prefills it with different
@@ -383,7 +383,7 @@ public:
void action(bool mailto, bool check, const QString &to, const QString &cc,
const QString &bcc, const QString &subj, const QString &body,
const QUrl &messageFile, const QList<QUrl> &attach,
- const QStringList &customHeaders , const QString &replyTo, const QString &inReplyTo);
+ const QStringList &customHeaders, const QString &replyTo, const QString &inReplyTo);
//sets online status for akonadi accounts. true for online, false for offline
void setAccountStatus(bool);
diff --git a/libkleo/src/backends/chiasmus/chiasmusbackend.cpp b/libkleo/src/backends/chiasmus/chiasmusbackend.cpp
index 8cf691b..80a52b3 100644
--- a/libkleo/src/backends/chiasmus/chiasmusbackend.cpp
+++ b/libkleo/src/backends/chiasmus/chiasmusbackend.cpp
@@ -104,7 +104,7 @@ public:
to(const QVariant &v)
{
const QList<QVariant> vl = v.toList();
- for (QList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it) {
+ for (QList<QVariant>::const_iterator it = vl.begin(), end = vl.end(); it != end; ++it) {
m.push_back(to<T>(*it));
}
}
@@ -123,7 +123,7 @@ public:
{
const QList<QVariant> vl = v.toList();
m.reserve(m.size() + vl.size());
- for (QList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it) {
+ for (QList<QVariant>::const_iterator it = vl.begin(), end = vl.end(); it != end; ++it) {
m.push_back(to<T>(*it));
}
}
@@ -157,7 +157,7 @@ template <typename T> struct from_helper< QList<T> > : public QVariant {
from_helper(const QList<T> &l)
{
QList<QVariant> result;
- for (typename QList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it) {
+ for (typename QList<T>::const_iterator it = l.begin(), end = l.end(); it != end; ++it) {
result.push_back(from(*it));
}
QVariant::operator=(result);
@@ -167,7 +167,7 @@ template <typename T> struct from_helper< std::vector<T> > : public QVariant {
from_helper(const std::vector<T> &l)
{
QList<QVariant> result;
- for (typename std::vector<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it) {
+ for (typename std::vector<T>::const_iterator it = l.begin(), end = l.end(); it != end; ++it) {
result.push_back(from(*it));
}
QVariant::operator=(result);
@@ -263,46 +263,38 @@ public:
{
return to< QList<QUrl> >(mValue);
}
- void resetToDefault() Q_DECL_OVERRIDE
- {
+ void resetToDefault() Q_DECL_OVERRIDE {
mValue = defaultValue();
mDirty = false;
}
- void setBoolValue(bool value) Q_DECL_OVERRIDE
- {
+ void setBoolValue(bool value) Q_DECL_OVERRIDE {
setValue(QVariant(value));
}
- void setStringValue(const QString &value) Q_DECL_OVERRIDE
- {
+ void setStringValue(const QString &value) Q_DECL_OVERRIDE {
setValue(value);
}
- void setIntValue(int value) Q_DECL_OVERRIDE
- {
+ void setIntValue(int value) Q_DECL_OVERRIDE {
setValue(value);
}
- void setUIntValue(unsigned int value) Q_DECL_OVERRIDE
- {
+ void setUIntValue(unsigned int value) Q_DECL_OVERRIDE {
setValue(value);
}
- void setURLValue(const QUrl &value) Q_DECL_OVERRIDE
- {
- if (argType() != ArgType_Path) {
+ void setURLValue(const QUrl &value) Q_DECL_OVERRIDE {
+ if (argType() != ArgType_Path)
+ {
setValue(value.url());
} else {
setValue(value.path());
}
}
void setNumberOfTimesSet(unsigned int) Q_DECL_OVERRIDE {}
- void setIntValueList(const std::vector<int> &l) Q_DECL_OVERRIDE
- {
+ void setIntValueList(const std::vector<int> &l) Q_DECL_OVERRIDE {
setValue(from(l));
}
- void setUIntValueList(const std::vector<unsigned int> &l) Q_DECL_OVERRIDE
- {
+ void setUIntValueList(const std::vector<unsigned int> &l) Q_DECL_OVERRIDE {
setValue(from(l));
}
- void setURLValueList(const QList<QUrl> &l) Q_DECL_OVERRIDE
- {
+ void setURLValueList(const QList<QUrl> &l) Q_DECL_OVERRIDE {
setValue(from(l));
}
bool isDirty() const Q_DECL_OVERRIDE
@@ -417,7 +409,7 @@ public:
QStringList entryList() const Q_DECL_OVERRIDE
{
QStringList result;
- for (unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i) {
+ for (unsigned int i = 0; i < kleo_chiasmus_config_entries_dim; ++i) {
result.push_back(QLatin1String(kleo_chiasmus_config_entries[i].name));
}
return result;
@@ -428,7 +420,7 @@ public:
return entry;
}
const KConfigGroup group(configObject(), "Chiasmus");
- for (unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i)
+ for (unsigned int i = 0; i < kleo_chiasmus_config_entries_dim; ++i)
if (name == QLatin1String(kleo_chiasmus_config_entries[i].name)) {
ChiasmusConfigEntry *entry = new ChiasmusConfigEntry(i);
entry->read(group);
@@ -440,7 +432,7 @@ public:
void sync()
{
KConfigGroup group(configObject(), "Chiasmus");
- for (std::map<QString, ChiasmusConfigEntry *>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it) {
+ for (std::map<QString, ChiasmusConfigEntry *>::const_iterator it = mCache.begin(), end = mCache.end(); it != end; ++it) {
it->second->sync(group);
}
group.sync();
@@ -458,7 +450,7 @@ private:
}
void clear()
{
- for (std::map<QString, ChiasmusConfigEntry *>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it) {
+ for (std::map<QString, ChiasmusConfigEntry *>::const_iterator it = mCache.begin(), end = mCache.end(); it != end; ++it) {
delete it->second;
}
mCache.clear();
@@ -524,7 +516,7 @@ public:
QStringList componentList() const Q_DECL_OVERRIDE
{
- return QStringList() << QStringLiteral("Chiasmus") ;
+ return QStringList() << QStringLiteral("Chiasmus");
}
ChiasmusComponent *component(const QString &name) const Q_DECL_OVERRIDE
{
@@ -536,14 +528,13 @@ public:
}
return mComponent;
}
- void sync(bool) Q_DECL_OVERRIDE
- {
- if (mComponent) {
+ void sync(bool) Q_DECL_OVERRIDE {
+ if (mComponent)
+ {
mComponent->sync();
}
}
- void clear() Q_DECL_OVERRIDE
- {
+ void clear() Q_DECL_OVERRIDE {
delete mComponent;
mComponent = 0;
}
@@ -759,5 +750,5 @@ bool Kleo::ChiasmusBackend::supportsProtocol(const char *name) const
const char *Kleo::ChiasmusBackend::enumerateProtocols(int i) const
{
- return i == 0 ? "Chiasmus" : 0 ;
+ return i == 0 ? "Chiasmus" : 0;
}
diff --git a/libkleo/src/backends/chiasmus/chiasmusjob.cpp b/libkleo/src/backends/chiasmus/chiasmusjob.cpp
index cb71bde..3928e5d 100644
--- a/libkleo/src/backends/chiasmus/chiasmusjob.cpp
+++ b/libkleo/src/backends/chiasmus/chiasmusjob.cpp
@@ -174,7 +174,7 @@ GpgME::Error Kleo::ChiasmusJob::finished()
void Kleo::ChiasmusJob::showChiasmusOutput()
{
- qDebug() ;
+ qDebug();
if (mStderr.isEmpty()) {
return;
}
diff --git a/libkleo/src/backends/chiasmus/chiasmuslibrary.cpp b/libkleo/src/backends/chiasmus/chiasmuslibrary.cpp
index 322b81b..d025317 100644
--- a/libkleo/src/backends/chiasmus/chiasmuslibrary.cpp
+++ b/libkleo/src/backends/chiasmus/chiasmuslibrary.cpp
@@ -107,7 +107,7 @@ public:
ArgvProvider(const QVector<QByteArray> &args)
{
mArgv = new char *[args.size()];
- for (int i = 0 ; i < args.size() ; ++i) {
+ for (int i = 0; i < args.size(); ++i) {
mArgv[i] = strdup(args[i].data());
}
}
diff --git a/libkleo/src/backends/chiasmus/config_data.c b/libkleo/src/backends/chiasmus/config_data.c
index 0a1a1f5..13d36ba 100644
--- a/libkleo/src/backends/chiasmus/config_data.c
+++ b/libkleo/src/backends/chiasmus/config_data.c
@@ -88,5 +88,5 @@ const struct kleo_chiasmus_config_data kleo_chiasmus_config_entries[] = {
#endif /* HAVE_C99_INITIALIZERS */
};
const unsigned int kleo_chiasmus_config_entries_dim
- = sizeof kleo_chiasmus_config_entries / sizeof * kleo_chiasmus_config_entries ;
+ = sizeof kleo_chiasmus_config_entries / sizeof * kleo_chiasmus_config_entries;
diff --git a/libkleo/src/backends/chiasmus/obtainkeysjob.cpp b/libkleo/src/backends/chiasmus/obtainkeysjob.cpp
index c040f87..aa468bc 100644
--- a/libkleo/src/backends/chiasmus/obtainkeysjob.cpp
+++ b/libkleo/src/backends/chiasmus/obtainkeysjob.cpp
@@ -104,7 +104,7 @@ void Kleo::ObtainKeysJob::slotPerform(bool async)
const QDir dir(KShell::tildeExpand(mKeyPaths[mIndex]));
const QFileInfoList xisFiles = dir.entryInfoList(QStringList() << QStringLiteral("*.xis;*.XIS"), QDir::Files);
- for (QFileInfoList::const_iterator it = xisFiles.begin(), end = xisFiles.end() ; it != end ; ++it)
+ for (QFileInfoList::const_iterator it = xisFiles.begin(), end = xisFiles.end(); it != end; ++it)
if ((*it).isReadable()) {
mResult.push_back((*it).absoluteFilePath());
}
diff --git a/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.cpp b/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.cpp
index 415fc42..ed6f40f 100644
--- a/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.cpp
@@ -359,7 +359,7 @@ void QGpgMECryptoConfigComponent::sync(bool runtime)
const QString gpgconf = QGpgMECryptoConfig::gpgConfPath();
QString commandLine = gpgconf.isEmpty()
? QStringLiteral("gpgconf")
- : KShell::quoteArg(gpgconf) ;
+ : KShell::quoteArg(gpgconf);
if (runtime) {
commandLine += QLatin1String(" --runtime");
}
@@ -455,7 +455,8 @@ static QString gpgconf_escape(const QString &str, bool handleComma = true)
return esc;
}
-static QString urlpart_escape(const QString &str) {
+static QString urlpart_escape(const QString &str)
+{
/* We need to double escape here, as a username or password
* or an LDAP Base-DN may contain : or , and in that
* case we would break gpgconf's format if we only escaped
@@ -465,7 +466,8 @@ static QString urlpart_escape(const QString &str) {
return gpgconf_escape(gpgconf_escape(str, false), false);
}
-static QString urlpart_unescape(const QString &str) {
+static QString urlpart_unescape(const QString &str)
+{
/* See urlpart_escape */
return gpgconf_unescape(gpgconf_unescape(str, false), false);
}
@@ -546,7 +548,7 @@ QVariant QGpgMECryptoConfigEntry::stringToValue(const QString &str, bool unescap
if (isList()) {
if (argType() == ArgType_None) {
bool ok = true;
- const QVariant v = str.isEmpty() ? 0U : str.toUInt(&ok) ;
+ const QVariant v = str.isEmpty() ? 0U : str.toUInt(&ok);
if (!ok) {
qCWarning(GPGPME_BACKEND_LOG) << "list-of-none should have an unsigned int as value:" << str;
}
diff --git a/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.h b/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.h
index 1ebaa6c..7a01399 100644
--- a/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.h
+++ b/libkleo/src/backends/qgpgme/qgpgmecryptoconfig.h
@@ -146,7 +146,7 @@ public:
}
QString path() const Q_DECL_OVERRIDE
{
- return mComponent->name() + QLatin1Char('/') + mName ;
+ return mComponent->name() + QLatin1Char('/') + mName;
}
Kleo::CryptoConfigEntry::Level level() const Q_DECL_OVERRIDE
{
@@ -181,7 +181,7 @@ public:
}
QString path() const Q_DECL_OVERRIDE
{
- return mGroup->path() + QLatin1Char('/') + mName ;
+ return mGroup->path() + QLatin1Char('/') + mName;
}
bool isOptional() const Q_DECL_OVERRIDE;
bool isReadOnly() const Q_DECL_OVERRIDE;
diff --git a/libkleo/src/backends/qgpgme/qgpgmeencryptjob.cpp b/libkleo/src/backends/qgpgme/qgpgmeencryptjob.cpp
index 8b067ab..b3a5042 100644
--- a/libkleo/src/backends/qgpgme/qgpgmeencryptjob.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmeencryptjob.cpp
@@ -82,7 +82,7 @@ static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread,
const Data indata(&in);
const Context::EncryptionFlags eflags =
- alwaysTrust ? Context::AlwaysTrust : Context::None ;
+ alwaysTrust ? Context::AlwaysTrust : Context::None;
if (!cipherText) {
QGpgME::QByteArrayDataProvider out;
diff --git a/libkleo/src/backends/qgpgme/qgpgmekeygenerationjob.cpp b/libkleo/src/backends/qgpgme/qgpgmekeygenerationjob.cpp
index e392b1b..71ab933 100644
--- a/libkleo/src/backends/qgpgme/qgpgmekeygenerationjob.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmekeygenerationjob.cpp
@@ -54,7 +54,7 @@ QGpgMEKeyGenerationJob::~QGpgMEKeyGenerationJob() {}
static QGpgMEKeyGenerationJob::result_type generate_key(Context *ctx, const QString &parameters)
{
QGpgME::QByteArrayDataProvider dp;
- Data data = ctx->protocol() == CMS ? Data(&dp) : Data(Data::null) ;
+ Data data = ctx->protocol() == CMS ? Data(&dp) : Data(Data::null);
assert(data.isNull() == (ctx->protocol() != CMS));
const KeyGenerationResult res = ctx->generateKey(parameters.toUtf8().constData(), data);
diff --git a/libkleo/src/backends/qgpgme/qgpgmekeylistjob.cpp b/libkleo/src/backends/qgpgme/qgpgmekeylistjob.cpp
index f3fb691..8e68cf5 100644
--- a/libkleo/src/backends/qgpgme/qgpgmekeylistjob.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmekeylistjob.cpp
@@ -162,7 +162,7 @@ void QGpgMEKeyListJob::showErrorDialog(QWidget *parent, const QString &caption)
}
const QString msg = i18n("<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
- "<p><b>%1</b></p></qt>" ,
+ "<p><b>%1</b></p></qt>",
QString::fromLocal8Bit(mResult.error().asString()));
KMessageBox::error(parent, msg, caption);
}
diff --git a/libkleo/src/backends/qgpgme/qgpgmelistallkeysjob.cpp b/libkleo/src/backends/qgpgme/qgpgmelistallkeysjob.cpp
index 834a879..f4f218c 100644
--- a/libkleo/src/backends/qgpgme/qgpgmelistallkeysjob.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmelistallkeysjob.cpp
@@ -164,7 +164,7 @@ void QGpgMEListAllKeysJob::showErrorDialog(QWidget *parent, const QString &capti
}
const QString msg = i18n("<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
- "<p><b>%1</b></p></qt>" ,
+ "<p><b>%1</b></p></qt>",
QString::fromLocal8Bit(mResult.error().asString()));
KMessageBox::error(parent, msg, caption);
}
diff --git a/libkleo/src/backends/qgpgme/qgpgmenewcryptoconfig.cpp b/libkleo/src/backends/qgpgme/qgpgmenewcryptoconfig.cpp
index ffd292c..edccb35 100644
--- a/libkleo/src/backends/qgpgme/qgpgmenewcryptoconfig.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmenewcryptoconfig.cpp
@@ -177,7 +177,7 @@ void QGpgMENewCryptoConfigComponent::setComponent(const Component &component)
group->m_entryNames.push_back(name);
group->m_entriesByName[name] = entry;
} else {
- qCWarning(GPGPME_BACKEND_LOG) << "found no group for entry" << o.name() << "of component" << name() ;
+ qCWarning(GPGPME_BACKEND_LOG) << "found no group for entry" << o.name() << "of component" << name();
}
if (group) {
m_groupsByName[group->name()] = group;
@@ -248,7 +248,7 @@ QString QGpgMENewCryptoConfigGroup::description() const
QString QGpgMENewCryptoConfigGroup::path() const
{
if (const shared_ptr<QGpgMENewCryptoConfigComponent> c = m_component.lock()) {
- return c->name() + QLatin1Char('/') + name() ;
+ return c->name() + QLatin1Char('/') + name();
} else {
return QString();
}
@@ -320,7 +320,7 @@ QVariant QGpgMENewCryptoConfigEntry::stringToValue(const QString &str, bool unes
if (isList()) {
if (argType() == ArgType_None) {
bool ok = true;
- const QVariant v = str.isEmpty() ? 0U : str.toUInt(&ok) ;
+ const QVariant v = str.isEmpty() ? 0U : str.toUInt(&ok);
if (!ok) {
qCWarning(GPGPME_BACKEND_LOG) << "list-of-none should have an unsigned int as value:" << str;
}
@@ -383,7 +383,7 @@ QString QGpgMENewCryptoConfigEntry::description() const
QString QGpgMENewCryptoConfigEntry::path() const
{
if (const shared_ptr<QGpgMENewCryptoConfigGroup> g = m_group.lock()) {
- return g->path() + QLatin1Char('/') + name() ;
+ return g->path() + QLatin1Char('/') + name();
} else {
return QString();
}
@@ -391,22 +391,22 @@ QString QGpgMENewCryptoConfigEntry::path() const
bool QGpgMENewCryptoConfigEntry::isOptional() const
{
- return m_option.flags() & Optional ;
+ return m_option.flags() & Optional;
}
bool QGpgMENewCryptoConfigEntry::isReadOnly() const
{
- return m_option.flags() & NoChange ;
+ return m_option.flags() & NoChange;
}
bool QGpgMENewCryptoConfigEntry::isList() const
{
- return m_option.flags() & List ;
+ return m_option.flags() & List;
}
bool QGpgMENewCryptoConfigEntry::isRuntime() const
{
- return m_option.flags() & Runtime ;
+ return m_option.flags() & Runtime;
}
CryptoConfigEntry::Level QGpgMENewCryptoConfigEntry::level() const
@@ -532,7 +532,6 @@ unsigned int QGpgMENewCryptoConfigEntry::numberOfTimesSet() const
return m_option.currentValue().uintValue();
}
-
std::vector<int> QGpgMENewCryptoConfigEntry::intValueList() const
{
Q_ASSERT(m_option.alternateType() == IntegerType);
diff --git a/libkleo/src/backends/qgpgme/qgpgmeprogresstokenmapper.cpp b/libkleo/src/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
index eb1a445..b9ec443 100644
--- a/libkleo/src/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
@@ -108,10 +108,10 @@ QString Kleo::QGpgMEProgressTokenMapper::map(const QString &token, int subtoken)
qCDebug(GPGPME_BACKEND_LOG) << token << subtoken;
- for (const _tokens *it = boost::begin(tokens), *end = boost::end(tokens) ; it != end ; ++it) {
+ for (const _tokens *it = boost::begin(tokens), *end = boost::end(tokens); it != end; ++it) {
if (token.compare(QLatin1String(it->token), Qt::CaseInsensitive) == 0) {
if (it->desc && it->numDesc) {
- for (unsigned int i = 0, e = it->numDesc ; i != e ; ++i)
+ for (unsigned int i = 0, e = it->numDesc; i != e; ++i)
if (it->desc[i].type == subtoken) {
return i18n(it->desc[i].display);
}
diff --git a/libkleo/src/backends/qgpgme/qgpgmesignencryptjob.cpp b/libkleo/src/backends/qgpgme/qgpgmesignencryptjob.cpp
index 3637c35..c532178 100644
--- a/libkleo/src/backends/qgpgme/qgpgmesignencryptjob.cpp
+++ b/libkleo/src/backends/qgpgme/qgpgmesignencryptjob.cpp
@@ -77,7 +77,7 @@ static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thr
const Data indata(&in);
const Context::EncryptionFlags eflags =
- alwaysTrust ? Context::AlwaysTrust : Context::None ;
+ alwaysTrust ? Context::AlwaysTrust : Context::None;
ctx->clearSigningKeys();
Q_FOREACH (const Key &signer, signers)
diff --git a/libkleo/src/backends/qgpgme/threadedjobmixin.h b/libkleo/src/backends/qgpgme/threadedjobmixin.h
index 7ddc302..73712bb 100644
--- a/libkleo/src/backends/qgpgme/threadedjobmixin.h
+++ b/libkleo/src/backends/qgpgme/threadedjobmixin.h
@@ -213,9 +213,9 @@ protected:
doEmitResult(r);
this->deleteLater();
}
- void slotCancel() Q_DECL_OVERRIDE
- {
- if (m_ctx) {
+ void slotCancel() Q_DECL_OVERRIDE {
+ if (m_ctx)
+ {
m_ctx->cancelPendingOperation();
}
}
diff --git a/libkleo/src/kleo/checksumdefinition.cpp b/libkleo/src/kleo/checksumdefinition.cpp
index a09f0f0..e08e992 100644
--- a/libkleo/src/kleo/checksumdefinition.cpp
+++ b/libkleo/src/kleo/checksumdefinition.cpp
@@ -124,8 +124,8 @@ static QString try_extensions(const QString &path)
static const char exts[][4] = {
"", "exe", "bat", "bin", "cmd",
};
- static const size_t numExts = sizeof exts / sizeof * exts ;
- for (unsigned int i = 0 ; i < numExts ; ++i) {
+ static const size_t numExts = sizeof exts / sizeof * exts;
+ for (unsigned int i = 0; i < numExts; ++i) {
const QFileInfo fi(path + QLatin1Char('.') + QLatin1String(exts[i]));
if (fi.exists()) {
return fi.filePath();
@@ -338,7 +338,7 @@ static bool start_command(QProcess *p, const char *functionName,
}
const char sep =
method == ChecksumDefinition::NewlineSeparatedInputFile ? '\n' :
- /* else */ '\0' ;
+ /* else */ '\0';
const QByteArray stdin = make_input(files, sep);
if (p->write(stdin) != stdin.size()) {
return false;
diff --git a/libkleo/src/kleo/cryptobackendfactory.cpp b/libkleo/src/kleo/cryptobackendfactory.cpp
index 598aca8..e80f1a3 100644
--- a/libkleo/src/kleo/cryptobackendfactory.cpp
+++ b/libkleo/src/kleo/cryptobackendfactory.cpp
@@ -91,7 +91,7 @@ Kleo::CryptoBackendFactory::~CryptoBackendFactory()
{
mSelf = 0; // first!
- for (std::vector<CryptoBackend *>::iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it) {
+ for (std::vector<CryptoBackend *>::iterator it = mBackendList.begin(); it != mBackendList.end(); ++it) {
delete *it;
*it = 0;
}
@@ -175,9 +175,9 @@ bool Kleo::CryptoBackendFactory::hasBackends() const
void Kleo::CryptoBackendFactory::scanForBackends(QStringList *reasons)
{
- for (std::vector<CryptoBackend *>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it) {
+ for (std::vector<CryptoBackend *>::const_iterator it = mBackendList.begin(); it != mBackendList.end(); ++it) {
assert(*it);
- for (int i = 0 ;; ++i) {
+ for (int i = 0;; ++i) {
const char *protocol = (*it)->enumerateProtocols(i);
if (!protocol) {
break;
@@ -196,12 +196,12 @@ void Kleo::CryptoBackendFactory::scanForBackends(QStringList *reasons)
const Kleo::CryptoBackend *Kleo::CryptoBackendFactory::backend(unsigned int idx) const
{
- return (idx < mBackendList.size()) ? mBackendList[idx] : 0 ;
+ return (idx < mBackendList.size()) ? mBackendList[idx] : 0;
}
const Kleo::CryptoBackend *Kleo::CryptoBackendFactory::backendByName(const QString &name) const
{
- for (std::vector<CryptoBackend *>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it) {
+ for (std::vector<CryptoBackend *>::const_iterator it = mBackendList.begin(); it != mBackendList.end(); ++it) {
if ((*it)->name() == name) {
return *it;
}
@@ -231,7 +231,7 @@ void Kleo::CryptoBackendFactory::setOpenPGPBackend(const CryptoBackend *backend)
void Kleo::CryptoBackendFactory::setProtocolBackend(const char *protocol, const CryptoBackend *backend)
{
- const QString name = backend ? backend->name() : QString() ;
+ const QString name = backend ? backend->name() : QString();
KConfigGroup group(configObject(), "Backends");
group.writeEntry(protocol, name);
configObject()->sync();
@@ -250,7 +250,7 @@ static const char *defaultBackend(const char *proto)
{ "Chiasmus", "chiasmus" },
#endif
};
- for (unsigned int i = 0 ; i < sizeof defaults / sizeof * defaults ; ++i)
+ for (unsigned int i = 0; i < sizeof defaults / sizeof * defaults; ++i)
if (qstricmp(proto, defaults[i].proto) == 0) {
return defaults[i].backend;
}
@@ -261,7 +261,7 @@ void Kleo::CryptoBackendFactory::readConfig()
{
mBackends.clear();
const KConfigGroup group(configObject(), "Backends");
- for (ProtocolSet::const_iterator it = mAvailableProtocols.begin(), end = mAvailableProtocols.end() ; it != end ; ++it) {
+ for (ProtocolSet::const_iterator it = mAvailableProtocols.begin(), end = mAvailableProtocols.end(); it != end; ++it) {
const QString backend = group.readEntry(*it);
mBackends[*it] = backendByName(backend.isEmpty() ? QString::fromLatin1(defaultBackend(*it)) : backend);
}
diff --git a/libkleo/src/kleo/dn.cpp b/libkleo/src/kleo/dn.cpp
index 8289a59..63f0463 100644
--- a/libkleo/src/kleo/dn.cpp
+++ b/libkleo/src/kleo/dn.cpp
@@ -127,10 +127,10 @@ trim_trailing_spaces(char *string)
}
}
if (mark) {
- *mark = '\0' ;
+ *mark = '\0';
}
- return string ;
+ return string;
}
/* Parse a DN and return an array-ized one. This is not a validating
@@ -159,7 +159,7 @@ parse_dn_part(DnPair *array, const unsigned char *string)
p[n] = 0;
trim_trailing_spaces((char *)p);
// map OIDs to their names:
- for (unsigned int i = 0 ; i < numOidMaps ; ++i)
+ for (unsigned int i = 0; i < numOidMaps; ++i)
if (!strcasecmp((char *)p, oidmap[i].oid)) {
free(p);
p = strdup(oidmap[i].name);
@@ -286,7 +286,7 @@ parse_dn(const QString &dn)
static QString dn_escape(const QString &s)
{
QString result;
- for (unsigned int i = 0, end = s.length() ; i != end ; ++i) {
+ for (unsigned int i = 0, end = s.length(); i != end; ++i) {
const QChar ch = s[i];
switch (ch.unicode()) {
case ',':
@@ -309,7 +309,7 @@ static QString
serialise(const QVector<Kleo::DN::Attribute> &dn, const QString &sep)
{
QStringList result;
- for (QVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it)
+ for (QVector<Kleo::DN::Attribute>::const_iterator it = dn.begin(); it != dn.end(); ++it)
if (!(*it).name().isEmpty() && !(*it).value().isEmpty()) {
result.push_back((*it).name().trimmed() + QLatin1Char('=') + dn_escape((*it).value().trimmed()));
}
@@ -333,14 +333,14 @@ reorder_dn(const Kleo::DN::Attribute::List &dn)
}
// process the known attrs in the desired order
- for (QStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit)
+ for (QStringList::const_iterator oit = attrOrder.begin(); oit != attrOrder.end(); ++oit)
if (*oit == QLatin1String("_X_")) {
// insert the unknown attrs
std::copy(unknownEntries.begin(), unknownEntries.end(),
std::back_inserter(result));
unknownEntries.clear(); // don't produce dup's
} else {
- for (Kleo::DN::const_iterator dnit = dn.begin() ; dnit != dn.end() ; ++dnit)
+ for (Kleo::DN::const_iterator dnit = dn.begin(); dnit != dn.end(); ++dnit)
if ((*dnit).name() == *oit) {
result.push_back(*dnit);
}
@@ -423,12 +423,12 @@ QString Kleo::DN::prettyDN() const
QString Kleo::DN::dn() const
{
- return d ? serialise(d->attributes, QStringLiteral(",")) : QString() ;
+ return d ? serialise(d->attributes, QStringLiteral(",")) : QString();
}
QString Kleo::DN::dn(const QString &sep) const
{
- return d ? serialise(d->attributes, sep) : QString() ;
+ return d ? serialise(d->attributes, sep) : QString();
}
// static
@@ -463,8 +463,8 @@ QString Kleo::DN::operator[](const QString &attr) const
return QString();
}
const QString attrUpper = attr.toUpper();
- for (QVector<Attribute>::const_iterator it = d->attributes.constBegin() ;
- it != d->attributes.constEnd() ; ++it)
+ for (QVector<Attribute>::const_iterator it = d->attributes.constBegin();
+ it != d->attributes.constEnd(); ++it)
if ((*it).name() == attrUpper) {
return (*it).value();
}
@@ -475,12 +475,12 @@ static QVector<Kleo::DN::Attribute> empty;
Kleo::DN::const_iterator Kleo::DN::begin() const
{
- return d ? d->attributes.constBegin() : empty.constBegin() ;
+ return d ? d->attributes.constBegin() : empty.constBegin();
}
Kleo::DN::const_iterator Kleo::DN::end() const
{
- return d ? d->attributes.constEnd() : empty.constEnd() ;
+ return d ? d->attributes.constEnd() : empty.constEnd();
}
/////////////////////
@@ -490,7 +490,7 @@ namespace
struct ltstr {
bool operator()(const char *s1, const char *s2) const
{
- return qstrcmp(s1, s2) < 0 ;
+ return qstrcmp(s1, s2) < 0;
}
};
}
@@ -522,7 +522,7 @@ static std::pair<const char *, const char *> const attributeLabels[] = {
MAKE_PAIR("UID", I18N_NOOP("Unique ID"))
#undef MAKE_PAIR
};
-static const unsigned int numAttributeLabels = sizeof attributeLabels / sizeof * attributeLabels ;
+static const unsigned int numAttributeLabels = sizeof attributeLabels / sizeof * attributeLabels;
class Kleo::DNAttributeMapper::Private
{
@@ -539,7 +539,7 @@ Kleo::DNAttributeMapper::DNAttributeMapper()
{
d = new Private();
const KConfigGroup config(KSharedConfig::openConfig(), "DN");
- d->attributeOrder = config.readEntry("AttributeOrder" , QStringList());
+ d->attributeOrder = config.readEntry("AttributeOrder", QStringList());
if (d->attributeOrder.empty())
std::copy(defaultOrder, defaultOrder + sizeof defaultOrder / sizeof * defaultOrder,
std::back_inserter(d->attributeOrder));
@@ -575,7 +575,7 @@ QString Kleo::DNAttributeMapper::name2label(const QString &s) const
QStringList Kleo::DNAttributeMapper::names() const
{
QStringList result;
- for (std::map<const char *, const char *, ltstr>::const_iterator it = d->map.begin() ; it != d->map.end() ; ++it) {
+ for (std::map<const char *, const char *, ltstr>::const_iterator it = d->map.begin(); it != d->map.end(); ++it) {
result.push_back(QLatin1String(it->first));
}
return result;
diff --git a/libkleo/src/kleo/enum.cpp b/libkleo/src/kleo/enum.cpp
index 005c923..9fedb60 100644
--- a/libkleo/src/kleo/enum.cpp
+++ b/libkleo/src/kleo/enum.cpp
@@ -63,14 +63,14 @@ static const struct {
},
};
static const unsigned int numCryptoMessageFormats
- = sizeof cryptoMessageFormats / sizeof * cryptoMessageFormats ;
+ = sizeof cryptoMessageFormats / sizeof * cryptoMessageFormats;
const char *Kleo::cryptoMessageFormatToString(Kleo::CryptoMessageFormat f)
{
if (f == AutoFormat) {
return "auto";
}
- for (unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i)
+ for (unsigned int i = 0; i < numCryptoMessageFormats; ++i)
if (f == cryptoMessageFormats[i].format) {
return cryptoMessageFormats[i].configName;
}
@@ -80,7 +80,7 @@ const char *Kleo::cryptoMessageFormatToString(Kleo::CryptoMessageFormat f)
QStringList Kleo::cryptoMessageFormatsToStringList(unsigned int f)
{
QStringList result;
- for (unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i)
+ for (unsigned int i = 0; i < numCryptoMessageFormats; ++i)
if (f & cryptoMessageFormats[i].format) {
result.push_back(QLatin1String(cryptoMessageFormats[i].configName));
}
@@ -92,7 +92,7 @@ QString Kleo::cryptoMessageFormatToLabel(Kleo::CryptoMessageFormat f)
if (f == AutoFormat) {
return i18n("Any");
}
- for (unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i)
+ for (unsigned int i = 0; i < numCryptoMessageFormats; ++i)
if (f == cryptoMessageFormats[i].format) {
return i18n(cryptoMessageFormats[i].displayName);
}
@@ -102,7 +102,7 @@ QString Kleo::cryptoMessageFormatToLabel(Kleo::CryptoMessageFormat f)
Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat(const QString &s)
{
const QString t = s.toLower();
- for (unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i)
+ for (unsigned int i = 0; i < numCryptoMessageFormats; ++i)
if (t == QLatin1String(cryptoMessageFormats[i].configName)) {
return cryptoMessageFormats[i].format;
}
@@ -112,7 +112,7 @@ Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat(const QString &s)
unsigned int Kleo::stringListToCryptoMessageFormats(const QStringList &sl)
{
unsigned int result = 0;
- for (QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it) {
+ for (QStringList::const_iterator it = sl.begin(); it != sl.end(); ++it) {
result |= stringToCryptoMessageFormat(*it);
}
return result;
diff --git a/libkleo/src/kleo/hierarchicalkeylistjob.cpp b/libkleo/src/kleo/hierarchicalkeylistjob.cpp
index c07f629..c4ae620 100644
--- a/libkleo/src/kleo/hierarchicalkeylistjob.cpp
+++ b/libkleo/src/kleo/hierarchicalkeylistjob.cpp
@@ -154,7 +154,7 @@ GpgME::Error Kleo::HierarchicalKeyListJob::startAJob()
connect(mJob.data(), &KeyListJob::result, this, &HierarchicalKeyListJob::slotResult);
QStringList patterns;
- for (std::set<QString>::const_iterator it = mNextSet.begin() ; it != mNextSet.end() ; ++it) {
+ for (std::set<QString>::const_iterator it = mNextSet.begin(); it != mNextSet.end(); ++it) {
patterns.push_back(*it);
}
diff --git a/libkleo/src/kleo/job.cpp b/libkleo/src/kleo/job.cpp
index d46eeb4..d8a192a 100644
--- a/libkleo/src/kleo/job.cpp
+++ b/libkleo/src/kleo/job.cpp
@@ -94,7 +94,7 @@ GpgME::Error Kleo::Job::auditLogError() const
bool Kleo::Job::isAuditLogSupported() const
{
- return auditLogError().code() != GPG_ERR_NOT_IMPLEMENTED ;
+ return auditLogError().code() != GPG_ERR_NOT_IMPLEMENTED;
}
#define make_job_subclass_ext(x,y) \
diff --git a/libkleo/src/kleo/kconfigbasedkeyfilter.cpp b/libkleo/src/kleo/kconfigbasedkeyfilter.cpp
index c7bdb5f..effaafe 100644
--- a/libkleo/src/kleo/kconfigbasedkeyfilter.cpp
+++ b/libkleo/src/kleo/kconfigbasedkeyfilter.cpp
@@ -114,13 +114,13 @@ QFont KeyFilter::FontDescription::font(const QFont &base) const
KeyFilter::FontDescription KeyFilter::FontDescription::resolve(const FontDescription &other) const
{
FontDescription fd;
- fd.d->fullFont = this->d->fullFont || other.d->fullFont ;
+ fd.d->fullFont = this->d->fullFont || other.d->fullFont;
if (fd.d->fullFont) {
- fd.d->font = this->d->fullFont ? this->d->font : other.d->font ;
+ fd.d->font = this->d->fullFont ? this->d->font : other.d->font;
}
- fd.d->bold = this->d->bold || other.d->bold ;
- fd.d->italic = this->d->italic || other.d->italic ;
- fd.d->strikeOut = this->d->strikeOut || other.d->strikeOut ;
+ fd.d->bold = this->d->bold || other.d->bold;
+ fd.d->italic = this->d->italic || other.d->italic;
+ fd.d->strikeOut = this->d->strikeOut || other.d->strikeOut;
return fd;
}
@@ -139,7 +139,7 @@ static const struct {
static Key::OwnerTrust map2OwnerTrust(const QString &s)
{
- for (unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof * ownerTrustAndValidityMap ; ++i)
+ for (unsigned int i = 0; i < sizeof ownerTrustAndValidityMap / sizeof * ownerTrustAndValidityMap; ++i)
if (s.toLower() == QLatin1String(ownerTrustAndValidityMap[i].name)) {
return ownerTrustAndValidityMap[i].trust;
}
@@ -148,7 +148,7 @@ static Key::OwnerTrust map2OwnerTrust(const QString &s)
static UserID::Validity map2Validity(const QString &s)
{
- for (unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof * ownerTrustAndValidityMap ; ++i)
+ for (unsigned int i = 0; i < sizeof ownerTrustAndValidityMap / sizeof * ownerTrustAndValidityMap; ++i)
if (s.toLower() == QLatin1String(ownerTrustAndValidityMap[i].name)) {
return ownerTrustAndValidityMap[i].validity;
}
@@ -234,7 +234,7 @@ KConfigBasedKeyFilter::KConfigBasedKeyFilter(const KConfigGroup &config)
{ "is-at-least-", IsAtLeast },
{ "is-at-most-", IsAtMost },
};
- for (unsigned int i = 0 ; i < sizeof prefixMap / sizeof * prefixMap ; ++i) {
+ for (unsigned int i = 0; i < sizeof prefixMap / sizeof * prefixMap; ++i) {
const QString key = QLatin1String(prefixMap[i].prefix) + QLatin1String("ownertrust");
if (config.hasKey(key)) {
mOwnerTrust = prefixMap[i].state;
@@ -243,7 +243,7 @@ KConfigBasedKeyFilter::KConfigBasedKeyFilter(const KConfigGroup &config)
break;
}
}
- for (unsigned int i = 0 ; i < sizeof prefixMap / sizeof * prefixMap ; ++i) {
+ for (unsigned int i = 0; i < sizeof prefixMap / sizeof * prefixMap; ++i) {
const QString key = QLatin1String(prefixMap[i].prefix) + QLatin1String("validity");
if (config.hasKey(key)) {
mValidity = prefixMap[i].state;
@@ -264,7 +264,7 @@ KConfigBasedKeyFilter::KConfigBasedKeyFilter(const KConfigGroup &config)
mMatchContexts = NoMatchContext;
Q_FOREACH (const QString &ctx, contexts) {
bool found = false;
- for (unsigned int i = 0 ; i < sizeof matchMap / sizeof * matchMap ; ++i)
+ for (unsigned int i = 0; i < sizeof matchMap / sizeof * matchMap; ++i)
if (ctx == QLatin1String(matchMap[i].key)) {
mMatchContexts |= matchMap[i].context;
found = true;
@@ -289,7 +289,7 @@ static bool is_card_key(const Key &key)
{
const std::vector<Subkey> sks = key.subkeys();
return std::find_if(sks.begin(), sks.end(),
- mem_fn(&Subkey::isCardKey)) != sks.end() ;
+ mem_fn(&Subkey::isCardKey)) != sks.end();
}
bool KeyFilterImplBase::matches(const Key &key, MatchContexts contexts) const
diff --git a/libkleo/src/kleo/keyfiltermanager.cpp b/libkleo/src/kleo/keyfiltermanager.cpp
index 6f0c745..e0a472e 100644
--- a/libkleo/src/kleo/keyfiltermanager.cpp
+++ b/libkleo/src/kleo/keyfiltermanager.cpp
@@ -233,7 +233,7 @@ void KeyFilterManager::reload()
if (KConfig *config = CryptoBackendFactory::instance()->configObject()) {
const QStringList groups = config->groupList().filter(QRegExp(QStringLiteral("^Key Filter #\\d+$")));
- for (QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it) {
+ for (QStringList::const_iterator it = groups.begin(); it != groups.end(); ++it) {
const KConfigGroup cfg(config, *it);
d->filters.push_back(shared_ptr<KeyFilter>(new KConfigBasedKeyFilter(cfg)));
}
@@ -365,6 +365,6 @@ QColor KeyFilterManager::fgColor(const Key &key) const
QIcon KeyFilterManager::icon(const Key &key) const
{
const QString icon = get_string(d->filters, key, &KeyFilter::icon);
- return icon.isEmpty() ? QIcon() : QIcon::fromTheme(icon) ;
+ return icon.isEmpty() ? QIcon() : QIcon::fromTheme(icon);
}
diff --git a/libkleo/src/kleo/predicates.h b/libkleo/src/kleo/predicates.h
index f287b16..cb4496a 100644
--- a/libkleo/src/kleo/predicates.h
+++ b/libkleo/src/kleo/predicates.h
@@ -53,7 +53,7 @@ namespace _detail
inline int mystrcmp(const char *s1, const char *s2)
{
using namespace std;
- return s1 ? s2 ? strcmp(s1, s2) : 1 : s2 ? -1 : 0 ;
+ return s1 ? s2 ? strcmp(s1, s2) : 1 : s2 ? -1 : 0;
}
#define make_comparator_str_impl( Name, expr, cmp ) \
diff --git a/libkleo/src/kleo/stl_util.h b/libkleo/src/kleo/stl_util.h
index 3d703f7..388d5bb 100644
--- a/libkleo/src/kleo/stl_util.h
+++ b/libkleo/src/kleo/stl_util.h
@@ -70,7 +70,7 @@ struct select1st;
template <typename U, typename V>
struct select1st< std::pair<U, V> >
- : std::unary_function<std::pair<U, V>, U> {
+ : std::unary_function<std::pair<U, V>, U> {
typename boost::call_traits<U>::param_type
operator()(const std::pair<U, V> &pair) const
{
@@ -83,7 +83,7 @@ struct select2nd;
template <typename U, typename V>
struct select2nd< std::pair<U, V> >
- : std::unary_function<std::pair<U, V>, V> {
+ : std::unary_function<std::pair<U, V>, V> {
typename boost::call_traits<V>::param_type
operator()(const std::pair<U, V> &pair) const
{
@@ -398,7 +398,7 @@ find_if(const C &c, P p)
template <typename C, typename V>
bool contains(const C &c, const V &v)
{
- return find(c, v) != boost::end(c) ;
+ return find(c, v) != boost::end(c);
}
template <typename C, typename P>
diff --git a/libkleo/src/tests/test_cryptoconfig.cpp b/libkleo/src/tests/test_cryptoconfig.cpp
index 8773f34..64a31c8 100644
--- a/libkleo/src/tests/test_cryptoconfig.cpp
+++ b/libkleo/src/tests/test_cryptoconfig.cpp
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
QList<QUrl> urls = entry->urlValueList();
cout << " url values ";
Q_FOREACH (const QUrl &url, urls) {
- cout << url.toString().toLocal8Bit().constData() << " ";
+ cout << url.toString().toLocal8Bit().constData() << " ";
}
cout << endl;
}
@@ -328,7 +328,7 @@ int main(int argc, char **argv)
QList<QUrl> val = entry->urlValueList();
cout << "URL list initially: ";
Q_FOREACH (const QUrl &url, val) {
- cout << url.toString().toLocal8Bit().constData() << ", ";
+ cout << url.toString().toLocal8Bit().constData() << ", ";
}
cout << endl;
@@ -359,7 +359,7 @@ int main(int argc, char **argv)
QList<QUrl> newlst = entry->urlValueList();
cout << "URL list now: ";
Q_FOREACH (const QUrl &url, newlst) {
- cout << url.toString().toLocal8Bit().constData() << endl;
+ cout << url.toString().toLocal8Bit().constData() << endl;
}
cout << endl;
assert(newlst.count() == 3);
@@ -374,7 +374,7 @@ int main(int argc, char **argv)
cout << "URL list reset to initial: ";
Q_FOREACH (const QUrl &url, newlst) {
- cout << url.toString().toLocal8Bit().constData() << ", ";
+ cout << url.toString().toLocal8Bit().constData() << ", ";
}
cout << endl;
} else {
diff --git a/libkleo/src/tests/test_gnupgprocessbase.cpp b/libkleo/src/tests/test_gnupgprocessbase.cpp
index 186538b..d8b0ab6 100644
--- a/libkleo/src/tests/test_gnupgprocessbase.cpp
+++ b/libkleo/src/tests/test_gnupgprocessbase.cpp
@@ -100,7 +100,7 @@ void GnuPGViewer::slotStdout()
{
QString line = mProcess-> readAllStandardOutput();
const QStringList l = split(line, mLastStdout);
- for (QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it) {
+ for (QStringList::const_iterator it = l.begin(); it != l.end(); ++it) {
append("stdout: " + escape(*it));
}
}
@@ -109,7 +109,7 @@ void GnuPGViewer::slotStderr()
{
QString line = mProcess->readAllStandardError();
const QStringList l = split(line, mLastStderr);
- for (QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it) {
+ for (QStringList::const_iterator it = l.begin(); it != l.end(); ++it) {
append("<b>stderr: " + escape(*it) + "</b>");
}
}
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
aboutData.processCommandLine(&parser);
Kleo::GnuPGProcessBase gpg;
- for (int i = 1 ; i < argc ; ++i) {
+ for (int i = 1; i < argc; ++i) {
gpg << argv[i];
}
diff --git a/libkleo/src/tests/test_jobs.cpp b/libkleo/src/tests/test_jobs.cpp
index 6e0241a..25be775 100644
--- a/libkleo/src/tests/test_jobs.cpp
+++ b/libkleo/src/tests/test_jobs.cpp
@@ -50,7 +50,7 @@ static const char *protocol = 0;
static void testSign()
{
- const Kleo::CryptoBackend::Protocol *proto = !strcmp(protocol, "openpgp") ? Kleo::CryptoBackendFactory::instance()->openpgp() : Kleo::CryptoBackendFactory::instance()->smime() ;
+ const Kleo::CryptoBackend::Protocol *proto = !strcmp(protocol, "openpgp") ? Kleo::CryptoBackendFactory::instance()->openpgp() : Kleo::CryptoBackendFactory::instance()->smime();
assert(proto);
qDebug() << "Using protocol" << proto->name();
diff --git a/libkleo/src/tests/test_keygen.cpp b/libkleo/src/tests/test_keygen.cpp
index d9393ae..40e2e96 100644
--- a/libkleo/src/tests/test_keygen.cpp
+++ b/libkleo/src/tests/test_keygen.cpp
@@ -94,7 +94,7 @@ KeyGenerator::KeyGenerator(QWidget *parent)
++row;
glay->addWidget(new QLabel("<GnupgKeyParms format=\"internal\">", w),
row, 0, 1, 2);
- for (int i = 0 ; i < numKeyParams ; ++i) {
+ for (int i = 0; i < numKeyParams; ++i) {
++row;
glay->addWidget(new QLabel(keyParams[i], w), row, 0);
glay->addWidget(mLineEdits[i] = new QLineEdit(w), row, 1);
@@ -114,7 +114,7 @@ KeyGenerator::~KeyGenerator() {}
void KeyGenerator::slotStartKeyGeneration()
{
QString params = "<GnupgKeyParms format=\"internal\">\n";
- for (int i = 0 ; i < numKeyParams ; ++i)
+ for (int i = 0; i < numKeyParams; ++i)
if (mLineEdits[i] && !mLineEdits[i]->text().trimmed().isEmpty()) {
params += keyParams[i] + (": " + mLineEdits[i]->text().trimmed()) + '\n';
}
@@ -122,7 +122,7 @@ void KeyGenerator::slotStartKeyGeneration()
const Kleo::CryptoBackend::Protocol *proto = 0;
if (protocol) {
- proto = !strcmp(protocol, "openpgp") ? Kleo::CryptoBackendFactory::instance()->openpgp() : Kleo::CryptoBackendFactory::instance()->smime() ;
+ proto = !strcmp(protocol, "openpgp") ? Kleo::CryptoBackendFactory::instance()->openpgp() : Kleo::CryptoBackendFactory::instance()->smime();
}
if (!proto) {
proto = Kleo::CryptoBackendFactory::instance()->smime();
diff --git a/libkleo/src/tests/test_keyselectiondialog.cpp b/libkleo/src/tests/test_keyselectiondialog.cpp
index de6ea27..032dafb 100644
--- a/libkleo/src/tests/test_keyselectiondialog.cpp
+++ b/libkleo/src/tests/test_keyselectiondialog.cpp
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
if (dlg.exec() == QDialog::Accepted) {
qDebug() << "accepted; selected key:" << (dlg.selectedKey().userID(0).id() ? dlg.selectedKey().userID(0).id() : "<null>") << "\nselected _keys_:";
- for (std::vector<GpgME::Key>::const_iterator it = dlg.selectedKeys().begin() ; it != dlg.selectedKeys().end() ; ++it) {
+ for (std::vector<GpgME::Key>::const_iterator it = dlg.selectedKeys().begin(); it != dlg.selectedKeys().end(); ++it) {
qDebug() << (it->userID(0).id() ? it->userID(0).id() : "<null>");
}
} else {
diff --git a/libkleo/src/ui/auditlogviewer.cpp b/libkleo/src/ui/auditlogviewer.cpp
index 8e2ad08..8023d6f 100644
--- a/libkleo/src/ui/auditlogviewer.cpp
+++ b/libkleo/src/ui/auditlogviewer.cpp
@@ -42,20 +42,20 @@ AuditLogViewer::AuditLogViewer(const QString &log, QWidget *parent)
setWindowTitle(i18n("View GnuPG Audit Log"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
buttonBox->button(QDialogButtonBox::Close)->setIcon(KIconLoader::global()->loadIcon(
- QStringLiteral("dialog-close"),
- KIconLoader::Small));
+ QStringLiteral("dialog-close"),
+ KIconLoader::Small));
QPushButton *copyClipBtn = new QPushButton;
copyClipBtn->setText(i18n("&Copy to Clipboard"));
copyClipBtn->setIcon(KIconLoader::global()->loadIcon(QStringLiteral("edit-copy"),
- KIconLoader::Small));
+ KIconLoader::Small));
buttonBox->addButton(copyClipBtn, QDialogButtonBox::ActionRole);
connect(copyClipBtn, &QPushButton::clicked, this, &AuditLogViewer::slotCopyClip);
QPushButton *saveAsBtn = new QPushButton;
saveAsBtn->setText(i18n("&Save to Disk..."));
saveAsBtn->setIcon(KIconLoader::global()->loadIcon(QStringLiteral("document-save-as"),
- KIconLoader::Small));
+ KIconLoader::Small));
buttonBox->addButton(saveAsBtn, QDialogButtonBox::ActionRole);
connect(saveAsBtn, &QPushButton::clicked, this, &AuditLogViewer::slotSaveAs);
diff --git a/libkleo/src/ui/cryptoconfigmodule.cpp b/libkleo/src/ui/cryptoconfigmodule.cpp
index c4d249e..6a2d6ec 100644
--- a/libkleo/src/ui/cryptoconfigmodule.cpp
+++ b/libkleo/src/ui/cryptoconfigmodule.cpp
@@ -95,7 +95,7 @@ static unsigned int num_components_with_options(const Kleo::CryptoConfig *config
}
const QStringList components = config->componentList();
unsigned int result = 0;
- for (QStringList::const_iterator it = components.begin() ; it != components.end() ; ++it)
+ for (QStringList::const_iterator it = components.begin(); it != components.end(); ++it)
if (const Kleo::CryptoConfigComponent *const comp = config->component(*it))
if (!comp->groupList().empty()) {
++result;
@@ -113,7 +113,7 @@ static KPageView::FaceType determineJanusFace(const Kleo::CryptoConfig *config,
return
layout == CryptoConfigModule::LinearizedLayout ? KPageView::Plain :
layout == CryptoConfigModule::TabbedLayout ? KPageView::Tabbed :
- /* else */ KPageView::List ;
+ /* else */ KPageView::List;
}
Kleo::CryptoConfigModule::CryptoConfigModule(Kleo::CryptoConfig *config, QWidget *parent)
@@ -278,7 +278,7 @@ Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI(
const QStringList groups = mComponent->groupList();
if (groups.size() > 1) {
glay->setColumnMinimumWidth(0, KDHorizontalLine::indentHint());
- for (QStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it) {
+ for (QStringList::const_iterator it = groups.begin(), end = groups.end(); it != end; ++it) {
Kleo::CryptoConfigGroup *group = mComponent->group(*it);
Q_ASSERT(group);
if (!group) {
@@ -333,7 +333,7 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
{
const int startRow = glay->rowCount();
const QStringList entries = mGroup->entryList();
- for (QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it) {
+ for (QStringList::const_iterator it = entries.begin(), end = entries.end(); it != end; ++it) {
Kleo::CryptoConfigEntry *entry = group->entry(*it);
Q_ASSERT(entry);
if (entry->level() > CryptoConfigEntry::Level_Advanced) {
@@ -443,7 +443,7 @@ CryptoConfigEntryGUI *Kleo::CryptoConfigEntryGUIFactory::createEntryGUI(CryptoCo
// try to lookup by path:
const QString path = entry->path();
- for (unsigned int i = 0 ; i < numWidgetsByEntryName ; ++i)
+ for (unsigned int i = 0; i < numWidgetsByEntryName; ++i)
if (QRegExp(QLatin1String(widgetsByEntryName[i].entryGlob), Qt::CaseSensitive, QRegExp::Wildcard).exactMatch(path)) {
return widgetsByEntryName[i].create(module, entry, entryName, glay, widget);
}
@@ -555,7 +555,7 @@ Kleo::CryptoConfigEntryDebugLevel::CryptoConfigEntryDebugLevel(CryptoConfigModul
QLabel *label = new QLabel(i18n("Set the debugging level to"), widget);
label->setBuddy(mComboBox);
- for (unsigned int i = 0 ; i < numDebugLevels ; ++i) {
+ for (unsigned int i = 0; i < numDebugLevels; ++i) {
mComboBox->addItem(i18n(debugLevels[i].label));
}
@@ -584,7 +584,7 @@ void Kleo::CryptoConfigEntryDebugLevel::doSave()
void Kleo::CryptoConfigEntryDebugLevel::doLoad()
{
const QString str = mEntry->stringValue();
- for (unsigned int i = 0 ; i < numDebugLevels ; ++i)
+ for (unsigned int i = 0; i < numDebugLevels; ++i)
if (str == QLatin1String(debugLevels[i].name)) {
mComboBox->setCurrentIndex(i);
return;
@@ -925,9 +925,9 @@ QString Kleo::assembleKeyserver(const ParsedKeyserver &keyserver)
typedef QPair<QString, QString> Pair;
Q_FOREACH (const Pair &pair, keyserver.options)
if (pair.second.isNull()) {
- result += QLatin1Char(' ') + pair.first ;
+ result += QLatin1Char(' ') + pair.first;
} else {
- result += QLatin1Char(' ') + pair.first + QLatin1Char('=') + pair.second ;
+ result += QLatin1Char(' ') + pair.first + QLatin1Char('=') + pair.second;
}
return result;
}
@@ -956,7 +956,7 @@ static QList<QUrl> string2urls(const QString &str)
static QString urls2string(const QList<QUrl> &urls)
{
- return urls.empty() ? QString() : urls.front().url() ;
+ return urls.empty() ? QString() : urls.front().url();
}
void Kleo::CryptoConfigEntryKeyserver::slotOpenDialog()
diff --git a/libkleo/src/ui/directoryserviceswidget.cpp b/libkleo/src/ui/directoryserviceswidget.cpp
index a55d725..b100ae5 100644
--- a/libkleo/src/ui/directoryserviceswidget.cpp
+++ b/libkleo/src/ui/directoryserviceswidget.cpp
@@ -94,11 +94,11 @@ static const struct {
{ I18N_NOOP("ldap"), 389, DirectoryServicesWidget::LDAP },
{ I18N_NOOP("ldaps"), 636, DirectoryServicesWidget::LDAP },
};
-static const unsigned int numProtocols = sizeof protocols / sizeof *protocols;
+static const unsigned int numProtocols = sizeof protocols / sizeof * protocols;
static unsigned short default_port(const QString &scheme)
{
- for (unsigned int i = 0 ; i < numProtocols ; ++i)
+ for (unsigned int i = 0; i < numProtocols; ++i)
if (QString::compare(scheme, QLatin1String(protocols[i].label), Qt::CaseInsensitive) == 0) {
return protocols[i].port;
}
@@ -135,7 +135,7 @@ static unsigned short display_port(const QUrl &url)
static bool is_default_port(const QUrl &url)
{
- return display_port(url) == default_port(display_scheme(url)) ;
+ return display_port(url) == default_port(display_scheme(url));
}
static QRect calculate_geometry(const QRect &cell, const QSize &sizeHint)
@@ -179,7 +179,7 @@ public:
return;
}
m_openPGPReadOnly = ro;
- for (unsigned int row = 0, end = rowCount() ; row != end ; ++row)
+ for (unsigned int row = 0, end = rowCount(); row != end; ++row)
if (isOpenPGPService(row)) {
Q_EMIT dataChanged(index(row, 0), index(row, NumColumns));
}
@@ -191,7 +191,7 @@ public:
return;
}
m_x509ReadOnly = ro;
- for (unsigned int row = 0, end = rowCount() ; row != end ; ++row)
+ for (unsigned int row = 0, end = rowCount(); row != end; ++row)
if (isX509Service(row)) {
Q_EMIT dataChanged(index(row, 0), index(row, NumColumns));
}
@@ -207,13 +207,13 @@ public:
}
QModelIndex addService(const QUrl &url, bool x509, bool pgp, bool force)
{
- const std::vector<Item>::iterator it = force ? m_items.end() : findExistingUrl(url) ;
+ const std::vector<Item>::iterator it = force ? m_items.end() : findExistingUrl(url);
unsigned int row;
if (it != m_items.end()) {
// existing item:
it->x509 |= x509;
it->pgp |= pgp;
- row = it - m_items.begin() ;
+ row = it - m_items.begin();
Q_EMIT dataChanged(index(row, std::min(X509, OpenPGP)), index(row, std::max(X509, OpenPGP)));
} else {
// append new item
@@ -236,11 +236,11 @@ public:
}
bool isX509Service(unsigned int row) const
{
- return row < m_items.size() && m_items[row].x509 && isLdapRow(row) ;
+ return row < m_items.size() && m_items[row].x509 && isLdapRow(row);
}
QUrl service(unsigned int row) const
{
- return row < m_items.size() ? m_items[row].url : QUrl() ;
+ return row < m_items.size() ? m_items[row].url : QUrl();
}
bool isReadOnlyRow(unsigned int row) const
@@ -424,7 +424,7 @@ private:
return 0;
}
QComboBox *cb = new QComboBox(parent);
- for (unsigned int i = 0 ; i < numProtocols ; ++i)
+ for (unsigned int i = 0; i < numProtocols; ++i)
if (m_schemes & protocols[i].base) {
cb->addItem(i18n(protocols[i].label), QLatin1String(protocols[i].label));
}
@@ -554,15 +554,15 @@ private:
int currentRow() const
{
const QModelIndex idx = ui.treeView->selectionModel()->currentIndex();
- return idx.isValid() ? idx.row() : -1 ;
+ return idx.isValid() ? idx.row() : -1;
}
void showHideColumns();
void enableDisableActions()
{
- const bool x509 = (protocols & X509Protocol) && !(readOnlyProtocols & X509Protocol) ;
- const bool pgp = (protocols & OpenPGPProtocol) && !(readOnlyProtocols & OpenPGPProtocol) ;
+ const bool x509 = (protocols & X509Protocol) && !(readOnlyProtocols & X509Protocol);
+ const bool pgp = (protocols & OpenPGPProtocol) && !(readOnlyProtocols & OpenPGPProtocol);
ui.newX509Action.setEnabled(x509);
ui.newOpenPGPAction.setEnabled(pgp);
if (x509 && pgp) {
@@ -674,7 +674,7 @@ void DirectoryServicesWidget::addOpenPGPServices(const QList<QUrl> &urls)
QList<QUrl> DirectoryServicesWidget::openPGPServices() const
{
QList<QUrl> result;
- for (unsigned int i = 0, end = d->model.numServices() ; i != end ; ++i)
+ for (unsigned int i = 0, end = d->model.numServices(); i != end; ++i)
if (d->model.isOpenPGPService(i)) {
result.push_back(d->model.service(i));
}
@@ -691,7 +691,7 @@ void DirectoryServicesWidget::addX509Services(const QList<QUrl> &urls)
QList<QUrl> DirectoryServicesWidget::x509Services() const
{
QList<QUrl> result;
- for (unsigned int i = 0, end = d->model.numServices() ; i != end ; ++i)
+ for (unsigned int i = 0, end = d->model.numServices(); i != end; ++i)
if (d->model.isX509Service(i)) {
result.push_back(d->model.service(i));
}
@@ -789,9 +789,9 @@ QVariant Model::data(const QModelIndex &index, int role) const
case Qt::CheckStateRole:
switch (index.column()) {
case X509:
- return m_items[row].x509 && isLdapRow(row) ? Qt::Checked : Qt::Unchecked ;
+ return m_items[row].x509 && isLdapRow(row) ? Qt::Checked : Qt::Unchecked;
case OpenPGP:
- return m_items[row].pgp ? Qt::Checked : Qt::Unchecked ;
+ return m_items[row].pgp ? Qt::Checked : Qt::Unchecked;
default:
return QVariant();
}
@@ -812,7 +812,7 @@ Qt::ItemFlags Model::flags(const QModelIndex &index) const
const unsigned int row = index.row();
Qt::ItemFlags flags = QAbstractTableModel::flags(index);
if (isReadOnlyRow(row)) {
- flags &= ~Qt::ItemIsSelectable ;
+ flags &= ~Qt::ItemIsSelectable;
}
if (index.isValid() && row < m_items.size())
switch (index.column()) {
@@ -820,7 +820,7 @@ Qt::ItemFlags Model::flags(const QModelIndex &index) const
switch (m_schemes) {
default:
if (!isReadOnlyRow(row)) {
- return flags | Qt::ItemIsEditable ;
+ return flags | Qt::ItemIsEditable;
}
// else fall through
case DirectoryServicesWidget::HKP:
@@ -828,38 +828,38 @@ Qt::ItemFlags Model::flags(const QModelIndex &index) const
case DirectoryServicesWidget::FTP:
case DirectoryServicesWidget::LDAP:
// only one scheme allowed -> no editing possible
- return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled);
}
case Host:
case Port:
if (isReadOnlyRow(row)) {
- return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled);
} else {
- return flags | Qt::ItemIsEditable ;
+ return flags | Qt::ItemIsEditable;
}
case BaseDN:
if (isLdapRow(row) && !isReadOnlyRow(row)) {
- return flags | Qt::ItemIsEditable ;
+ return flags | Qt::ItemIsEditable;
} else {
- return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled);
}
case UserName:
case Password:
if (isReadOnlyRow(row)) {
- return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsEditable | Qt::ItemIsEnabled);
} else {
- return flags | Qt::ItemIsEditable ;
+ return flags | Qt::ItemIsEditable;
}
case X509:
if (!isLdapRow(row)) {
- return flags & ~(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
}
// fall through
case OpenPGP:
if (isReadOnlyRow(row)) {
- return flags & ~(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled) ;
+ return flags & ~(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
} else {
- return flags | Qt::ItemIsUserCheckable ;
+ return flags | Qt::ItemIsUserCheckable;
}
}
return flags;
@@ -925,10 +925,10 @@ bool Model::doSetData(unsigned int row, unsigned int column, const QVariant &val
if (role == Qt::CheckStateRole)
switch (column) {
case X509:
- m_items[row].x509 = value.toInt() == Qt::Checked ;
+ m_items[row].x509 = value.toInt() == Qt::Checked;
return true;
case OpenPGP: {
- const bool on = value.toInt() == Qt::Checked ;
+ const bool on = value.toInt() == Qt::Checked;
if (on) {
setExclusivePgpFlag(row);
} else {
@@ -946,7 +946,7 @@ void Model::setExclusivePgpFlag(unsigned int row)
return;
}
m_items[row].pgp = true; // dataChanged() for this one is supposed to be emitted by the caller
- for (unsigned int i = 0, end = m_items.size() ; i < end ; ++i)
+ for (unsigned int i = 0, end = m_items.size(); i < end; ++i)
if (i != row)
if (m_items[i].pgp) {
m_items[i].pgp = false;
diff --git a/libkleo/src/ui/dnattributeorderconfigwidget.cpp b/libkleo/src/ui/dnattributeorderconfigwidget.cpp
index 26f38ec..0f2e850 100644
--- a/libkleo/src/ui/dnattributeorderconfigwidget.cpp
+++ b/libkleo/src/ui/dnattributeorderconfigwidget.cpp
@@ -136,7 +136,7 @@ Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget(DNAttributeMapp
{ "go-bottom", 4, 1, I18N_NOOP("Move to bottom"), SLOT(slotDoubleDownButtonClicked()), false }
};
- for (unsigned int i = 0 ; i < sizeof navButtons / sizeof * navButtons ; ++i) {
+ for (unsigned int i = 0; i < sizeof navButtons / sizeof * navButtons; ++i) {
QToolButton *tb = d->navTB[i] = new QToolButton(this);
tb->setIcon(QIcon::fromTheme(QLatin1String(navButtons[i].icon)));
tb->setEnabled(false);
@@ -167,7 +167,7 @@ void Kleo::DNAttributeOrderConfigWidget::load()
// fill the RHS listview:
QTreeWidgetItem *last = 0;
- for (QStringList::const_iterator it = order.begin() ; it != order.end() ; ++it) {
+ for (QStringList::const_iterator it = order.begin(); it != order.end(); ++it) {
const QString attr = (*it).toUpper();
if (attr == QLatin1String("_X_")) {
takePlaceHolderItem();
@@ -184,7 +184,7 @@ void Kleo::DNAttributeOrderConfigWidget::load()
const QStringList all = Kleo::DNAttributeMapper::instance()->names();
const QStringList::const_iterator end(all.end());
- for (QStringList::const_iterator it = all.begin() ; it != end ; ++it) {
+ for (QStringList::const_iterator it = all.begin(); it != end; ++it) {
if (!order.contains(*it)) {
QTreeWidgetItem *item = new QTreeWidgetItem(d->availableLV);
item->setText(0, *it);
@@ -211,7 +211,7 @@ void Kleo::DNAttributeOrderConfigWidget::save() const
{
#ifndef QT_NO_TREEWIDGET
QStringList order;
- for (QTreeWidgetItemIterator it(d->currentLV) ; (*it) ; ++it) {
+ for (QTreeWidgetItemIterator it(d->currentLV); (*it); ++it) {
order.push_back((*it)->text(0));
}
diff --git a/libkleo/src/ui/keyapprovaldialog.cpp b/libkleo/src/ui/keyapprovaldialog.cpp
index 4fe774a..c36fcef 100644
--- a/libkleo/src/ui/keyapprovaldialog.cpp
+++ b/libkleo/src/ui/keyapprovaldialog.cpp
@@ -155,7 +155,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog(const std::vector<Item> &recipients,
const QStringList prefs = preferencesStrings();
- for (std::vector<Item>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it) {
+ for (std::vector<Item>::const_iterator it = recipients.begin(); it != recipients.end(); ++it) {
++row;
glay->addWidget(new QLabel(i18n("Recipient:"), view), row, 0);
glay->addWidget(new QLabel(it->address, view), row, 1);
@@ -194,7 +194,7 @@ Kleo::KeyApprovalDialog::~KeyApprovalDialog()
std::vector<GpgME::Key> Kleo::KeyApprovalDialog::senderKeys() const
{
- return d->selfRequester ? d->selfRequester->keys() : std::vector<GpgME::Key>() ;
+ return d->selfRequester ? d->selfRequester->keys() : std::vector<GpgME::Key>();
}
std::vector<Kleo::KeyApprovalDialog::Item> Kleo::KeyApprovalDialog::items() const
diff --git a/libkleo/src/ui/keylistview.cpp b/libkleo/src/ui/keylistview.cpp
index 1a3b601..e9cd0b7 100644
--- a/libkleo/src/ui/keylistview.cpp
+++ b/libkleo/src/ui/keylistview.cpp
@@ -100,7 +100,7 @@ Kleo::KeyListView::KeyListView(const ColumnStrategy *columnStrategy, const Displ
const QFontMetrics fm = fontMetrics();
- for (int col = 0 ; !columnStrategy->title(col).isEmpty() ; ++col) {
+ for (int col = 0; !columnStrategy->title(col).isEmpty(); ++col) {
headerItem()->setText(col, columnStrategy->title(col));
header()->resizeSection(col, columnStrategy->width(col, fm));
header()->setResizeMode(col, columnStrategy->resizeMode(col));
@@ -108,7 +108,7 @@ Kleo::KeyListView::KeyListView(const ColumnStrategy *columnStrategy, const Displ
setAllColumnsShowFocus(true);
- for (int i = 0 ; i < numSignalReplacements ; ++i) {
+ for (int i = 0; i < numSignalReplacements; ++i) {
connect(this, signalReplacements[i].source, signalReplacements[i].target);
}
@@ -177,12 +177,12 @@ void Kleo::KeyListView::slotUpdateTimeout()
qCDebug(KLEO_UI_LOG) << "Kleo::KeyListView::slotUpdateTimeout(): processing"
<< d->keyBuffer.size() << "items en block";
if (hierarchical()) {
- for (std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin() ; it != d->keyBuffer.end() ; ++it) {
+ for (std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin(); it != d->keyBuffer.end(); ++it) {
doHierarchicalInsert(*it);
}
gatherScattered();
} else {
- for (std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin() ; it != d->keyBuffer.end() ; ++it) {
+ for (std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin(); it != d->keyBuffer.end(); ++it) {
(void)new KeyListViewItem(this, *it);
}
}
@@ -416,13 +416,13 @@ void Kleo::KeyListViewItem::setKey(const GpgME::Key &key)
// the ColumnStrategy operations might be very slow, so cache their
// result here, where we're non-const :)
- const Kleo::KeyListView::ColumnStrategy *cs = lv ? lv->columnStrategy() : 0 ;
+ const Kleo::KeyListView::ColumnStrategy *cs = lv ? lv->columnStrategy() : 0;
if (!cs) {
return;
}
- const KeyListView::DisplayStrategy *ds = lv ? lv->displayStrategy() : 0 ;
- const int numCols = lv ? lv->columnCount() : 0 ;
- for (int i = 0 ; i < numCols ; ++i) {
+ const KeyListView::DisplayStrategy *ds = lv ? lv->displayStrategy() : 0;
+ const int numCols = lv ? lv->columnCount() : 0;
+ for (int i = 0; i < numCols; ++i) {
setText(i, cs->text(key, i));
setToolTip(i, cs->toolTip(key, i));
const QIcon icon = cs->icon(key, i);
@@ -441,7 +441,7 @@ QString Kleo::KeyListViewItem::toolTip(int col) const
{
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->toolTip(key(), col)
- : QString() ;
+ : QString();
}
bool Kleo::KeyListViewItem::operator<(const QTreeWidgetItem &other) const
diff --git a/libkleo/src/ui/keylistview.h b/libkleo/src/ui/keylistview.h
index 4d8ca2e..5b8ab53 100644
--- a/libkleo/src/ui/keylistview.h
+++ b/libkleo/src/ui/keylistview.h
@@ -54,14 +54,14 @@ TEMPLATE_TYPENAME(T)
inline T *lvi_cast(QTreeWidgetItem *item)
{
return item && (item->type() == T::RTTI)
- ? static_cast<T *>(item) : 0 ;
+ ? static_cast<T *>(item) : 0;
}
TEMPLATE_TYPENAME(T)
inline const T *lvi_cast(const QTreeWidgetItem *item)
{
return item && (item->type() == T::RTTI)
- ? static_cast<const T *>(item) : 0 ;
+ ? static_cast<const T *>(item) : 0;
}
#undef TEMPLATE_TYPENAME
diff --git a/libkleo/src/ui/keyrequester.cpp b/libkleo/src/ui/keyrequester.cpp
index bdb8991..b5102b7 100644
--- a/libkleo/src/ui/keyrequester.cpp
+++ b/libkleo/src/ui/keyrequester.cpp
@@ -157,7 +157,7 @@ const GpgME::Key &Kleo::KeyRequester::key() const
void Kleo::KeyRequester::setKeys(const std::vector<GpgME::Key> &keys)
{
mKeys.clear();
- for (std::vector<GpgME::Key>::const_iterator it = keys.begin() ; it != keys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = keys.begin(); it != keys.end(); ++it)
if (!it->isNull()) {
mKeys.push_back(*it);
}
@@ -185,7 +185,7 @@ QString Kleo::KeyRequester::fingerprint() const
QStringList Kleo::KeyRequester::fingerprints() const
{
QStringList result;
- for (std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = mKeys.begin(); it != mKeys.end(); ++it)
if (!it->isNull())
if (const char *fpr = it->primaryFingerprint()) {
result.push_back(QLatin1String(fpr));
@@ -215,7 +215,7 @@ void Kleo::KeyRequester::updateKeys()
QStringList labelTexts;
QString toolTipText;
- for (std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it) {
+ for (std::vector<GpgME::Key>::const_iterator it = mKeys.begin(); it != mKeys.end(); ++it) {
if (it->isNull()) {
continue;
}
@@ -245,7 +245,7 @@ static void showKeyListError(QWidget *parent, const GpgME::Error &err)
assert(err);
const QString msg = i18n("<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
- "<p><b>%1</b></p></qt>" ,
+ "<p><b>%1</b></p></qt>",
QString::fromLocal8Bit(err.asString()));
KMessageBox::error(parent, msg, i18n("Key Listing Failed"));
@@ -262,7 +262,7 @@ void Kleo::KeyRequester::startKeyListJob(const QStringList &fingerprints)
mJobs = 0;
unsigned int count = 0;
- for (QStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it)
+ for (QStringList::const_iterator it = fingerprints.begin(); it != fingerprints.end(); ++it)
if (!(*it).trimmed().isEmpty()) {
++count;
}
@@ -352,7 +352,7 @@ void Kleo::KeyRequester::slotDialogButtonClicked()
{
KeySelectionDialog *dlg = mKeys.empty()
? new KeySelectionDialog(mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, this)
- : new KeySelectionDialog(mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this) ;
+ : new KeySelectionDialog(mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this);
if (dlg->exec() == QDialog::Accepted) {
if (mMulti) {
@@ -475,7 +475,7 @@ static inline unsigned int signingKeyUsage(bool openpgp, bool smime, bool truste
Kleo::EncryptionKeyRequester::EncryptionKeyRequester(bool multi, unsigned int proto,
QWidget *parent,
bool onlyTrusted, bool onlyValid)
- : KeyRequester(encryptionKeyUsage(proto &OpenPGP, proto &SMIME, onlyTrusted, onlyValid), multi,
+ : KeyRequester(encryptionKeyUsage(proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid), multi,
parent), d(0)
{
}
@@ -495,7 +495,7 @@ void Kleo::EncryptionKeyRequester::setAllowedKeys(unsigned int proto, bool onlyT
Kleo::SigningKeyRequester::SigningKeyRequester(bool multi, unsigned int proto,
QWidget *parent,
bool onlyTrusted, bool onlyValid)
- : KeyRequester(signingKeyUsage(proto &OpenPGP, proto &SMIME, onlyTrusted, onlyValid), multi,
+ : KeyRequester(signingKeyUsage(proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid), multi,
parent), d(0)
{
}
diff --git a/libkleo/src/ui/keyselectiondialog.cpp b/libkleo/src/ui/keyselectiondialog.cpp
index 22bfa2d..973e864 100644
--- a/libkleo/src/ui/keyselectiondialog.cpp
+++ b/libkleo/src/ui/keyselectiondialog.cpp
@@ -142,7 +142,7 @@ static bool checkKeyUsage(const GpgME::Key &key, unsigned int keyUsage)
// Seems validity isn't checked for secret keylistings...
!key.hasSecret()) {
std::vector<GpgME::UserID> uids = key.userIDs();
- for (std::vector<GpgME::UserID>::const_iterator it = uids.begin() ; it != uids.end() ; ++it)
+ for (std::vector<GpgME::UserID>::const_iterator it = uids.begin(); it != uids.end(); ++it)
if (!it->isRevoked() && it->validity() >= GpgME::UserID::Marginal) {
return true;
}
@@ -157,7 +157,7 @@ static bool checkKeyUsage(const GpgME::Key &key, unsigned int keyUsage)
static bool checkKeyUsage(const std::vector<GpgME::Key> &keys, unsigned int keyUsage)
{
- for (std::vector<GpgME::Key>::const_iterator it = keys.begin() ; it != keys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = keys.begin(); it != keys.end(); ++it)
if (!checkKeyUsage(*it, keyUsage)) {
return false;
}
@@ -223,7 +223,7 @@ int ColumnStrategy::width(int col, const QFontMetrics &fm) const
if (col == 0) {
static const char hexchars[] = "0123456789ABCDEF";
int maxWidth = 0;
- for (unsigned int i = 0 ; i < 16 ; ++i) {
+ for (unsigned int i = 0; i < 16; ++i) {
maxWidth = qMax(fm.width(QLatin1Char(hexchars[i])), maxWidth);
}
return 8 * maxWidth + 2 * KIconLoader::SizeSmall;
@@ -245,7 +245,7 @@ QString ColumnStrategy::text(const GpgME::Key &key, int col) const
case 1: {
const char *uid = key.userID(0).id();
if (key.protocol() == GpgME::OpenPGP) {
- return uid && *uid ? QString::fromUtf8(uid) : QString() ;
+ return uid && *uid ? QString::fromUtf8(uid) : QString();
} else { // CMS
return Kleo::DN(uid).prettyDN();
}
@@ -261,7 +261,7 @@ QString ColumnStrategy::toolTip(const GpgME::Key &key, int) const
const char *fpr = key.primaryFingerprint();
const char *issuer = key.issuerName();
const GpgME::Subkey subkey = key.subkey(0);
- const QString expiry = subkey.neverExpires() ? i18n("never") : time_t2string(subkey.expirationTime()) ;
+ const QString expiry = subkey.neverExpires() ? i18n("never") : time_t2string(subkey.expirationTime());
const QString creation = time_t2string(subkey.creationTime());
if (key.protocol() == GpgME::OpenPGP)
return i18n("OpenPGP key for %1\n"
@@ -444,7 +444,7 @@ void Kleo::KeySelectionDialog::init(bool rememberChoice, bool extendedSelection,
le->setClearButtonEnabled(true);
le->setText(initialQuery);
- QLabel *lbSearchFor = new QLabel(i18n("&Search for:"), page) ;
+ QLabel *lbSearchFor = new QLabel(i18n("&Search for:"), page);
lbSearchFor->setBuddy(le);
hlay->addWidget(lbSearchFor);
@@ -558,7 +558,7 @@ QString Kleo::KeySelectionDialog::fingerprint() const
QStringList Kleo::KeySelectionDialog::fingerprints() const
{
QStringList result;
- for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin(); it != mSelectedKeys.end(); ++it)
if (const char *fpr = it->primaryFingerprint()) {
result.push_back(QLatin1String(fpr));
}
@@ -568,7 +568,7 @@ QStringList Kleo::KeySelectionDialog::fingerprints() const
QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const
{
QStringList result;
- for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin(); it != mSelectedKeys.end(); ++it)
if (it->protocol() == GpgME::OpenPGP)
if (const char *fpr = it->primaryFingerprint()) {
result.push_back(QLatin1String(fpr));
@@ -579,7 +579,7 @@ QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const
QStringList Kleo::KeySelectionDialog::smimeFingerprints() const
{
QStringList result;
- for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin(); it != mSelectedKeys.end(); ++it)
if (it->protocol() == GpgME::CMS)
if (const char *fpr = it->primaryFingerprint()) {
result.push_back(QLatin1String(fpr));
@@ -643,7 +643,7 @@ static void showKeyListError(QWidget *parent, const GpgME::Error &err)
assert(err);
const QString msg = i18n("<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
- "<p><b>%1</b></p></qt>" ,
+ "<p><b>%1</b></p></qt>",
QString::fromLocal8Bit(err.asString()));
KMessageBox::error(parent, msg, i18n("Key Listing Failed"));
@@ -698,7 +698,7 @@ static void selectKeys(Kleo::KeyListView *klv, const std::vector<GpgME::Key> &se
if (selectedKeys.empty()) {
return;
}
- for (std::vector<GpgME::Key>::const_iterator it = selectedKeys.begin() ; it != selectedKeys.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = selectedKeys.begin(); it != selectedKeys.end(); ++it)
if (Kleo::KeyListViewItem *item = klv->itemByFingerprint(it->primaryFingerprint())) {
item->setSelected(true);
}
@@ -758,7 +758,7 @@ namespace
struct AlreadyChecked {
bool operator()(const GpgME::Key &key) const
{
- return key.keyListMode() & GpgME::Validate ;
+ return key.keyListMode() & GpgME::Validate;
}
};
}
@@ -777,7 +777,7 @@ void Kleo::KeySelectionDialog::slotCheckSelection(KeyListViewItem *item)
}
}
- for (KeyListViewItem *it = mKeyListView->firstChild() ; it ; it = it->nextSibling())
+ for (KeyListViewItem *it = mKeyListView->firstChild(); it; it = it->nextSibling())
if (it->isSelected()) {
mSelectedKeys.push_back(it->key());
}
@@ -810,7 +810,7 @@ void Kleo::KeySelectionDialog::startValidatingKeyListing()
mKeyListView->setEnabled(false);
std::vector<GpgME::Key> smime, openpgp;
- for (std::vector<GpgME::Key>::const_iterator it = mKeysToCheck.begin() ; it != mKeysToCheck.end() ; ++it)
+ for (std::vector<GpgME::Key>::const_iterator it = mKeysToCheck.begin(); it != mKeysToCheck.end(); ++it)
if (it->protocol() == GpgME::OpenPGP) {
openpgp.push_back(*it);
} else {
@@ -831,7 +831,7 @@ void Kleo::KeySelectionDialog::startValidatingKeyListing()
bool Kleo::KeySelectionDialog::rememberSelection() const
{
- return mRememberCB && mRememberCB->isChecked() ;
+ return mRememberCB && mRememberCB->isChecked();
}
void Kleo::KeySelectionDialog::slotRMB(Kleo::KeyListViewItem *item, const QPoint &p)
@@ -930,7 +930,7 @@ void Kleo::KeySelectionDialog::filterByKeyID(const QString &keyID)
if (keyID.isEmpty()) {
showAllItems();
} else
- for (KeyListViewItem *item = mKeyListView->firstChild() ; item ; item = item->nextSibling()) {
+ for (KeyListViewItem *item = mKeyListView->firstChild(); item; item = item->nextSibling()) {
item->setHidden(!item->text(0).toUpper().startsWith(keyID));
}
}
@@ -942,7 +942,7 @@ static bool anyUIDMatches(const Kleo::KeyListViewItem *item, QRegExp &rx)
}
const std::vector<GpgME::UserID> uids = item->key().userIDs();
- for (std::vector<GpgME::UserID>::const_iterator it = uids.begin() ; it != uids.end() ; ++it)
+ for (std::vector<GpgME::UserID>::const_iterator it = uids.begin(); it != uids.end(); ++it)
if (it->id() && rx.indexIn(QString::fromUtf8(it->id())) >= 0) {
return true;
}
@@ -956,7 +956,7 @@ void Kleo::KeySelectionDialog::filterByKeyIDOrUID(const QString &str)
// match beginnings of words:
QRegExp rx(QLatin1String("\\b") + QRegExp::escape(str), Qt::CaseInsensitive);
- for (KeyListViewItem *item = mKeyListView->firstChild() ; item ; item = item->nextSibling()) {
+ for (KeyListViewItem *item = mKeyListView->firstChild(); item; item = item->nextSibling()) {
item->setHidden(!item->text(0).toUpper().startsWith(str) && !anyUIDMatches(item, rx));
}
@@ -969,14 +969,14 @@ void Kleo::KeySelectionDialog::filterByUID(const QString &str)
// match beginnings of words:
QRegExp rx(QLatin1String("\\b") + QRegExp::escape(str), Qt::CaseInsensitive);
- for (KeyListViewItem *item = mKeyListView->firstChild() ; item ; item = item->nextSibling()) {
+ for (KeyListViewItem *item = mKeyListView->firstChild(); item; item = item->nextSibling()) {
item->setHidden(!anyUIDMatches(item, rx));
}
}
void Kleo::KeySelectionDialog::showAllItems()
{
- for (KeyListViewItem *item = mKeyListView->firstChild() ; item ; item = item->nextSibling()) {
+ for (KeyListViewItem *item = mKeyListView->firstChild(); item; item = item->nextSibling()) {
item->setHidden(false);
}
}
diff --git a/libkleo/src/ui/messagebox.cpp b/libkleo/src/ui/messagebox.cpp
index f2565b9..150dadf 100644
--- a/libkleo/src/ui/messagebox.cpp
+++ b/libkleo/src/ui/messagebox.cpp
@@ -119,7 +119,7 @@ static QString to_information_string(const SigningResult &result)
{
return result.error()
? i18n("Signing failed: %1", QString::fromLocal8Bit(result.error().asString()))
- : i18n("Signing successful") ;
+ : i18n("Signing successful");
}
static QString to_error_string(const SigningResult &result)
@@ -131,7 +131,7 @@ static QString to_information_string(const EncryptionResult &result)
{
return result.error()
? i18n("Encryption failed: %1", QString::fromLocal8Bit(result.error().asString()))
- : i18n("Encryption successful") ;
+ : i18n("Encryption successful");
}
static QString to_error_string(const EncryptionResult &result)
diff --git a/libksieve/autotests/lexertest.cpp b/libksieve/autotests/lexertest.cpp
index 3277497..15cb285 100644
--- a/libksieve/autotests/lexertest.cpp
+++ b/libksieve/autotests/lexertest.cpp
@@ -449,7 +449,7 @@ static const TestCase testcases[] = {
};
-static const int numTestCases = sizeof testcases / sizeof * testcases ;
+static const int numTestCases = sizeof testcases / sizeof * testcases;
int main(int argc, char *argv[])
{
@@ -480,13 +480,13 @@ int main(int argc, char *argv[])
} else if (argc == 1) { // automated test
bool success = true;
- for (int i = 0 ; i < numTestCases ; ++i) {
+ for (int i = 0; i < numTestCases; ++i) {
bool ok = true;
const TestCase &t = testcases[i];
const char *const send = t.string + qstrlen(t.string);
Lexer lexer(t.string, send, Lexer::IncludeComments);
cerr << t.name << ":";
- for (int j = 0 ; !lexer.atEnd() ; ++j) {
+ for (int j = 0; !lexer.atEnd(); ++j) {
QString result;
Lexer::Token token = lexer.nextToken(result);
Error error = lexer.error();
diff --git a/libksieve/autotests/parsertest.cpp b/libksieve/autotests/parsertest.cpp
index ff6a815..f16a03c 100644
--- a/libksieve/autotests/parsertest.cpp
+++ b/libksieve/autotests/parsertest.cpp
@@ -437,7 +437,7 @@ struct TestCase {
};
-static const int numTestCases = sizeof testCases / sizeof * testCases ;
+static const int numTestCases = sizeof testCases / sizeof * testCases;
// Prints out the parse tree in XML-like format. For visual inspection
// (manual tests).
@@ -459,7 +459,7 @@ public:
write(multiLine ? "string type=\"multiline\"" : "string type=\"quoted\"", string);
}
void numberArgument(unsigned long number, char quantifier) Q_DECL_OVERRIDE {
- const QString txt = "number" + (quantifier ? QString(" quantifier=\"%1\"").arg(quantifier) : QString()) ;
+ const QString txt = "number" + (quantifier ? QString(" quantifier=\"%1\"").arg(quantifier) : QString());
write(txt.toLatin1(), QString::number(number));
}
void commandStart(const QString &identifier) Q_DECL_OVERRIDE {
@@ -530,7 +530,7 @@ private:
int indent;
void write(const char *msg)
{
- for (int i = 2 * indent ; i > 0 ; --i) {
+ for (int i = 2 * indent; i > 0; --i) {
cout << " ";
}
cout << msg << endl;
@@ -712,7 +712,7 @@ int main(int argc, char *argv[])
} else if (argc == 1) { // automated test
bool success = true;
- for (int i = 0 ; i < numTestCases ; ++i) {
+ for (int i = 0; i < numTestCases; ++i) {
const TestCase &t = testCases[i];
cerr << t.name << ":";
VerifyingScriptBuilder v(t);
diff --git a/libksieve/src/impl/lexer.h b/libksieve/src/impl/lexer.h
index eb2cb52..e62c1be 100644
--- a/libksieve/src/impl/lexer.h
+++ b/libksieve/src/impl/lexer.h
@@ -137,17 +137,17 @@ private:
const char *const mEnd;
const bool mIgnoreComments : 1;
- const bool mIgnoreLF : 1;
- QStack<State> mStateStack;
+ const bool mIgnoreLF : 1;
+ QStack<State> mStateStack;
- const char *beginOfLine() const
+ const char *beginOfLine() const
{
return mState.beginOfLine;
}
int _strnicmp(const char *left, const char *right, size_t len) const
{
- return charsLeft() >= len ? qstrnicmp(left, right, len) : 1 ;
+ return charsLeft() >= len ? qstrnicmp(left, right, len) : 1;
}
void clearErrors()
@@ -157,7 +157,7 @@ private:
unsigned int charsLeft() const
{
- return mEnd - mState.cursor < 0 ? 0 : mEnd - mState.cursor ;
+ return mEnd - mState.cursor < 0 ? 0 : mEnd - mState.cursor;
}
void makeError(Error::Type e)
{
@@ -197,7 +197,7 @@ private:
}
bool skipToCRLF(bool acceptEnd = true)
{
- for (; !atEnd() ; ++mState.cursor)
+ for (; !atEnd(); ++mState.cursor)
if (*mState.cursor == '\n' || *mState.cursor == '\r') {
return eatCRLF();
}
diff --git a/libksieve/src/impl/parser.h b/libksieve/src/impl/parser.h
index 85ce5c4..9859e54 100644
--- a/libksieve/src/impl/parser.h
+++ b/libksieve/src/impl/parser.h
@@ -65,7 +65,7 @@ private:
const Error &error() const
{
- return mError == Error::None ? lexer.error() : mError ;
+ return mError == Error::None ? lexer.error() : mError;
}
bool parseCommandList();
@@ -97,7 +97,7 @@ private:
bool atEnd() const
{
- return !mToken && lexer.atEnd() ;
+ return !mToken && lexer.atEnd();
}
bool obtainToken();
void consumeToken()
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp
index 1108239..a513e7a 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionaddheader.cpp
@@ -71,7 +71,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionAddHeader::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionAddHeader::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
int index = 0;
QDomNode node = element.firstChild();
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
index 5f2a2d2..282d30b 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionbreak.cpp
@@ -55,7 +55,7 @@ QWidget *SieveActionBreak::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionBreak::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionBreak::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp
index dce0219..57451b6 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionconvert.cpp
@@ -72,7 +72,7 @@ QWidget *SieveActionConvert::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionConvert::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionConvert::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
int index = 0;
QDomNode node = element.firstChild();
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp
index 3443b27..75f594c 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionereject.cpp
@@ -54,7 +54,7 @@ QWidget *SieveActionEReject::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionEReject::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionEReject::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp
index f2323ef..3e74e0c 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionextracttext.cpp
@@ -66,7 +66,7 @@ QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionExtractText::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionExtractText::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp
index 9e1a877..ba0b290 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionredirect.cpp
@@ -68,7 +68,7 @@ QWidget *SieveActionRedirect::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionRedirect::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionRedirect::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp
index 48418b6..0cb49a4 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreject.cpp
@@ -54,7 +54,7 @@ QWidget *SieveActionReject::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionReject::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionReject::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp
index 5204937..2009e76 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionreplace.cpp
@@ -73,7 +73,7 @@ QWidget *SieveActionReplace::createParamWidget(QWidget *parent) const
return w;
}
-bool SieveActionReplace::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionReplace::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp
index 51121bd..9b6b7a7 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionsetvariable.cpp
@@ -85,7 +85,7 @@ QUrl SieveActionSetVariable::href() const
return SieveEditorUtil::helpUrl(SieveEditorUtil::strToVariableName(name()));
}
-bool SieveActionSetVariable::setParamWidgetValue(const QDomElement &element, QWidget *w , QString &error)
+bool SieveActionSetVariable::setParamWidgetValue(const QDomElement &element, QWidget *w, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
index 0d7cacd..a247e1d 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactions/sieveactionvacation.cpp
@@ -56,10 +56,10 @@ QWidget *SieveActionVacation::createParamWidget(QWidget *parent) const
SelectVacationComboBox *vacation = new SelectVacationComboBox;
vacation->setObjectName(QStringLiteral("vacationcombobox"));
connect(vacation, &SelectVacationComboBox::valueChanged, this, &SieveActionVacation::valueChanged);
- grid->addWidget(vacation, 0 , 0);
+ grid->addWidget(vacation, 0, 0);
} else {
lab = new QLabel(i18n("day:"));
- grid->addWidget(lab, 0 , 0);
+ grid->addWidget(lab, 0, 0);
}
QSpinBox *day = new QSpinBox;
@@ -67,31 +67,31 @@ QWidget *SieveActionVacation::createParamWidget(QWidget *parent) const
day->setMaximum(999);
day->setObjectName(QStringLiteral("day"));
connect(day, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SieveActionVacation::valueChanged);
- grid->addWidget(day, 0 , 1);
+ grid->addWidget(day, 0, 1);
lab = new QLabel(i18n("Message subject:"));
- grid->addWidget(lab, 1 , 0);
+ grid->addWidget(lab, 1, 0);
QLineEdit *subject = new QLineEdit;
subject->setObjectName(QStringLiteral("subject"));
connect(subject, &QLineEdit::textChanged, this, &SieveActionVacation::valueChanged);
- grid->addWidget(subject, 1 , 1);
+ grid->addWidget(subject, 1, 1);
lab = new QLabel(i18n("Additional email:"));
- grid->addWidget(lab, 2 , 0);
+ grid->addWidget(lab, 2, 0);
QLineEdit *addresses = new QLineEdit;
addresses->setObjectName(QStringLiteral("addresses"));
connect(addresses, &QLineEdit::textChanged, this, &SieveActionVacation::valueChanged);
- grid->addWidget(addresses, 2 , 1);
+ grid->addWidget(addresses, 2, 1);
lab = new QLabel(i18n("Vacation reason:"));
- grid->addWidget(lab, 3 , 0);
+ grid->addWidget(lab, 3, 0);
MultiLineEdit *text = new MultiLineEdit;
connect(text, &MultiLineEdit::valueChanged, this, &SieveActionVacation::valueChanged);
text->setObjectName(QStringLiteral("text"));
- grid->addWidget(text, 3 , 1);
+ grid->addWidget(text, 3, 1);
return w;
}
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
index 269cee1..ac9b1f5 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
@@ -299,7 +299,7 @@ void SieveActionWidgetLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveActionWidget *w = qobject_cast<SieveActionWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
@@ -310,7 +310,7 @@ void SieveActionWidgetLister::generatedScript(QString &script, QStringList &requ
const QList<QWidget *> widgetList = widgets();
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveActionWidget *w = qobject_cast<SieveActionWidget *>(*wIt);
w->generatedScript(script, requires, onlyActions);
}
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp
index 39ee200..01f5eb2 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionbody.cpp
@@ -98,7 +98,7 @@ QString SieveConditionBody::help() const
return i18n("The body test matches content in the body of an email message, that is, anything following the first empty line after the header. (The empty line itself, if present, is not considered to be part of the body.)");
}
-bool SieveConditionBody::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionBody::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
int index = 0;
int indexStr = 0;
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp
index 900102e..70623da 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionconvert.cpp
@@ -110,7 +110,7 @@ QString SieveConditionConvert::help() const
return i18n("The \"convert\" action specifies that all body parts with a media type equal to \"media-type\" be converted to the media type in \"media-type\" using conversion parameters.");
}
-bool SieveConditionConvert::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/ , QString &error)
+bool SieveConditionConvert::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
int index = 0;
QDomNode node = element.firstChild();
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp
index 490066e..4efd9e3 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditioncurrentdate.cpp
@@ -91,7 +91,7 @@ QString SieveConditionCurrentDate::help() const
return i18n("The currentdate test is similar to the date test, except that it operates on the current date/time rather than a value extracted from the message header.");
}
-bool SieveConditionCurrentDate::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionCurrentDate::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
int index = 0;
QString type;
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp
index 8cd29fd..7e8e0ee 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditiondate.cpp
@@ -106,7 +106,7 @@ QString SieveConditionDate::help() const
return i18n("The date test matches date/time information derived from headers containing date-time values.");
}
-bool SieveConditionDate::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionDate::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
int index = 0;
QString type;
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
index a610555..64750b8 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvelope.cpp
@@ -120,7 +120,7 @@ QString SieveConditionEnvelope::help() const
return i18n("The \"envelope\" test is true if the specified part of the [SMTP] (or equivalent) envelope matches the specified key.");
}
-bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
int indexTag = 0;
int indexStr = 0;
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp
index cd5b272..fed45fd 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionenvironment.cpp
@@ -109,7 +109,7 @@ QString SieveConditionEnvironment::help() const
return i18n("The environment test retrieves the item of environment information specified by the name string and matches it to the values specified in the key-list argument.");
}
-bool SieveConditionEnvironment::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/ , QString &error)
+bool SieveConditionEnvironment::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
int index = 0;
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp
index b83d195..073527b 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionhasflag.cpp
@@ -134,7 +134,7 @@ QString SieveConditionHasFlag::help() const
return i18n("The hasflag test evaluates to true if any of the variables matches any flag name.");
}
-bool SieveConditionHasFlag::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionHasFlag::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
QStringList strList;
QDomNode node = element.firstChild();
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp
index 431446d..f8d7e74 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionheader.cpp
@@ -91,7 +91,7 @@ QString SieveConditionHeader::help() const
return i18n("The \"header\" test evaluates to true if the value of any of the named headers, ignoring leading and trailing whitespace, matches any key.");
}
-bool SieveConditionHeader::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition , QString &error)
+bool SieveConditionHeader::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
int index = 0;
QDomNode node = element.firstChild();
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp
index fcdf5c8..464c71f 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditions/sieveconditionvirustest.cpp
@@ -101,7 +101,7 @@ QString SieveConditionVirusTest::help() const
return i18n("Sieve implementations that implement the \"virustest\" test have an identifier of \"virustest\" for use with the capability mechanism.");
}
-bool SieveConditionVirusTest::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/ , QString &error)
+bool SieveConditionVirusTest::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
while (!node.isNull()) {
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
index 1ba646a..3e2d6c6 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveconditionwidgetlister.cpp
@@ -247,7 +247,7 @@ void SieveConditionWidgetLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveConditionWidget *w = qobject_cast<SieveConditionWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
@@ -280,7 +280,7 @@ void SieveConditionWidgetLister::generatedScript(QString &script, int &numberOfC
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
bool wasFirst = true;
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
QString condition;
SieveConditionWidget *w = qobject_cast<SieveConditionWidget *>(*wIt);
w->generatedScript(condition, requires);
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveglobalvariablewidget.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveglobalvariablewidget.cpp
index a77bc7a..9a208c2 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveglobalvariablewidget.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveglobalvariablewidget.cpp
@@ -243,7 +243,7 @@ void SieveGlobalVariableLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveGlobalVariableActionWidget *w = qobject_cast<SieveGlobalVariableActionWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
@@ -255,7 +255,7 @@ void SieveGlobalVariableLister::generatedScript(QString &script, QStringList &re
const QList<QWidget *> widgetList = widgets();
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveGlobalVariableActionWidget *w = qobject_cast<SieveGlobalVariableActionWidget *>(*wIt);
w->generatedScript(script);
}
diff --git a/libksieve/src/ksieveui/autocreatescripts/sieveincludewidget.cpp b/libksieve/src/ksieveui/autocreatescripts/sieveincludewidget.cpp
index 7b9b52c..a0805a4 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sieveincludewidget.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sieveincludewidget.cpp
@@ -276,7 +276,7 @@ void SieveIncludeWidgetLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveIncludeActionWidget *w = qobject_cast<SieveIncludeActionWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
@@ -288,7 +288,7 @@ void SieveIncludeWidgetLister::generatedScript(QString &script, QStringList &req
const QList<QWidget *> widgetList = widgets();
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SieveIncludeActionWidget *w = qobject_cast<SieveIncludeActionWidget *>(*wIt);
w->generatedScript(script);
}
diff --git a/libksieve/src/ksieveui/autocreatescripts/sievescriptlistbox.cpp b/libksieve/src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
index 837857e..c776522 100644
--- a/libksieve/src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
+++ b/libksieve/src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
@@ -295,7 +295,7 @@ void SieveScriptListBox::slotBottom()
const int currentIndex = mSieveListScript->currentRow();
if (currentIndex != mSieveListScript->count() - 1) {
item = mSieveListScript->takeItem(currentIndex);
- mSieveListScript->insertItem(mSieveListScript->count() , item);
+ mSieveListScript->insertItem(mSieveListScript->count(), item);
mSieveListScript->setCurrentItem(item);
Q_EMIT valueChanged();
}
diff --git a/libksieve/src/ksieveui/managesievescriptsdialog.cpp b/libksieve/src/ksieveui/managesievescriptsdialog.cpp
index ee2f33e..3ba82c2 100644
--- a/libksieve/src/ksieveui/managesievescriptsdialog.cpp
+++ b/libksieve/src/ksieveui/managesievescriptsdialog.cpp
@@ -230,7 +230,7 @@ void ManageSieveScriptsDialog::slotSieveEditorCancelClicked()
}
}
-void ManageSieveScriptsDialog::slotPutResultDebug(KManageSieve::SieveJob *, bool success , const QString &errorMsg)
+void ManageSieveScriptsDialog::slotPutResultDebug(KManageSieve::SieveJob *, bool success, const QString &errorMsg)
{
if (success) {
d->mSieveEditor->addOkMessage(i18n("No errors found."));
diff --git a/libksieve/src/ksieveui/managesievescriptsdialog.h b/libksieve/src/ksieveui/managesievescriptsdialog.h
index 27de60e..fc42e02 100644
--- a/libksieve/src/ksieveui/managesievescriptsdialog.h
+++ b/libksieve/src/ksieveui/managesievescriptsdialog.h
@@ -49,7 +49,7 @@ Q_SIGNALS:
private Q_SLOTS:
void slotGetResult(KManageSieve::SieveJob *, bool, const QString &, bool);
void slotPutResult(KManageSieve::SieveJob *, bool);
- void slotPutResultDebug(KManageSieve::SieveJob *, bool success , const QString &errorMsg);
+ void slotPutResultDebug(KManageSieve::SieveJob *, bool success, const QString &errorMsg);
void slotSieveEditorOkClicked();
void slotSieveEditorCancelClicked();
diff --git a/libksieve/src/ksieveui/scriptsparsing/xmlprintingscriptbuilder.cpp b/libksieve/src/ksieveui/scriptsparsing/xmlprintingscriptbuilder.cpp
index bc3cd4c..7c21003 100644
--- a/libksieve/src/ksieveui/scriptsparsing/xmlprintingscriptbuilder.cpp
+++ b/libksieve/src/ksieveui/scriptsparsing/xmlprintingscriptbuilder.cpp
@@ -42,12 +42,12 @@ void XMLPrintingScriptBuilder::taggedArgument(const QString &tag)
void XMLPrintingScriptBuilder::stringArgument(const QString &string, bool multiLine, const QString & /*fixme*/)
{
- write(QStringLiteral("str") , multiLine ? QStringLiteral("type=\"multiline\"") : QStringLiteral("type=\"quoted\""), string);
+ write(QStringLiteral("str"), multiLine ? QStringLiteral("type=\"multiline\"") : QStringLiteral("type=\"quoted\""), string);
}
void XMLPrintingScriptBuilder::numberArgument(unsigned long number, char quantifier)
{
- write(QStringLiteral("num"), (quantifier ? QStringLiteral("quantifier=\"%1\"").arg(quantifier) : QString()) , QString::number(number));
+ write(QStringLiteral("num"), (quantifier ? QStringLiteral("quantifier=\"%1\"").arg(quantifier) : QString()), QString::number(number));
}
void XMLPrintingScriptBuilder::commandStart(const QString &identifier)
diff --git a/libksieve/src/ksieveui/vacation/vacationeditwidget.cpp b/libksieve/src/ksieveui/vacation/vacationeditwidget.cpp
index af6d36c..0fc69f9 100644
--- a/libksieve/src/ksieveui/vacation/vacationeditwidget.cpp
+++ b/libksieve/src/ksieveui/vacation/vacationeditwidget.cpp
@@ -195,9 +195,9 @@ AddrSpecList VacationEditWidget::mailAliases() const
AddrSpecList asl;
AddressList::const_iterator end(al.constEnd());
- for (AddressList::const_iterator it = al.constBegin() ; it != end; ++it) {
+ for (AddressList::const_iterator it = al.constBegin(); it != end; ++it) {
const MailboxList &mbl = (*it).mailboxList;
- for (MailboxList::const_iterator jt = mbl.constBegin() ; jt != mbl.constEnd() ; ++jt) {
+ for (MailboxList::const_iterator jt = mbl.constBegin(); jt != mbl.constEnd(); ++jt) {
asl.push_back((*jt).addrSpec());
}
}
@@ -208,7 +208,7 @@ void VacationEditWidget::setMailAliases(const AddrSpecList &aliases)
{
QStringList sl;
AddrSpecList::const_iterator end(aliases.constEnd());
- for (AddrSpecList::const_iterator it = aliases.constBegin() ; it != end; ++it) {
+ for (AddrSpecList::const_iterator it = aliases.constBegin(); it != end; ++it) {
sl.push_back((*it).asString());
}
mMailAliasesEdit->setText(sl.join(QStringLiteral(", ")));
@@ -226,7 +226,7 @@ void VacationEditWidget::slotIntervalSpinChanged(int value)
QString VacationEditWidget::domainName() const
{
- return mDomainCheck->isChecked() ? mDomainEdit->text() : QString() ;
+ return mDomainCheck->isChecked() ? mDomainEdit->text() : QString();
}
void VacationEditWidget::setDomainName(const QString &domain)
diff --git a/libksieve/src/ksieveui/vacation/vacationhelperjob.h b/libksieve/src/ksieveui/vacation/vacationhelperjob.h
index 848930e..1c14369 100644
--- a/libksieve/src/ksieveui/vacation/vacationhelperjob.h
+++ b/libksieve/src/ksieveui/vacation/vacationhelperjob.h
@@ -18,7 +18,6 @@
#ifndef VACATIONHELPERJOB_H
#define VACATIONHELPERJOB_H
-
#include <QUrl>
#include <QObject>
diff --git a/libksieve/src/ksieveui/vacation/vacationscriptextractor.h b/libksieve/src/ksieveui/vacation/vacationscriptextractor.h
index 81703e7..e34b20b 100644
--- a/libksieve/src/ksieveui/vacation/vacationscriptextractor.h
+++ b/libksieve/src/ksieveui/vacation/vacationscriptextractor.h
@@ -219,7 +219,7 @@ private:
qCDebug(LIBKSIEVE_LOG) << (found ? "found:" : "not found:")
<< mState << "->"
<< (found ? expected.if_found : expected.if_not_found);
- mState = found ? expected.if_found : expected.if_not_found ;
+ mState = found ? expected.if_found : expected.if_not_found;
assert(mState < mNodes.size());
if (found)
if (const char *save_tag = expected.save_tag) {
@@ -230,62 +230,62 @@ private:
}
}
void commandStart(const QString &identifier) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(CommandStart, identifier);
}
void commandEnd() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(CommandEnd);
}
void testStart(const QString &identifier) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(TestStart, identifier);
}
void testEnd() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(TestEnd);
}
void testListStart() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(TestListStart);
}
void testListEnd() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(TestListEnd);
}
void blockStart() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(BlockStart);
++mNestingDepth;
}
void blockEnd() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
--mNestingDepth;
process(BlockEnd);
}
void hashComment(const QString &) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
}
void bracketComment(const QString &) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
}
void lineFeed() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
}
void error(const KSieve::Error &) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
mState = 0;
}
void finished() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
}
void taggedArgument(const QString &tag) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(TaggedArgument, tag);
}
void stringArgument(const QString &string, bool, const QString &) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(StringArgument, string);
}
void numberArgument(unsigned long number, char) Q_DECL_OVERRIDE {
@@ -293,15 +293,15 @@ private:
process(NumberArgument, QString::number(number));
}
void stringListArgumentStart() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(StringListArgumentStart);
}
void stringListEntry(const QString &string, bool, const QString &) Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(StringListEntry, string);
}
void stringListArgumentEnd() Q_DECL_OVERRIDE {
- qCDebug(LIBKSIEVE_LOG) ;
+ qCDebug(LIBKSIEVE_LOG);
process(StringListArgumentEnd);
}
};
@@ -338,7 +338,7 @@ static const GenericInformationExtractor::StateNode spamNodes[] = {
{ -1, GIE::Any, Q_NULLPTR, 20, 20, Q_NULLPTR }, // 20 end state
};
-static const unsigned int numSpamNodes = sizeof spamNodes / sizeof *spamNodes ;
+static const unsigned int numSpamNodes = sizeof spamNodes / sizeof * spamNodes;
class SpamDataExtractor : public GenericInformationExtractor
{
@@ -353,7 +353,7 @@ public:
{
return mResults.count(QStringLiteral("x-spam-flag")) &&
mResults.count(QStringLiteral("spam-flag-yes")) &&
- mResults.count(QStringLiteral("stop")) ;
+ mResults.count(QStringLiteral("stop"));
}
};
@@ -396,7 +396,7 @@ static const GenericInformationExtractor::StateNode domainNodes[] = {
{ -1, GIE::Any, Q_NULLPTR, 23, 23, Q_NULLPTR } // 23 end state
};
-static const unsigned int numDomainNodes = sizeof domainNodes / sizeof *domainNodes ;
+static const unsigned int numDomainNodes = sizeof domainNodes / sizeof * domainNodes;
class DomainRestrictionDataExtractor : public GenericInformationExtractor
{
@@ -456,7 +456,7 @@ static const GenericInformationExtractor::StateNode datesNodes[] = {
{ -1, GIE::Any, Q_NULLPTR, 27, 27, Q_NULLPTR } // 29 end state
};
-static const unsigned int numDatesNodes = sizeof datesNodes / sizeof *datesNodes;
+static const unsigned int numDatesNodes = sizeof datesNodes / sizeof * datesNodes;
class DateExtractor : public GenericInformationExtractor
{
diff --git a/libksieve/src/ksieveui/vacation/vacationutils.cpp b/libksieve/src/ksieveui/vacation/vacationutils.cpp
index f61f490..fa0b7ce 100644
--- a/libksieve/src/ksieveui/vacation/vacationutils.cpp
+++ b/libksieve/src/ksieveui/vacation/vacationutils.cpp
@@ -73,7 +73,7 @@ QStringList VacationUtils::defaultMailAliases()
QStringList sl;
KIdentityManagement::IdentityManager manager(true);
KIdentityManagement::IdentityManager::ConstIterator end(manager.end());
- for (KIdentityManagement::IdentityManager::ConstIterator it = manager.begin(); it != end ; ++it) {
+ for (KIdentityManagement::IdentityManager::ConstIterator it = manager.begin(); it != end; ++it) {
if (!(*it).primaryEmailAddress().isEmpty()) {
sl.push_back((*it).primaryEmailAddress());
}
@@ -103,10 +103,10 @@ QDate VacationUtils::defaultEndDate()
}
bool VacationUtils::parseScript(const QString &script, QString &messageText,
- QString &subject,
- int &notificationInterval, QStringList &aliases,
- bool &sendForSpam, QString &domainName,
- QDate &startDate, QDate &endDate)
+ QString &subject,
+ int &notificationInterval, QStringList &aliases,
+ bool &sendForSpam, QString &domainName,
+ QDate &startDate, QDate &endDate)
{
if (script.trimmed().isEmpty()) {
messageText = VacationUtils::defaultMessageText();
@@ -150,11 +150,11 @@ bool VacationUtils::parseScript(const QString &script, QString &messageText,
}
QString VacationUtils::composeScript(const QString &messageText,
- const QString &subject,
- int notificationInterval,
- const AddrSpecList &addrSpecs,
- bool sendForSpam, const QString &domain,
- const QDate &startDate, const QDate &endDate)
+ const QString &subject,
+ int notificationInterval,
+ const AddrSpecList &addrSpecs,
+ bool sendForSpam, const QString &domain,
+ const QDate &startDate, const QDate &endDate)
{
QString addressesArgument;
QStringList aliases;
@@ -162,7 +162,7 @@ QString VacationUtils::composeScript(const QString &messageText,
addressesArgument += QLatin1String(":addresses [ ");
QStringList sl;
AddrSpecList::const_iterator end = addrSpecs.constEnd();
- for (AddrSpecList::const_iterator it = addrSpecs.begin() ; it != end; ++it) {
+ for (AddrSpecList::const_iterator it = addrSpecs.begin(); it != end; ++it) {
sl.push_back(QLatin1Char('"') + (*it).asString().replace(QLatin1Char('\\'), QStringLiteral("\\\\")).replace(QLatin1Char('"'), QStringLiteral("\\\"")) + QLatin1Char('"'));
aliases.push_back((*it).asString());
}
diff --git a/libksieve/src/ksieveui/widgets/sievetreewidgetitem.cpp b/libksieve/src/ksieveui/widgets/sievetreewidgetitem.cpp
index ceb6942..8c0fe79 100644
--- a/libksieve/src/ksieveui/widgets/sievetreewidgetitem.cpp
+++ b/libksieve/src/ksieveui/widgets/sievetreewidgetitem.cpp
@@ -78,8 +78,6 @@ public:
SieveTreeWidgetProgress *mProgress;
};
-
-
SieveTreeWidgetItem::SieveTreeWidgetItem(QTreeWidget *treeWidget, QTreeWidgetItem *item)
: QTreeWidgetItem(treeWidget, item),
d(new KSieveUi::SieveTreeWidgetItemPrivate)
diff --git a/libksieve/src/parser/lexer.cpp b/libksieve/src/parser/lexer.cpp
index 8eaac8f..a27c78c 100644
--- a/libksieve/src/parser/lexer.cpp
+++ b/libksieve/src/parser/lexer.cpp
@@ -175,14 +175,14 @@ static QString removeCRLF(const QString &s)
const bool CRLF = s.endsWith(QStringLiteral("\r\n"));
const bool LF = !CRLF && s.endsWith('\n');
- const int e = CRLF ? 2 : LF ? 1 : 0 ; // what to chop off at the end
+ const int e = CRLF ? 2 : LF ? 1 : 0; // what to chop off at the end
return s.left(s.length() - e);
}
static QString removeDotStuff(const QString &s)
{
- return s.startsWith(QStringLiteral("..")) ? s.mid(1) : s ;
+ return s.startsWith(QStringLiteral("..")) ? s.mid(1) : s;
}
namespace KSieve
@@ -197,8 +197,8 @@ namespace KSieve
Lexer::Impl::Impl(const char *scursor, const char *send, int options)
: mState(scursor ? scursor : send),
mEnd(send ? send : scursor),
- mIgnoreComments(options &IgnoreComments),
- mIgnoreLF(options &IgnoreLineFeeds)
+ mIgnoreComments(options & IgnoreComments),
+ mIgnoreLF(options & IgnoreLineFeeds)
{
if (!scursor || !send) {
assert(atEnd());
@@ -213,7 +213,7 @@ Lexer::Token Lexer::Impl::nextToken(QString &result)
const int oldLine = line();
- const bool eatingWSSucceeded = ignoreComments() ? eatCWS() : eatWS() ;
+ const bool eatingWSSucceeded = ignoreComments() ? eatCWS() : eatWS();
if (!ignoreLineFeeds() && oldLine != line()) {
result.setNum(line() - oldLine); // return number of linefeeds encountered
@@ -505,7 +505,7 @@ bool Lexer::Impl::parseIdentifier(QString &result)
}
// rest of identifier chars ( now digits are allowed ):
- for (++mState.cursor ; !atEnd() && isIText(*mState.cursor) ; ++mState.cursor) ;
+ for (++mState.cursor; !atEnd() && isIText(*mState.cursor); ++mState.cursor);
const int identifierLength = mState.cursor - identifierStart;
diff --git a/libksieve/src/parser/parser.cpp b/libksieve/src/parser/parser.cpp
index 23288f5..afc99f1 100644
--- a/libksieve/src/parser/parser.cpp
+++ b/libksieve/src/parser/parser.cpp
@@ -108,8 +108,8 @@ static inline unsigned long factorForQuantifier(char ch)
static inline bool willOverflowULong(unsigned long result, unsigned long add)
{
- static const unsigned long maxULongByTen = (unsigned long)(ULONG_MAX / 10.0) ;
- return result > maxULongByTen || ULONG_MAX - 10 * result < add ;
+ static const unsigned long maxULongByTen = (unsigned long)(ULONG_MAX / 10.0);
+ return result > maxULongByTen || ULONG_MAX - 10 * result < add;
}
namespace KSieve
@@ -132,7 +132,7 @@ Parser::Impl::Impl(const char *scursor, const char *const send, int options)
bool Parser::Impl::isStringToken() const
{
return token() == Lexer::QuotedString ||
- token() == Lexer::MultiLineString ;
+ token() == Lexer::MultiLineString;
}
bool Parser::Impl::isArgumentToken() const
@@ -166,7 +166,7 @@ bool Parser::Impl::obtainToken()
consumeToken();
break;
case Lexer::LineFeeds:
- for (unsigned int i = 0, end = tokenValue().toUInt() ; i < end ; ++i)
+ for (unsigned int i = 0, end = tokenValue().toUInt(); i < end; ++i)
if (scriptBuilder()) // better check every iteration, b/c
// we call out to ScriptBuilder,
// where nasty things might happen!
@@ -175,7 +175,7 @@ bool Parser::Impl::obtainToken()
}
consumeToken();
break;
- default: ; // make compiler happy
+ default:; // make compiler happy
}
}
if (lexer.error() && scriptBuilder()) {
@@ -684,13 +684,13 @@ bool Parser::Impl::parseNumber()
unsigned long result = 0;
int i = 0;
const QByteArray s = tokenValue().toLatin1();
- for (const int len = s.length() ; i < len && isdigit(s[i]) ; ++i) {
- const unsigned long digitValue = s[i] - '0' ;
+ for (const int len = s.length(); i < len && isdigit(s[i]); ++i) {
+ const unsigned long digitValue = s[i] - '0';
if (willOverflowULong(result, digitValue)) {
makeError(Error::NumberOutOfRange);
return false;
} else {
- result *= 10 ; result += digitValue ;
+ result *= 10; result += digitValue;
}
}
diff --git a/libksieve/src/parser/utf8validator.cpp b/libksieve/src/parser/utf8validator.cpp
index 5b8d9d3..82c050c 100644
--- a/libksieve/src/parser/utf8validator.cpp
+++ b/libksieve/src/parser/utf8validator.cpp
@@ -56,7 +56,7 @@ static inline bool isUtf8TripleIndicator(unsigned char ch)
static inline bool isUtf8OverlongTriple(unsigned char ch1, unsigned char ch2)
{
- return (ch1 & 0xFF) == 0xE0 && (ch2 & 0xE0) == 0x80 ;
+ return (ch1 & 0xFF) == 0xE0 && (ch2 & 0xE0) == 0x80;
}
static inline bool isUtf8QuartetIndicator(unsigned char ch)
@@ -66,7 +66,7 @@ static inline bool isUtf8QuartetIndicator(unsigned char ch)
static inline bool isUtf8OverlongQuartet(unsigned char ch1, unsigned char ch2)
{
- return (ch1 & 0xFF) == 0xF0 && (ch2 & 0xF0) == 0x80 ;
+ return (ch1 & 0xFF) == 0xF0 && (ch2 & 0xF0) == 0x80;
}
static inline bool isUtf8QuintetIndicator(unsigned char ch)
@@ -76,7 +76,7 @@ static inline bool isUtf8QuintetIndicator(unsigned char ch)
static inline bool isUtf8OverlongQuintet(unsigned char ch1, unsigned char ch2)
{
- return (ch1 & 0xFF) == 0xF8 && (ch2 & 0xF8) == 0x80 ;
+ return (ch1 & 0xFF) == 0xF8 && (ch2 & 0xF8) == 0x80;
}
static inline bool isUtf8SextetIndicator(unsigned char ch)
@@ -86,7 +86,7 @@ static inline bool isUtf8SextetIndicator(unsigned char ch)
static inline bool isUtf8OverlongSextet(unsigned char ch1, unsigned char ch2)
{
- return (ch1 & 0xFF) == 0xFC && (ch2 & 0xFC) == 0x80 ;
+ return (ch1 & 0xFF) == 0xFC && (ch2 & 0xFC) == 0x80;
}
static inline bool isUtf8Continuation(unsigned char ch)
@@ -96,7 +96,7 @@ static inline bool isUtf8Continuation(unsigned char ch)
bool KSieve::isValidUtf8(const char *s, unsigned int len)
{
- for (unsigned int i = 0 ; i < len ; ++i) {
+ for (unsigned int i = 0; i < len; ++i) {
const unsigned char ch = s[i];
if (!is8Bit(ch)) {
continue;
diff --git a/mailcommon/src/collectionpage/autotests/contenttypewidgettest.cpp b/mailcommon/src/collectionpage/autotests/contenttypewidgettest.cpp
index b3dcc37..acbe41b 100644
--- a/mailcommon/src/collectionpage/autotests/contenttypewidgettest.cpp
+++ b/mailcommon/src/collectionpage/autotests/contenttypewidgettest.cpp
@@ -50,7 +50,7 @@ void ContentTypeWidgetTest::shouldChangeComboBoxIndex()
{
MailCommon::ContentTypeWidget contentType;
KComboBox *combo = contentType.findChild<KComboBox *>(QStringLiteral("contentcombobox"));
- for (int i = 0 ; i < combo->count() ; ++i) {
+ for (int i = 0; i < combo->count(); ++i) {
contentType.setCurrentIndex(i);
QCOMPARE(contentType.currentIndex(), i);
QCOMPARE(combo->currentIndex(), i);
@@ -74,7 +74,7 @@ void ContentTypeWidgetTest::shouldChangeItem()
contentType.show();
QTest::qWaitForWindowShown(&contentType);
KComboBox *combo = contentType.findChild<KComboBox *>(QStringLiteral("contentcombobox"));
- for (int i = 0 ; i < combo->count() ; ++i) {
+ for (int i = 0; i < combo->count(); ++i) {
contentType.setCurrentIndex(i);
QCOMPARE(contentType.currentText(), combo->currentText());
}
diff --git a/mailcommon/src/collectionpage/autotests/incidencesforwidgettest.cpp b/mailcommon/src/collectionpage/autotests/incidencesforwidgettest.cpp
index 2c5a06e..9896af3 100644
--- a/mailcommon/src/collectionpage/autotests/incidencesforwidgettest.cpp
+++ b/mailcommon/src/collectionpage/autotests/incidencesforwidgettest.cpp
@@ -51,7 +51,7 @@ void IncidencesForWidgetTest::shouldChangeComboBoxIndex()
{
MailCommon::IncidencesForWidget contentType;
KComboBox *combo = contentType.findChild<KComboBox *>(QStringLiteral("contentstypecombobox"));
- for (int i = 0 ; i < combo->count() ; ++i) {
+ for (int i = 0; i < combo->count(); ++i) {
contentType.setCurrentIndex(i);
QCOMPARE(contentType.currentIndex(), i);
QCOMPARE(combo->currentIndex(), i);
diff --git a/mailcommon/src/collectionpage/collectiongeneralpage.cpp b/mailcommon/src/collectionpage/collectiongeneralpage.cpp
index 281b892..adb7141 100644
--- a/mailcommon/src/collectionpage/collectiongeneralpage.cpp
+++ b/mailcommon/src/collectionpage/collectiongeneralpage.cpp
@@ -323,7 +323,7 @@ void CollectionGeneralPage::save(Collection &collection)
const CollectionTypeUtil::FolderContentsType type =
collectionUtil.contentsTypeFromString(mContentsComboBox->currentText());
- const QByteArray kolabName = collectionUtil.kolabNameFromType(type) ;
+ const QByteArray kolabName = collectionUtil.kolabNameFromType(type);
if (!kolabName.isEmpty()) {
const QString iconName = collectionUtil.iconNameFromContentsType(type);
Akonadi::EntityDisplayAttribute *attribute =
diff --git a/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp b/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
index 8bf0ab3..78f1a91 100644
--- a/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
+++ b/mailcommon/src/filter/autotests/filteractionwithaddresstest.cpp
@@ -28,7 +28,7 @@ public:
{
}
- FilterAction::ReturnCode process(MailCommon::ItemContext &context , bool) const
+ FilterAction::ReturnCode process(MailCommon::ItemContext &context, bool) const
{
return GoOn;
}
diff --git a/mailcommon/src/filter/autotests/filteractionwithurltest.cpp b/mailcommon/src/filter/autotests/filteractionwithurltest.cpp
index 147a463..dc5a9b9 100644
--- a/mailcommon/src/filter/autotests/filteractionwithurltest.cpp
+++ b/mailcommon/src/filter/autotests/filteractionwithurltest.cpp
@@ -29,7 +29,7 @@ public:
{
}
- FilterAction::ReturnCode process(MailCommon::ItemContext &context , bool) const
+ FilterAction::ReturnCode process(MailCommon::ItemContext &context, bool) const
{
return GoOn;
}
diff --git a/mailcommon/src/filter/filteractions/filteractionaddheader.cpp b/mailcommon/src/filter/filteractions/filteractionaddheader.cpp
index 051395c..35065ca 100644
--- a/mailcommon/src/filter/filteractions/filteractionaddheader.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionaddheader.cpp
@@ -49,7 +49,7 @@ bool FilterActionAddHeader::isEmpty() const
return (mParameter.isEmpty() || mValue.isEmpty());
}
-FilterAction::ReturnCode FilterActionAddHeader::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionAddHeader::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionaddtag.cpp b/mailcommon/src/filter/filteractions/filteractionaddtag.cpp
index b3d598c..89f1390 100644
--- a/mailcommon/src/filter/filteractions/filteractionaddtag.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionaddtag.cpp
@@ -118,7 +118,7 @@ bool FilterActionAddTag::argsFromStringInteractive(const QString &argsStr, const
return needUpdate;
}
-FilterAction::ReturnCode FilterActionAddTag::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionAddTag::process(ItemContext &context, bool) const
{
if (!mList.contains(mParameter)) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionaddtoaddressbook.cpp b/mailcommon/src/filter/filteractions/filteractionaddtoaddressbook.cpp
index 7af4529..37c11eb 100644
--- a/mailcommon/src/filter/filteractions/filteractionaddtoaddressbook.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionaddtoaddressbook.cpp
@@ -57,7 +57,7 @@ bool FilterActionAddToAddressBook::isEmpty() const
return (mCollectionId == -1) || (mHeaderType == UnknownHeader);
}
-FilterAction::ReturnCode FilterActionAddToAddressBook::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionAddToAddressBook::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractioncopy.cpp b/mailcommon/src/filter/filteractions/filteractioncopy.cpp
index c0ca797..33b2f96 100644
--- a/mailcommon/src/filter/filteractions/filteractioncopy.cpp
+++ b/mailcommon/src/filter/filteractions/filteractioncopy.cpp
@@ -32,7 +32,7 @@ FilterActionCopy::FilterActionCopy(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionCopy::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionCopy::process(ItemContext &context, bool) const
{
// copy the message 1:1
Akonadi::ItemCopyJob *job = new Akonadi::ItemCopyJob(context.item(), mFolder, 0);
diff --git a/mailcommon/src/filter/filteractions/filteractiondelete.cpp b/mailcommon/src/filter/filteractions/filteractiondelete.cpp
index 79892ad..a47158d 100644
--- a/mailcommon/src/filter/filteractions/filteractiondelete.cpp
+++ b/mailcommon/src/filter/filteractions/filteractiondelete.cpp
@@ -31,7 +31,7 @@ FilterActionDelete::FilterActionDelete(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionDelete::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionDelete::process(ItemContext &context, bool) const
{
context.setDeleteItem();
return GoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractiondict.cpp b/mailcommon/src/filter/filteractions/filteractiondict.cpp
index e73547c..fad1a53 100644
--- a/mailcommon/src/filter/filteractions/filteractiondict.cpp
+++ b/mailcommon/src/filter/filteractions/filteractiondict.cpp
@@ -80,7 +80,7 @@ void FilterActionDict::init()
// The int in the QDict constructor (41) must be a prime
// and should be greater than the double number of FilterAction types
FilterActionDict::FilterActionDict()
- : QMultiHash<QString, FilterActionDesc *>()
+ : QMultiHash<QString, FilterActionDesc * >()
{
init();
}
diff --git a/mailcommon/src/filter/filteractions/filteractionexec.cpp b/mailcommon/src/filter/filteractions/filteractionexec.cpp
index dfe1be5..6dfac4f 100644
--- a/mailcommon/src/filter/filteractions/filteractionexec.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionexec.cpp
@@ -28,7 +28,7 @@ FilterActionExec::FilterActionExec(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionExec::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionExec::process(ItemContext &context, bool) const
{
return FilterActionWithCommand::genericProcess(context, false); // ignore output
}
diff --git a/mailcommon/src/filter/filteractions/filteractionforward.cpp b/mailcommon/src/filter/filteractions/filteractionforward.cpp
index 36d1654..1888e87 100644
--- a/mailcommon/src/filter/filteractions/filteractionforward.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionforward.cpp
@@ -49,7 +49,7 @@ FilterActionForward::FilterActionForward(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionForward::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionForward::process(ItemContext &context, bool) const
{
if (mParameter.isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionmove.cpp b/mailcommon/src/filter/filteractions/filteractionmove.cpp
index d84d778..5b31ff3 100644
--- a/mailcommon/src/filter/filteractions/filteractionmove.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionmove.cpp
@@ -36,7 +36,7 @@ FilterActionMove::FilterActionMove(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionMove::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionMove::process(ItemContext &context, bool) const
{
if (!mFolder.isValid()) {
const Akonadi::Collection targetFolder = CommonKernel->collectionFromId(mFolder.id());
diff --git a/mailcommon/src/filter/filteractions/filteractionpipethrough.cpp b/mailcommon/src/filter/filteractions/filteractionpipethrough.cpp
index 258c8cd..27dfc9f 100644
--- a/mailcommon/src/filter/filteractions/filteractionpipethrough.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionpipethrough.cpp
@@ -33,7 +33,7 @@ FilterActionPipeThrough::FilterActionPipeThrough(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionPipeThrough::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionPipeThrough::process(ItemContext &context, bool) const
{
return FilterActionWithCommand::genericProcess(context, true); // use output
}
diff --git a/mailcommon/src/filter/filteractions/filteractionredirect.cpp b/mailcommon/src/filter/filteractions/filteractionredirect.cpp
index bd1b70a..4338865 100644
--- a/mailcommon/src/filter/filteractions/filteractionredirect.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionredirect.cpp
@@ -40,7 +40,7 @@ FilterActionRedirect::FilterActionRedirect(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionRedirect::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionRedirect::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionremoveheader.cpp b/mailcommon/src/filter/filteractions/filteractionremoveheader.cpp
index f9e4073..f3d90d0 100644
--- a/mailcommon/src/filter/filteractions/filteractionremoveheader.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionremoveheader.cpp
@@ -58,7 +58,7 @@ QWidget *FilterActionRemoveHeader::createParamWidget(QWidget *parent) const
return comboBox;
}
-FilterAction::ReturnCode FilterActionRemoveHeader::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionRemoveHeader::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionreplyto.cpp b/mailcommon/src/filter/filteractions/filteractionreplyto.cpp
index 0fe090c..a5b0803 100644
--- a/mailcommon/src/filter/filteractions/filteractionreplyto.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionreplyto.cpp
@@ -33,7 +33,7 @@ FilterActionReplyTo::FilterActionReplyTo(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionReplyTo::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionReplyTo::process(ItemContext &context, bool) const
{
if (mParameter.isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionrewriteheader.cpp b/mailcommon/src/filter/filteractions/filteractionrewriteheader.cpp
index 96cb382..f72a4e6 100644
--- a/mailcommon/src/filter/filteractions/filteractionrewriteheader.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionrewriteheader.cpp
@@ -69,7 +69,7 @@ QString FilterActionRewriteHeader::informationAboutNotValidAction() const
return info;
}
-FilterAction::ReturnCode FilterActionRewriteHeader::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionRewriteHeader::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionsendfakedisposition.cpp b/mailcommon/src/filter/filteractions/filteractionsendfakedisposition.cpp
index 464e0fc..caf829c 100644
--- a/mailcommon/src/filter/filteractions/filteractionsendfakedisposition.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionsendfakedisposition.cpp
@@ -19,7 +19,6 @@
#include "filteractionsendfakedisposition.h"
-
#include <KLocalizedString>
#include "mailcommon/mdnstateattribute.h"
@@ -65,7 +64,7 @@ bool FilterActionSendFakeDisposition::isEmpty() const
return (index < 1);
}
-FilterAction::ReturnCode FilterActionSendFakeDisposition::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionSendFakeDisposition::process(ItemContext &context, bool) const
{
const int index = mParameterList.indexOf(mParameter);
if (index < 1) {
@@ -97,7 +96,7 @@ void FilterActionSendFakeDisposition::argsFromString(const QString &argsStr)
return;
}
- for (int i = 0 ; i < numMDNs ; ++i) {
+ for (int i = 0; i < numMDNs; ++i) {
if (char(mdns[ i ]) == argsStr[ 0 ]) { // send
mParameter = mParameterList.at(i + 2);
return;
diff --git a/mailcommon/src/filter/filteractions/filteractionsendreceipt.cpp b/mailcommon/src/filter/filteractions/filteractionsendreceipt.cpp
index 249cdcc..181c2d7 100644
--- a/mailcommon/src/filter/filteractions/filteractionsendreceipt.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionsendreceipt.cpp
@@ -34,7 +34,7 @@ FilterActionSendReceipt::FilterActionSendReceipt(QObject *parent)
{
}
-FilterAction::ReturnCode FilterActionSendReceipt::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionSendReceipt::process(ItemContext &context, bool) const
{
const KMime::Message::Ptr msg = context.item().payload<KMime::Message::Ptr>();
diff --git a/mailcommon/src/filter/filteractions/filteractionsetidentity.cpp b/mailcommon/src/filter/filteractions/filteractionsetidentity.cpp
index 10a9e4a..6d49e9f 100644
--- a/mailcommon/src/filter/filteractions/filteractionsetidentity.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionsetidentity.cpp
@@ -60,7 +60,7 @@ bool FilterActionSetIdentity::argsFromStringInteractive(const QString &argsStr,
return needUpdate;
}
-FilterAction::ReturnCode FilterActionSetIdentity::process(ItemContext &context , bool applyOnOutbound) const
+FilterAction::ReturnCode FilterActionSetIdentity::process(ItemContext &context, bool applyOnOutbound) const
{
const KIdentityManagement::Identity &ident =
KernelIf->identityManager()->identityForUoid(mParameter);
diff --git a/mailcommon/src/filter/filteractions/filteractionsetstatus.cpp b/mailcommon/src/filter/filteractions/filteractionsetstatus.cpp
index 3df58e7..3b3ca90 100644
--- a/mailcommon/src/filter/filteractions/filteractionsetstatus.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionsetstatus.cpp
@@ -44,7 +44,7 @@ QString FilterActionSetStatus::informationAboutNotValidAction() const
return i18n("Status not specified.");
}
-FilterAction::ReturnCode FilterActionSetStatus::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionSetStatus::process(ItemContext &context, bool) const
{
const int index = mParameterList.indexOf(mParameter);
if (index < 1) {
diff --git a/mailcommon/src/filter/filteractions/filteractionsettransport.cpp b/mailcommon/src/filter/filteractions/filteractionsettransport.cpp
index 5d74160..6a4474b 100644
--- a/mailcommon/src/filter/filteractions/filteractionsettransport.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionsettransport.cpp
@@ -69,7 +69,7 @@ bool FilterActionSetTransport::argsFromStringInteractive(const QString &argsStr,
return needUpdate;
}
-FilterAction::ReturnCode FilterActionSetTransport::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionSetTransport::process(ItemContext &context, bool) const
{
if (isEmpty()) {
return ErrorButGoOn;
diff --git a/mailcommon/src/filter/filteractions/filteractionstatus.cpp b/mailcommon/src/filter/filteractions/filteractionstatus.cpp
index 5302a95..f4898aa 100644
--- a/mailcommon/src/filter/filteractions/filteractionstatus.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionstatus.cpp
@@ -82,7 +82,7 @@ void FilterActionStatus::argsFromString(const QString &argsStr)
if (argsStr.length() == 1) {
Akonadi::MessageStatus status;
- for (int i = 0 ; i < FilterActionStatus::StatiCount; ++i) {
+ for (int i = 0; i < FilterActionStatus::StatiCount; ++i) {
status = stati[i];
if (realStatusString(status.statusStr()) == QLatin1String(argsStr.toLatin1())) {
mParameter = mParameterList.at(i + 1);
diff --git a/mailcommon/src/filter/filteractions/filteractionunsetstatus.cpp b/mailcommon/src/filter/filteractions/filteractionunsetstatus.cpp
index 9287885..ed7fb6b 100644
--- a/mailcommon/src/filter/filteractions/filteractionunsetstatus.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionunsetstatus.cpp
@@ -48,7 +48,7 @@ QString FilterActionUnsetStatus::informationAboutNotValidAction() const
return i18n("Status not defined.");
}
-FilterAction::ReturnCode FilterActionUnsetStatus::process(ItemContext &context , bool) const
+FilterAction::ReturnCode FilterActionUnsetStatus::process(ItemContext &context, bool) const
{
int index = 0;
if (checkIsValid(index)) {
diff --git a/mailcommon/src/filter/filteractions/filteractionwidget.cpp b/mailcommon/src/filter/filteractions/filteractionwidget.cpp
index d1f6db3..8316a75 100644
--- a/mailcommon/src/filter/filteractions/filteractionwidget.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionwidget.cpp
@@ -194,7 +194,7 @@ void FilterActionWidget::updateAddRemoveButton(bool addButtonEnabled, bool remov
void FilterActionWidget::setAction(const FilterAction *action)
{
bool found = false;
- const int count = d->mComboBox->count() - 1 ; // last entry is the empty one
+ const int count = d->mComboBox->count() - 1; // last entry is the empty one
const QString name = action ? action->name() : QString();
@@ -319,7 +319,7 @@ void FilterActionWidgetLister::setActionList(QList<FilterAction *> *list)
qCDebug(MAILCOMMON_LOG) << "FilterActionWidgetLister: Clipping action list to"
<< widgetsMaximum() << "items!";
- for (; superfluousItems ; superfluousItems--) {
+ for (; superfluousItems; superfluousItems--) {
d->mActionList->removeLast();
}
}
@@ -382,7 +382,7 @@ void FilterActionWidgetLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
FilterActionWidget *w = qobject_cast<FilterActionWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
@@ -425,7 +425,7 @@ void FilterActionWidgetLister::clearWidget(QWidget *widget)
FilterActionWidget *w = static_cast<FilterActionWidget *>(widget);
w->setAction(0);
w->disconnect(this);
- reconnectWidget(w) ;
+ reconnectWidget(w);
updateAddRemoveButton();
}
}
diff --git a/mailcommon/src/filter/filteractions/filteractionwithcommand.cpp b/mailcommon/src/filter/filteractions/filteractionwithcommand.cpp
index 3e9dd5e..bd92bb7 100644
--- a/mailcommon/src/filter/filteractions/filteractionwithcommand.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionwithcommand.cpp
@@ -92,7 +92,7 @@ QString FilterActionWithCommand::substituteCommandLineArgsFor(const KMime::Messa
int lastSeen = -2;
QString tempFileName;
QList<int>::ConstIterator end(argList.constEnd());
- for (QList<int>::ConstIterator it = argList.constBegin() ; it != end ; ++it) {
+ for (QList<int>::ConstIterator it = argList.constBegin(); it != end; ++it) {
// setup temp files with check for duplicate %n's
if ((*it) != lastSeen) {
QTemporaryFile *tempFile = new QTemporaryFile();
diff --git a/mailcommon/src/filter/filteractions/filteractionwithfolder.cpp b/mailcommon/src/filter/filteractions/filteractionwithfolder.cpp
index 422b250..b7f5c8b 100644
--- a/mailcommon/src/filter/filteractions/filteractionwithfolder.cpp
+++ b/mailcommon/src/filter/filteractions/filteractionwithfolder.cpp
@@ -66,7 +66,7 @@ void FilterActionWithFolder::clearParamWidget(QWidget *paramWidget) const
static_cast<FolderRequester *>(paramWidget)->setCollection(CommonKernel->draftsCollectionFolder());
}
-bool FilterActionWithFolder::argsFromStringInteractive(const QString &argsStr , const QString &name)
+bool FilterActionWithFolder::argsFromStringInteractive(const QString &argsStr, const QString &name)
{
bool needUpdate = false;
argsFromString(argsStr);
diff --git a/mailcommon/src/filter/filterimporter/filterimporterthunderbird.cpp b/mailcommon/src/filter/filterimporter/filterimporterthunderbird.cpp
index ffe5218..0f1de74 100644
--- a/mailcommon/src/filter/filterimporter/filterimporterthunderbird.cpp
+++ b/mailcommon/src/filter/filterimporter/filterimporterthunderbird.cpp
@@ -25,14 +25,14 @@
using namespace MailCommon;
-FilterImporterThunderbird::FilterImporterThunderbird(QFile *file , bool interactive)
+FilterImporterThunderbird::FilterImporterThunderbird(QFile *file, bool interactive)
: FilterImporterAbstract(interactive)
{
QTextStream stream(file);
readStream(stream);
}
-FilterImporterThunderbird::FilterImporterThunderbird(QString string , bool interactive)
+FilterImporterThunderbird::FilterImporterThunderbird(QString string, bool interactive)
: FilterImporterAbstract(interactive)
{
QTextStream stream(&string);
diff --git a/mailcommon/src/filter/filterimporterexporter.h b/mailcommon/src/filter/filterimporterexporter.h
index 2931948..e856914 100644
--- a/mailcommon/src/filter/filterimporterexporter.h
+++ b/mailcommon/src/filter/filterimporterexporter.h
@@ -82,7 +82,7 @@ public:
* is asked from the user. The list to export is also
* presented for confirmation/selection.
*/
- void exportFilters(const QList<MailFilter *> &filters , const QUrl &fileName = QUrl(), bool saveAll = false);
+ void exportFilters(const QList<MailFilter *> &filters, const QUrl &fileName = QUrl(), bool saveAll = false);
/**
* Imports filters. Ask the user where to import them from
diff --git a/mailcommon/src/filter/kmfilterlistbox.h b/mailcommon/src/filter/kmfilterlistbox.h
index 30f7bf4..db1f131 100644
--- a/mailcommon/src/filter/kmfilterlistbox.h
+++ b/mailcommon/src/filter/kmfilterlistbox.h
@@ -107,7 +107,7 @@ public:
* @param closeAfterSaving If true user is given option to continue editing
* after being warned about invalid filters. Otherwise, user is just warned.
*/
- QList<MailCommon::MailFilter *> filtersForSaving(bool closeAfterSaving , bool &wasCanceled) const;
+ QList<MailCommon::MailFilter *> filtersForSaving(bool closeAfterSaving, bool &wasCanceled) const;
QStringList selectedFilterId(SearchRule::RequiredPart &requiredPart, const QString &resource) const;
diff --git a/mailcommon/src/filter/mailfilter.cpp b/mailcommon/src/filter/mailfilter.cpp
index 759c40e..8878c64 100644
--- a/mailcommon/src/filter/mailfilter.cpp
+++ b/mailcommon/src/filter/mailfilter.cpp
@@ -102,7 +102,7 @@ MailFilter::MailFilter(const MailFilter &aFilter)
mAccounts.clear();
QStringList::ConstIterator it2;
QStringList::ConstIterator end2 = aFilter.mAccounts.constEnd();
- for (it2 = aFilter.mAccounts.constBegin() ; it2 != end2 ; ++it2) {
+ for (it2 = aFilter.mAccounts.constBegin(); it2 != end2; ++it2) {
mAccounts.append(*it2);
}
}
@@ -128,7 +128,7 @@ MailFilter::ReturnCode MailFilter::execActions(ItemContext &context, bool &stopI
QList<FilterAction *>::const_iterator it(mActions.constBegin());
QList<FilterAction *>::const_iterator end(mActions.constEnd());
- for (; it != end ; ++it) {
+ for (; it != end; ++it) {
if (FilterLog::instance()->isLogging()) {
const QString logText(i18n("<b>Applying filter action:</b> %1",
@@ -249,7 +249,7 @@ SearchRule::RequiredPart MailFilter::requiredPart(const QString &id) const
}
if (pattern()) {
- requiredPart = qMax(requiredPart, (int)pattern()->requiredPart()) ; // no pattern means always matches?
+ requiredPart = qMax(requiredPart, (int)pattern()->requiredPart()); // no pattern means always matches?
}
int requiredPartByActions = SearchRule::Envelope;
@@ -412,11 +412,11 @@ bool MailFilter::readConfig(const KConfigGroup &config, bool interactive)
int numActions = config.readEntry("actions", 0);
if (numActions > FILTER_MAX_ACTIONS) {
- numActions = FILTER_MAX_ACTIONS ;
+ numActions = FILTER_MAX_ACTIONS;
KMessageBox::information(0, i18n("<qt>Too many filter actions in filter rule <b>%1</b>.</qt>", mPattern.name()));
}
- for (int i = 0 ; i < numActions ; ++i) {
+ for (int i = 0; i < numActions; ++i) {
actName.sprintf("action-name-%d", i);
argsName.sprintf("action-args-%d", i);
// get the action description...
@@ -476,7 +476,7 @@ void MailFilter::generateSieveScript(QStringList &requires, QString &code)
code += QLatin1String(")\n{\n");
bool firstAction = true;
- for (it = mActions.constBegin() ; it != end ; ++it) {
+ for (it = mActions.constBegin(); it != end; ++it) {
//Add endline here.
if (firstAction) {
firstAction = false;
@@ -532,7 +532,7 @@ void MailFilter::writeConfig(KConfigGroup &config, bool exportFilter) const
QList<FilterAction *>::const_iterator it;
QList<FilterAction *>::const_iterator end(mActions.constEnd());
- for (i = 0, it = mActions.constBegin() ; it != end ; ++it, ++i) {
+ for (i = 0, it = mActions.constBegin(); it != end; ++it, ++i) {
config.writeEntry(key.sprintf("action-name-%d", i),
(*it)->name());
config.writeEntry(key.sprintf("action-args-%d", i),
@@ -604,7 +604,7 @@ const QString MailFilter::asString() const
QList<FilterAction *>::const_iterator it(mActions.constBegin());
QList<FilterAction *>::const_iterator end(mActions.constEnd());
- for (; it != end ; ++it) {
+ for (; it != end; ++it) {
result += " action: ";
result += (*it)->label();
result += ' ';
@@ -635,7 +635,7 @@ const QString MailFilter::asString() const
if (mAccounts.isEmpty()) {
result += " None";
} else {
- for (it2 = mAccounts.begin() ; it2 != mAccounts.end() ; ++it2) {
+ for (it2 = mAccounts.begin(); it2 != mAccounts.end(); ++it2) {
if (Akonadi::AgentManager::self()->instance(*it2).isValid()) {
result += ' ' + Akonadi::AgentManager::self()->instance(*it2).name();
}
diff --git a/mailcommon/src/filter/mailfilter.h b/mailcommon/src/filter/mailfilter.h
index 38dac1d..edb955f 100644
--- a/mailcommon/src/filter/mailfilter.h
+++ b/mailcommon/src/filter/mailfilter.h
@@ -103,7 +103,7 @@ public:
true if the caller may apply other filters and false if he shall
stop the filtering of this message.
*/
- ReturnCode execActions(ItemContext &context, bool &stopIt , bool applyOnOutbound) const ;
+ ReturnCode execActions(ItemContext &context, bool &stopIt, bool applyOnOutbound) const;
/**
* Returns the required part from the item that is needed for the filter to
diff --git a/mailcommon/src/filter/soundtestwidget.cpp b/mailcommon/src/filter/soundtestwidget.cpp
index 8a04cad..91f5d73 100644
--- a/mailcommon/src/filter/soundtestwidget.cpp
+++ b/mailcommon/src/filter/soundtestwidget.cpp
@@ -106,7 +106,7 @@ void SoundTestWidget::playSound()
{
const QString parameter = m_urlRequester->lineEdit()->text();
if (parameter.isEmpty()) {
- return ;
+ return;
}
const QString file = QStringLiteral("file:");
diff --git a/mailcommon/src/folder/accountconfigorderdialog.cpp b/mailcommon/src/folder/accountconfigorderdialog.cpp
index f1fd834..3561467 100644
--- a/mailcommon/src/folder/accountconfigorderdialog.cpp
+++ b/mailcommon/src/folder/accountconfigorderdialog.cpp
@@ -167,7 +167,7 @@ void AccountConfigOrderDialog::slotMoveDown()
QListWidgetItem *item = d->mListAccount->takeItem(pos);
// now selected item is at idx(idx-1), so
// insert the other item at idx, ie. above(below).
- d->mListAccount->insertItem(pos + 1 , item);
+ d->mListAccount->insertItem(pos + 1, item);
d->mListAccount->blockSignals(false);
d->mListAccount->setCurrentRow(pos + 1);
}
diff --git a/mailcommon/src/folder/folderrequester.cpp b/mailcommon/src/folder/folderrequester.cpp
index d6613af..068adbe 100644
--- a/mailcommon/src/folder/folderrequester.cpp
+++ b/mailcommon/src/folder/folderrequester.cpp
@@ -94,7 +94,7 @@ FolderRequester::FolderRequester(QWidget *parent)
//-----------------------------------------------------------------------------
void FolderRequester::slotOpenDialog()
{
- FolderSelectionDialog::SelectionFolderOptions options = FolderSelectionDialog::EnableCheck ;
+ FolderSelectionDialog::SelectionFolderOptions options = FolderSelectionDialog::EnableCheck;
options |= FolderSelectionDialog::HideVirtualFolder;
options |= FolderSelectionDialog::NotUseGlobalSettings;
if (d->mNotCreateNewFolder) {
diff --git a/mailcommon/src/folder/folderrequester.h b/mailcommon/src/folder/folderrequester.h
index 1628e3f..1aa16de 100644
--- a/mailcommon/src/folder/folderrequester.h
+++ b/mailcommon/src/folder/folderrequester.h
@@ -79,7 +79,7 @@ public:
* Presets the folder to the collection @p collection.
* Disable fetchcollection when not necessary @p fetchCollection
*/
- void setCollection(const Akonadi::Collection &collection , bool fetchCollection = true);
+ void setCollection(const Akonadi::Collection &collection, bool fetchCollection = true);
/**
* Returns @c true if there's a valid collection set on this widget.
diff --git a/mailcommon/src/search/searchpatternedit.cpp b/mailcommon/src/search/searchpatternedit.cpp
index 832bebc..69c9ddc 100644
--- a/mailcommon/src/search/searchpatternedit.cpp
+++ b/mailcommon/src/search/searchpatternedit.cpp
@@ -86,7 +86,7 @@ static const int SpecialRuleFieldsCount =
//=============================================================================
SearchRuleWidget::SearchRuleWidget(QWidget *parent, SearchRule::Ptr aRule,
- SearchPatternEdit::SearchPatternEditOptions options ,
+ SearchPatternEdit::SearchPatternEditOptions options,
SearchPatternEdit::SearchModeType modeType)
: QWidget(parent),
mRuleField(0),
@@ -462,7 +462,7 @@ void SearchRuleWidgetLister::setRuleList(QList<SearchRule::Ptr> *aList)
if (superfluousItems > 0) {
qCDebug(MAILCOMMON_LOG) << "Clipping rule list to" << widgetsMaximum() << "items!";
- for (; superfluousItems ; superfluousItems--) {
+ for (; superfluousItems; superfluousItems--) {
mRuleList->removeLast();
}
}
@@ -527,7 +527,7 @@ void SearchRuleWidgetLister::updateAddRemoveButton()
}
QList<QWidget *>::ConstIterator wIt = widgetList.constBegin();
QList<QWidget *>::ConstIterator wEnd = widgetList.constEnd();
- for (; wIt != wEnd ; ++wIt) {
+ for (; wIt != wEnd; ++wIt) {
SearchRuleWidget *w = qobject_cast<SearchRuleWidget *>(*wIt);
w->updateAddRemoveButton(addButtonEnabled, removeButtonEnabled);
}
diff --git a/mailcommon/src/search/searchrule/searchrulestatus.h b/mailcommon/src/search/searchrule/searchrulestatus.h
index 04c7b18..b1bab59 100644
--- a/mailcommon/src/search/searchrule/searchrulestatus.h
+++ b/mailcommon/src/search/searchrule/searchrulestatus.h
@@ -92,7 +92,7 @@ public:
explicit SearchRuleStatus(Akonadi::MessageStatus status,
Function function = FuncContains);
- bool isEmpty() const Q_DECL_OVERRIDE ;
+ bool isEmpty() const Q_DECL_OVERRIDE;
bool matches(const Akonadi::Item &item) const Q_DECL_OVERRIDE;
/**
diff --git a/mailcommon/src/search/searchrule/searchrulestring.cpp b/mailcommon/src/search/searchrule/searchrulestring.cpp
index 42bd95c..0b8a9d2 100644
--- a/mailcommon/src/search/searchrule/searchrulestring.cpp
+++ b/mailcommon/src/search/searchrule/searchrulestring.cpp
@@ -132,7 +132,7 @@ bool SearchRuleString::matches(const Akonadi::Item &item) const
return