Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
bfa3662f
Commit
bfa3662f
authored
May 09, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KGlobal::locale() -> KLocale::global()
parent
23024943
Changes
134
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
134 changed files
with
421 additions
and
342 deletions
+421
-342
agents/archivemailagent/archivemailagent.cpp
agents/archivemailagent/archivemailagent.cpp
+3
-2
agents/archivemailagent/archivemaildialog.cpp
agents/archivemailagent/archivemaildialog.cpp
+2
-2
agents/mailfilteragent/filterlogdialog.cpp
agents/mailfilteragent/filterlogdialog.cpp
+3
-2
agents/mailfilteragent/filtermanager.cpp
agents/mailfilteragent/filtermanager.cpp
+2
-1
agents/notesagent/notesagent.cpp
agents/notesagent/notesagent.cpp
+1
-1
agents/notesagent/notesagentalarmdialog.cpp
agents/notesagent/notesagentalarmdialog.cpp
+2
-2
agents/sendlateragent/sendlateragent.cpp
agents/sendlateragent/sendlateragent.cpp
+1
-1
akonadiconsole/jobtrackermodel.cpp
akonadiconsole/jobtrackermodel.cpp
+1
-1
akonadiconsole/notificationmodel.cpp
akonadiconsole/notificationmodel.cpp
+1
-1
akregator/src/articleformatter.cpp
akregator/src/articleformatter.cpp
+5
-4
akregator/src/articlelistview.cpp
akregator/src/articlelistview.cpp
+1
-1
akregator/src/articlemodel.cpp
akregator/src/articlemodel.cpp
+1
-1
calendarsupport/eventarchiver.cpp
calendarsupport/eventarchiver.cpp
+3
-2
calendarsupport/printing/calprintdefaultplugins.cpp
calendarsupport/printing/calprintdefaultplugins.cpp
+8
-7
calendarsupport/printing/calprintpluginbase.cpp
calendarsupport/printing/calprintpluginbase.cpp
+16
-15
calendarsupport/printing/yearprint.cpp
calendarsupport/printing/yearprint.cpp
+2
-1
calendarviews/agenda/agenda.cpp
calendarviews/agenda/agenda.cpp
+1
-1
calendarviews/agenda/agendaitem.cpp
calendarviews/agenda/agendaitem.cpp
+7
-6
calendarviews/agenda/agendaview.cpp
calendarviews/agenda/agendaview.cpp
+3
-2
calendarviews/agenda/timelabels.cpp
calendarviews/agenda/timelabels.cpp
+5
-4
calendarviews/list/listview.cpp
calendarviews/list/listview.cpp
+4
-3
calendarviews/month/monthscene.cpp
calendarviews/month/monthscene.cpp
+3
-2
calendarviews/month/monthview.cpp
calendarviews/month/monthview.cpp
+2
-1
calendarviews/timeline/timelineview.cpp
calendarviews/timeline/timelineview.cpp
+2
-1
calendarviews/timespent/timespentview.cpp
calendarviews/timespent/timespentview.cpp
+7
-6
calendarviews/whatsnext/whatsnextview.cpp
calendarviews/whatsnext/whatsnextview.cpp
+9
-8
console/konsolekalendar/konsolekalendarexports.cpp
console/konsolekalendar/konsolekalendarexports.cpp
+13
-12
incidenceeditor-ng/attachmenteditdialog.cpp
incidenceeditor-ng/attachmenteditdialog.cpp
+2
-1
incidenceeditor-ng/conflictresolver.cpp
incidenceeditor-ng/conflictresolver.cpp
+2
-1
incidenceeditor-ng/freebusyganttproxymodel.cpp
incidenceeditor-ng/freebusyganttproxymodel.cpp
+2
-2
incidenceeditor-ng/freebusyitemmodel.cpp
incidenceeditor-ng/freebusyitemmodel.cpp
+2
-2
incidenceeditor-ng/freeperiodmodel.cpp
incidenceeditor-ng/freeperiodmodel.cpp
+11
-10
incidenceeditor-ng/incidencerecurrence.cpp
incidenceeditor-ng/incidencerecurrence.cpp
+6
-5
incidenceeditor-ng/ktimezonecombobox.cpp
incidenceeditor-ng/ktimezonecombobox.cpp
+2
-2
incidenceeditor-ng/schedulingdialog.cpp
incidenceeditor-ng/schedulingdialog.cpp
+3
-2
kaddressbook/printing/detailled/detailledstyle.cpp
kaddressbook/printing/detailled/detailledstyle.cpp
+2
-1
kaddressbook/printing/grantlee/contactgrantleeprintobject.cpp
...ressbook/printing/grantlee/contactgrantleeprintobject.cpp
+2
-2
kaddressbook/printing/ringbinder/ringbinderstyle.cpp
kaddressbook/printing/ringbinder/ringbinderstyle.cpp
+2
-1
kaddressbookgrantlee/formatter/grantleecontactformatter.cpp
kaddressbookgrantlee/formatter/grantleecontactformatter.cpp
+5
-5
kalarm/alarmtime.cpp
kalarm/alarmtime.cpp
+2
-1
kalarm/autostart/autostart.cpp
kalarm/autostart/autostart.cpp
+2
-1
kalarm/birthdaymodel.cpp
kalarm/birthdaymodel.cpp
+2
-1
kalarm/editdlg.cpp
kalarm/editdlg.cpp
+3
-2
kalarm/kamail.cpp
kalarm/kamail.cpp
+2
-1
kalarm/lib/kalocale.cpp
kalarm/lib/kalocale.cpp
+3
-2
kalarm/lib/timeedit.cpp
kalarm/lib/timeedit.cpp
+2
-1
kalarm/lib/timezonecombo.cpp
kalarm/lib/timezonecombo.cpp
+2
-1
kalarm/mainwindow.cpp
kalarm/mainwindow.cpp
+6
-5
kalarm/messagewin.cpp
kalarm/messagewin.cpp
+3
-2
kalarm/prefdlg.cpp
kalarm/prefdlg.cpp
+3
-2
kalarm/recurrenceedit.cpp
kalarm/recurrenceedit.cpp
+6
-5
kalarm/rtcwakeaction.cpp
kalarm/rtcwakeaction.cpp
+2
-1
kalarm/traywindow.cpp
kalarm/traywindow.cpp
+2
-1
kleopatra/crypto/decryptverifytask.cpp
kleopatra/crypto/decryptverifytask.cpp
+1
-1
kleopatra/newcertificatewizard/newcertificatewizard.cpp
kleopatra/newcertificatewizard/newcertificatewizard.cpp
+2
-1
kleopatra/utils/formatting.cpp
kleopatra/utils/formatting.cpp
+2
-2
kmail/CMakeLists.txt
kmail/CMakeLists.txt
+1
-1
kmail/collectionpage/collectionmaintenancepage.cpp
kmail/collectionpage/collectionmaintenancepage.cpp
+1
-1
kmail/collectionpage/collectionquotapage_p.cpp
kmail/collectionpage/collectionquotapage_p.cpp
+1
-1
kmail/editor/attachmentview.cpp
kmail/editor/attachmentview.cpp
+1
-1
kmail/editor/codecmanager.cpp
kmail/editor/codecmanager.cpp
+1
-1
kmail/kmkernel.cpp
kmail/kmkernel.cpp
+3
-2
kmail/kmstartup.cpp
kmail/kmstartup.cpp
+2
-1
kmail/searchdialog/kmsearchmessagemodel.cpp
kmail/searchdialog/kmsearchmessagemodel.cpp
+5
-4
kmail/tests/CMakeLists.txt
kmail/tests/CMakeLists.txt
+2
-2
knotes/print/knoteprintobject.cpp
knotes/print/knoteprintobject.cpp
+2
-2
kontact/plugins/korganizer/summaryeventinfo.cpp
kontact/plugins/korganizer/summaryeventinfo.cpp
+3
-3
kontact/plugins/korganizer/tests/summaryeventtest.cpp
kontact/plugins/korganizer/tests/summaryeventtest.cpp
+3
-2
kontact/plugins/korganizer/todosummarywidget.cpp
kontact/plugins/korganizer/todosummarywidget.cpp
+1
-1
kontact/plugins/specialdates/sdsummarywidget.cpp
kontact/plugins/specialdates/sdsummarywidget.cpp
+2
-2
kontact/plugins/summary/summaryview_part.cpp
kontact/plugins/summary/summaryview_part.cpp
+2
-1
korgac/alarmdialog.cpp
korgac/alarmdialog.cpp
+2
-2
korganizer/actionmanager.cpp
korganizer/actionmanager.cpp
+2
-1
korganizer/calendarview.cpp
korganizer/calendarview.cpp
+7
-6
korganizer/datenavigator.cpp
korganizer/datenavigator.cpp
+4
-3
korganizer/htmlexportjob.cpp
korganizer/htmlexportjob.cpp
+4
-3
korganizer/kdatenavigator.cpp
korganizer/kdatenavigator.cpp
+3
-2
korganizer/kodaymatrix.cpp
korganizer/kodaymatrix.cpp
+3
-2
korganizer/koglobals.cpp
korganizer/koglobals.cpp
+2
-1
korganizer/koprefsdialog.cpp
korganizer/koprefsdialog.cpp
+7
-6
korganizer/plugins/hebrew/configdialog.cpp
korganizer/plugins/hebrew/configdialog.cpp
+1
-1
korganizer/plugins/hebrew/hebrew.cpp
korganizer/plugins/hebrew/hebrew.cpp
+2
-1
korganizer/tests/testkodaymatrix.cpp
korganizer/tests/testkodaymatrix.cpp
+4
-3
libkdepim/ldap/ldapsearchdialog.cpp
libkdepim/ldap/ldapsearchdialog.cpp
+2
-1
libkdepim/misc/broadcaststatus.cpp
libkdepim/misc/broadcaststatus.cpp
+1
-1
libkdepim/widgets/kweekdaycheckcombo.cpp
libkdepim/widgets/kweekdaycheckcombo.cpp
+6
-6
libkpgp/kpgpui.cpp
libkpgp/kpgpui.cpp
+3
-2
libksieve/ksieveui/vacation/vacationutils.cpp
libksieve/ksieveui/vacation/vacationutils.cpp
+1
-1
messagecomposer/attachment/attachmentmodel.cpp
messagecomposer/attachment/attachmentmodel.cpp
+2
-2
messagecomposer/composer/composerlineedit.cpp
messagecomposer/composer/composerlineedit.cpp
+2
-1
messagecomposer/tests/messagefactorytest.cpp
messagecomposer/tests/messagefactorytest.cpp
+11
-10
messagecore/attachment/attachmentfromurljob.cpp
messagecore/attachment/attachmentfromurljob.cpp
+1
-1
messagecore/attachment/attachmentpropertiesdialog.cpp
messagecore/attachment/attachmentpropertiesdialog.cpp
+3
-2
messagelist/core/model.cpp
messagelist/core/model.cpp
+6
-5
messageviewer/adblock/networkaccessmanager.cpp
messageviewer/adblock/networkaccessmanager.cpp
+2
-1
messageviewer/header/headerstyle_util.cpp
messageviewer/header/headerstyle_util.cpp
+3
-2
messageviewer/viewer/mimetreemodel.cpp
messageviewer/viewer/mimetreemodel.cpp
+2
-1
messageviewer/viewer/nodehelper.cpp
messageviewer/viewer/nodehelper.cpp
+4
-3
messageviewer/viewer/objecttreeparser.cpp
messageviewer/viewer/objecttreeparser.cpp
+4
-3
mobile/calendar/agendaviewitem.cpp
mobile/calendar/agendaviewitem.cpp
+3
-3
mobile/calendar/configwidget.cpp
mobile/calendar/configwidget.cpp
+2
-1
mobile/calendar/eventlistproxy.cpp
mobile/calendar/eventlistproxy.cpp
+1
-1
mobile/calendar/timelineviewitem.cpp
mobile/calendar/timelineviewitem.cpp
+3
-3
mobile/lib/kdeclarativemainview.cpp
mobile/lib/kdeclarativemainview.cpp
+1
-1
mobile/mail/mailthreadgroupercomparator.cpp
mobile/mail/mailthreadgroupercomparator.cpp
+5
-4
mobile/mail/messagelistproxy.cpp
mobile/mail/messagelistproxy.cpp
+7
-7
noteshared/editor/noteeditorutils.cpp
noteshared/editor/noteeditorutils.cpp
+1
-1
noteshared/job/createnewnotejob.cpp
noteshared/job/createnewnotejob.cpp
+3
-3
noteshared/network/notesnetworkreceiver.cpp
noteshared/network/notesnetworkreceiver.cpp
+2
-1
pimcommon/autocorrection/autocorrection.cpp
pimcommon/autocorrection/autocorrection.cpp
+3
-2
pimcommon/autocorrection/autocorrectionlanguage.cpp
pimcommon/autocorrection/autocorrectionlanguage.cpp
+1
-1
pimcommon/storageservice/box/boxstorageservice.cpp
pimcommon/storageservice/box/boxstorageservice.cpp
+3
-3
pimcommon/storageservice/dropbox/dropboxstorageservice.cpp
pimcommon/storageservice/dropbox/dropboxstorageservice.cpp
+3
-3
pimcommon/storageservice/gdrive/gdrivestorageservice.cpp
pimcommon/storageservice/gdrive/gdrivestorageservice.cpp
+3
-3
pimcommon/storageservice/settings/storageservicesettingswidget.cpp
.../storageservice/settings/storageservicesettingswidget.cpp
+3
-3
pimcommon/storageservice/webdav/webdavstorageservice.cpp
pimcommon/storageservice/webdav/webdavstorageservice.cpp
+3
-3
pimcommon/storageservice/widgets/storageserviceprogresswidget.cpp
...n/storageservice/widgets/storageserviceprogresswidget.cpp
+1
-1
pimcommon/storageservice/widgets/storageservicetreewidget.cpp
...ommon/storageservice/widgets/storageservicetreewidget.cpp
+3
-3
pimcommon/storageservice/yousendit/yousenditstorageservice.cpp
...mmon/storageservice/yousendit/yousenditstorageservice.cpp
+4
-4
pimprint/calendar/calprintbase.cpp
pimprint/calendar/calprintbase.cpp
+13
-12
pimprint/calendar/calprintday.cpp
pimprint/calendar/calprintday.cpp
+2
-1
pimprint/calendar/calprinttodos.cpp
pimprint/calendar/calprinttodos.cpp
+1
-1
pimprint/calendar/calprintweek.cpp
pimprint/calendar/calprintweek.cpp
+1
-1
pimsettingexporter/pimsettingexporterwindow.cpp
pimsettingexporter/pimsettingexporterwindow.cpp
+3
-2
plugins/kaddressbook/editorpages/cryptopageplugin.cpp
plugins/kaddressbook/editorpages/cryptopageplugin.cpp
+3
-2
plugins/ktexteditor/ktexteditorkabcbridge.cpp
plugins/ktexteditor/ktexteditorkabcbridge.cpp
+2
-1
plugins/messageviewer/bodypartformatter/application_ms-tnef.cpp
...s/messageviewer/bodypartformatter/application_ms-tnef.cpp
+2
-1
plugins/messageviewer/bodypartformatter/text_calendar.cpp
plugins/messageviewer/bodypartformatter/text_calendar.cpp
+2
-1
plugins/messageviewer/bodypartformatter/text_vcard.cpp
plugins/messageviewer/bodypartformatter/text_vcard.cpp
+1
-1
plugins/messageviewer/bodypartformatter/text_xdiff.cpp
plugins/messageviewer/bodypartformatter/text_xdiff.cpp
+2
-1
storageservicemanager/storageserviceaccountinfodialog.cpp
storageservicemanager/storageserviceaccountinfodialog.cpp
+3
-3
storageservicemanager/storageservicetreewidget.cpp
storageservicemanager/storageservicetreewidget.cpp
+1
-1
storageservicemanager/storageservicewarning.cpp
storageservicemanager/storageservicewarning.cpp
+1
-1
templateparser/templateparser.cpp
templateparser/templateparser.cpp
+11
-10
No files found.
agents/archivemailagent/archivemailagent.cpp
View file @
bfa3662f
...
...
@@ -31,6 +31,7 @@
#include <QTimer>
#include <QPointer>
#include <KLocale>
//#define DEBUG_ARCHIVEMAILAGENT 1
...
...
@@ -39,8 +40,8 @@ ArchiveMailAgent::ArchiveMailAgent( const QString &id )
{
mArchiveManager
=
new
ArchiveMailManager
(
this
);
connect
(
mArchiveManager
,
SIGNAL
(
needUpdateConfigDialogBox
()),
SIGNAL
(
needUpdateConfigDialogBox
()));
//QT5 K
Global::locale
()->insertCatalog( QLatin1String("akonadi_archivemail_agent") );
//QT5 K
Global::locale
()->insertCatalog( QLatin1String("libmailcommon") );
//QT5 K
Locale::global
()->insertCatalog( QLatin1String("akonadi_archivemail_agent") );
//QT5 K
Locale::global
()->insertCatalog( QLatin1String("libmailcommon") );
Akonadi
::
Monitor
*
collectionMonitor
=
new
Akonadi
::
Monitor
(
this
);
collectionMonitor
->
fetchCollection
(
true
);
...
...
agents/archivemailagent/archivemaildialog.cpp
View file @
bfa3662f
...
...
@@ -244,7 +244,7 @@ void ArchiveMailWidget::createOrUpdateItem(ArchiveMailInfo *info, ArchiveMailIte
item
->
setCheckState
(
ArchiveMailWidget
::
Name
,
info
->
isEnabled
()
?
Qt
::
Checked
:
Qt
::
Unchecked
);
item
->
setText
(
ArchiveMailWidget
::
StorageDirectory
,
info
->
url
().
toLocalFile
());
if
(
info
->
lastDateSaved
().
isValid
())
{
item
->
setText
(
ArchiveMailWidget
::
LastArchiveDate
,
K
Global
::
locale
()
->
formatDate
(
info
->
lastDateSaved
()));
item
->
setText
(
ArchiveMailWidget
::
LastArchiveDate
,
K
Locale
::
global
()
->
formatDate
(
info
->
lastDateSaved
()));
updateDiffDate
(
item
,
info
);
}
else
{
item
->
setBackgroundColor
(
ArchiveMailWidget
::
NextArchive
,
Qt
::
green
);
...
...
@@ -263,7 +263,7 @@ void ArchiveMailWidget::updateDiffDate(ArchiveMailItem *item, ArchiveMailInfo *i
else
item
->
setBackgroundColor
(
ArchiveMailWidget
::
NextArchive
,
Qt
::
lightGray
);
}
else
{
item
->
setToolTip
(
ArchiveMailWidget
::
NextArchive
,
i18n
(
"Archive will be done %1"
,
K
Global
::
locale
()
->
formatDate
(
diffDate
)));
item
->
setToolTip
(
ArchiveMailWidget
::
NextArchive
,
i18n
(
"Archive will be done %1"
,
K
Locale
::
global
()
->
formatDate
(
diffDate
)));
}
}
...
...
agents/mailfilteragent/filterlogdialog.cpp
View file @
bfa3662f
...
...
@@ -51,14 +51,15 @@
#include <errno.h>
#include <KSharedConfig>
#include <KLocale>
using
namespace
MailCommon
;
FilterLogDialog
::
FilterLogDialog
(
QWidget
*
parent
)
:
KDialog
(
parent
),
mIsInitialized
(
false
)
{
KGlobal
::
locale
()
->
insertCatalog
(
QLatin1String
(
"akonadi_mailfilter_agent"
));
KGlobal
::
locale
()
->
insertCatalog
(
QLatin1String
(
"libpimcommon"
));
//QT5 KLocale::global
()->insertCatalog(QLatin1String("akonadi_mailfilter_agent"));
//QT5 KLocale::global
()->insertCatalog(QLatin1String("libpimcommon"));
setCaption
(
i18n
(
"Filter Log Viewer"
)
);
setButtons
(
User1
|
User2
|
Close
);
setWindowIcon
(
KIcon
(
QLatin1String
(
"view-filter"
)
)
);
...
...
agents/mailfilteragent/filtermanager.cpp
View file @
bfa3662f
...
...
@@ -50,6 +50,7 @@
#include <boost/bind.hpp>
#include <errno.h>
#include <KSharedConfig>
#include <KLocale>
using
namespace
MailCommon
;
...
...
@@ -256,7 +257,7 @@ bool FilterManager::Private::beginFiltering( const Akonadi::Item &item ) const
const
QString
subject
=
msg
->
subject
()
->
asUnicodeString
();
const
QString
from
=
msg
->
from
()
->
asUnicodeString
();
const
KDateTime
dateTime
=
msg
->
date
()
->
dateTime
();
const
QString
date
=
K
Global
::
locale
()
->
formatDateTime
(
dateTime
,
KLocale
::
LongDate
);
const
QString
date
=
K
Locale
::
global
()
->
formatDateTime
(
dateTime
,
KLocale
::
LongDate
);
const
QString
logText
(
i18n
(
"<b>Begin filtering on message
\"
%1
\"
from
\"
%2
\"
at
\"
%3
\"
:</b>"
,
subject
,
from
,
date
)
);
FilterLog
::
instance
()
->
add
(
logText
,
FilterLog
::
PatternDescription
);
...
...
agents/notesagent/notesagent.cpp
View file @
bfa3662f
...
...
@@ -42,7 +42,7 @@ NotesAgent::NotesAgent(const QString &id)
:
Akonadi
::
AgentBase
(
id
)
{
mNotesManager
=
new
NotesManager
(
this
);
KGlobal
::
locale
()
->
insertCatalog
(
QLatin1String
(
"akonadi_notes_agent"
)
);
//QT5 KLocale::global
()->insertCatalog( QLatin1String("akonadi_notes_agent") );
new
NotesAgentAdaptor
(
this
);
Akonadi
::
DBusConnectionPool
::
threadConnection
().
registerObject
(
QLatin1String
(
"/NotesAgent"
),
this
,
QDBusConnection
::
ExportAdaptors
);
Akonadi
::
DBusConnectionPool
::
threadConnection
().
registerService
(
QLatin1String
(
"org.freedesktop.Akonadi.NotesAgent"
)
);
...
...
agents/notesagent/notesagentalarmdialog.cpp
View file @
bfa3662f
...
...
@@ -55,7 +55,7 @@ NotesAgentAlarmDialog::NotesAgentAlarmDialog(QWidget *parent)
w
->
setLayout
(
vbox
);
mCurrentDateTime
=
new
QLabel
;
mCurrentDateTime
->
setText
(
K
Global
::
locale
()
->
formatDateTime
(
QDateTime
::
currentDateTime
()));
mCurrentDateTime
->
setText
(
K
Locale
::
global
()
->
formatDateTime
(
QDateTime
::
currentDateTime
()));
vbox
->
addWidget
(
mCurrentDateTime
);
QLabel
*
lab
=
new
QLabel
(
i18n
(
"The following notes triggered alarms:"
));
...
...
@@ -124,7 +124,7 @@ void NotesAgentAlarmDialog::writeConfig()
void
NotesAgentAlarmDialog
::
addListAlarm
(
const
Akonadi
::
Item
::
List
&
lstAlarm
)
{
mListWidget
->
setNotes
(
lstAlarm
);
mCurrentDateTime
->
setText
(
K
Global
::
locale
()
->
formatDateTime
(
QDateTime
::
currentDateTime
()));
mCurrentDateTime
->
setText
(
K
Locale
::
global
()
->
formatDateTime
(
QDateTime
::
currentDateTime
()));
}
void
NotesAgentAlarmDialog
::
slotItemDoubleClicked
(
QListWidgetItem
*
item
)
...
...
agents/sendlateragent/sendlateragent.cpp
View file @
bfa3662f
...
...
@@ -48,7 +48,7 @@ SendLaterAgent::SendLaterAgent(const QString &id)
{
mManager
=
new
SendLaterManager
(
this
);
connect
(
mManager
,
SIGNAL
(
needUpdateConfigDialogBox
()),
SIGNAL
(
needUpdateConfigDialogBox
()));
KGlobal
::
locale
()
->
insertCatalog
(
QLatin1String
(
"akonadi_sendlater_agent"
)
);
//QT5 KLocale::global
()->insertCatalog( QLatin1String("akonadi_sendlater_agent") );
new
SendLaterAgentAdaptor
(
this
);
Akonadi
::
DBusConnectionPool
::
threadConnection
().
registerObject
(
QLatin1String
(
"/SendLaterAgent"
),
this
,
QDBusConnection
::
ExportAdaptors
);
Akonadi
::
DBusConnectionPool
::
threadConnection
().
registerService
(
QLatin1String
(
"org.freedesktop.Akonadi.SendLaterAgent"
)
);
...
...
akonadiconsole/jobtrackermodel.cpp
View file @
bfa3662f
...
...
@@ -133,7 +133,7 @@ int JobTrackerModel::columnCount(const QModelIndex & parent) const
static
QString
formatTimeWithMsec
(
const
QTime
&
time
)
{
return
QString
(
K
Global
::
locale
()
->
formatTime
(
time
,
true
)
return
QString
(
K
Locale
::
global
()
->
formatTime
(
time
,
true
)
+
QString
::
fromLatin1
(
".%1"
).
arg
(
time
.
msec
(),
3
,
10
,
QLatin1Char
(
'0'
)
)
);
}
...
...
akonadiconsole/notificationmodel.cpp
View file @
bfa3662f
...
...
@@ -244,7 +244,7 @@ QVariant NotificationModel::data( const QModelIndex &index, int role ) const
if
(
role
==
Qt
::
DisplayRole
)
{
switch
(
index
.
column
()
)
{
case
0
:
return
QString
(
K
Global
::
locale
()
->
formatTime
(
block
->
timestamp
.
time
(),
true
)
+
return
QString
(
K
Locale
::
global
()
->
formatTime
(
block
->
timestamp
.
time
(),
true
)
+
QString
::
fromLatin1
(
".%1"
).
arg
(
block
->
timestamp
.
time
().
msec
(),
3
,
10
,
QLatin1Char
(
'0'
)
)
);
case
1
:
return
block
->
nodes
.
count
();
...
...
akregator/src/articleformatter.cpp
View file @
bfa3662f
...
...
@@ -38,6 +38,7 @@
#include <QPaintDevice>
#include <QPalette>
#include <QString>
#include <KLocale>
using
namespace
boost
;
using
namespace
Syndication
;
...
...
@@ -54,11 +55,11 @@ namespace {
const
QString
type
=
enclosure
.
type
();
QString
inf
;
if
(
!
type
.
isEmpty
()
&&
length
>
0
)
inf
=
i18n
(
"(%1, %2)"
,
type
,
K
Global
::
locale
()
->
formatByteSize
(
length
)
);
inf
=
i18n
(
"(%1, %2)"
,
type
,
K
Locale
::
global
()
->
formatByteSize
(
length
)
);
else
if
(
!
type
.
isNull
()
)
inf
=
type
;
else
if
(
length
>
0
)
inf
=
K
Global
::
locale
()
->
formatByteSize
(
length
);
inf
=
K
Locale
::
global
()
->
formatByteSize
(
length
);
QString
str
=
i18n
(
"<a href=
\"
%1
\"
>%2</a> %3"
,
enclosure
.
url
(),
title
,
inf
);
return
str
;
}
...
...
@@ -189,7 +190,7 @@ QString DefaultNormalViewFormatter::formatArticle(const Article& article, IconOp
text
+=
QString
(
"<span class=
\"
header
\"
dir=
\"
%1
\"
>"
).
arg
(
Utils
::
directionOf
(
i18n
(
"Date"
)));
text
+=
QString
(
"%1:"
).
arg
(
i18n
(
"Date"
));
text
+=
"</span><span class=
\"
headertext
\"
>"
;
text
+=
K
Global
::
locale
()
->
formatDateTime
(
article
.
pubDate
(),
KLocale
::
FancyLongDate
)
+
"</span>
\n
"
;
// TODO: might need RTL?
text
+=
K
Locale
::
global
()
->
formatDateTime
(
article
.
pubDate
(),
KLocale
::
FancyLongDate
)
+
"</span>
\n
"
;
// TODO: might need RTL?
}
const
QString
author
=
article
.
authorAsHtml
();
if
(
!
author
.
isEmpty
())
...
...
@@ -385,7 +386,7 @@ QString DefaultCombinedViewFormatter::formatArticle(const Article& article, Icon
text
+=
QString
(
"<span class=
\"
header
\"
dir=
\"
%1
\"
>"
).
arg
(
Utils
::
directionOf
(
i18n
(
"Date"
)));
text
+=
QString
(
"%1:"
).
arg
(
i18n
(
"Date"
));
text
+=
"</span><span class=
\"
headertext
\"
>"
;
text
+=
K
Global
::
locale
()
->
formatDateTime
(
article
.
pubDate
(),
KLocale
::
FancyLongDate
)
+
"</span>
\n
"
;
// TODO: might need RTL?
text
+=
K
Locale
::
global
()
->
formatDateTime
(
article
.
pubDate
(),
KLocale
::
FancyLongDate
)
+
"</span>
\n
"
;
// TODO: might need RTL?
}
const
QString
author
=
article
.
authorAsHtml
();
...
...
akregator/src/articlelistview.cpp
View file @
bfa3662f
...
...
@@ -296,7 +296,7 @@ static int maxDateColumnWidth( const QFontMetrics &fm )
int
width
=
0
;
KDateTime
date
(
KDateTime
::
currentLocalDate
(),
QTime
(
23
,
59
)
);
for
(
int
x
=
0
;
x
<
10
;
x
++
,
date
=
date
.
addDays
(
-
1
)
)
{
QString
txt
=
' '
+
K
Global
::
locale
()
->
formatDateTime
(
date
,
KLocale
::
FancyShortDate
)
+
' '
;
QString
txt
=
' '
+
K
Locale
::
global
()
->
formatDateTime
(
date
,
KLocale
::
FancyShortDate
)
+
' '
;
width
=
qMax
(
width
,
fm
.
width
(
txt
)
);
}
return
width
;
...
...
akregator/src/articlemodel.cpp
View file @
bfa3662f
...
...
@@ -144,7 +144,7 @@ QVariant Akregator::ArticleModel::data( const QModelIndex& index, int role ) con
case
FeedTitleColumn
:
return
article
.
feed
()
?
article
.
feed
()
->
title
()
:
QVariant
();
case
DateColumn
:
return
K
Global
::
locale
()
->
formatDateTime
(
article
.
pubDate
(),
return
K
Locale
::
global
()
->
formatDateTime
(
article
.
pubDate
(),
KLocale
::
FancyShortDate
);
case
ItemTitleColumn
:
return
d
->
titleCache
[
row
];
...
...
calendarsupport/eventarchiver.cpp
View file @
bfa3662f
...
...
@@ -41,6 +41,7 @@
#include <KMessageBox>
#include <KTemporaryFile>
#include <KIO/NetAccess>
#include <KLocale>
using
namespace
KCalCore
;
using
namespace
KCalUtils
;
...
...
@@ -141,7 +142,7 @@ void EventArchiver::run( const Akonadi::ETMCalendar::Ptr &calendar,
if
(
withGUI
&&
errorIfNone
)
{
KMessageBox
::
information
(
widget
,
i18n
(
"There are no items before %1"
,
K
Global
::
locale
()
->
formatDate
(
limitDate
)
),
K
Locale
::
global
()
->
formatDate
(
limitDate
)
),
QLatin1String
(
"ArchiverNoIncidences"
)
);
}
return
;
...
...
@@ -173,7 +174,7 @@ void EventArchiver::deleteIncidences( Akonadi::IncidenceChanger *changer,
widget
,
i18n
(
"Delete all items before %1 without saving?
\n
"
"The following items will be deleted:"
,
K
Global
::
locale
()
->
formatDate
(
limitDate
)
),
K
Locale
::
global
()
->
formatDate
(
limitDate
)
),
incidenceStrs
,
i18n
(
"Delete Old Items"
),
KStandardGuiItem
::
del
()
);
if
(
result
!=
KMessageBox
::
Continue
)
{
...
...
calendarsupport/printing/calprintdefaultplugins.cpp
View file @
bfa3662f
...
...
@@ -45,6 +45,7 @@
#include <QDateTime>
#include <QPainter>
#include <QPrinter>
#include <KLocale>
using
namespace
CalendarSupport
;
...
...
@@ -317,7 +318,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
exceptString
=
i18nc
(
"except for listed dates"
,
" except"
);
for
(
int
i
=
0
;
i
<
recurs
->
exDates
().
size
();
++
i
)
{
exceptString
.
append
(
QLatin1String
(
" "
)
);
exceptString
.
append
(
K
Global
::
locale
()
->
formatDate
(
recurs
->
exDates
()[
i
],
exceptString
.
append
(
K
Locale
::
global
()
->
formatDate
(
recurs
->
exDates
()[
i
],
KLocale
::
ShortDate
)
);
}
}
...
...
@@ -518,26 +519,26 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if
(
todo
->
dtStart
().
isValid
()
)
{
datesString
+=
i18nc
(
"subitem start date"
,
"Start Date: %1
\n
"
,
K
Global
::
locale
()
->
formatDate
(
todo
->
dtStart
().
toTimeSpec
(
spec
).
date
(),
K
Locale
::
global
()
->
formatDate
(
todo
->
dtStart
().
toTimeSpec
(
spec
).
date
(),
KLocale
::
ShortDate
)
);
if
(
!
todo
->
allDay
()
)
{
datesString
+=
i18nc
(
"subitem start time"
,
"Start Time: %1
\n
"
,
K
Global
::
locale
()
->
formatTime
(
todo
->
dtStart
().
toTimeSpec
(
spec
).
time
(),
K
Locale
::
global
()
->
formatTime
(
todo
->
dtStart
().
toTimeSpec
(
spec
).
time
(),
false
,
false
)
);
}
}
if
(
todo
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
isValid
()
)
{
subitemString
+=
i18nc
(
"subitem due date"
,
"Due Date: %1
\n
"
,
K
Global
::
locale
()
->
formatDate
(
K
Locale
::
global
()
->
formatDate
(
todo
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
toTimeSpec
(
spec
).
date
(),
KLocale
::
ShortDate
)
);
if
(
!
todo
->
allDay
()
)
{
subitemString
+=
i18nc
(
"subitem due time"
,
"Due Time: %1
\n
"
,
K
Global
::
locale
()
->
formatTime
(
K
Locale
::
global
()
->
formatTime
(
todo
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
toTimeSpec
(
spec
).
time
(),
false
,
false
)
);
}
...
...
@@ -806,7 +807,7 @@ void CalPrintDay::print( QPainter &p, int width, int height )
QRect
footerBox
(
0
,
height
-
footerHeight
(),
width
,
footerHeight
()
);
height
-=
footerHeight
();
KLocale
*
local
=
K
Global
::
locale
();
KLocale
*
local
=
K
Locale
::
global
();
switch
(
mDayPrintType
)
{
case
Filofax
:
...
...
@@ -1095,7 +1096,7 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
toWeek
=
mToDate
.
addDays
(
6
-
weekdayCol
);
curWeek
=
fromWeek
.
addDays
(
6
);
KLocale
*
local
=
K
Global
::
locale
();
KLocale
*
local
=
K
Locale
::
global
();
QString
line1
,
line2
,
title
;
QRect
headerBox
(
0
,
0
,
width
,
headerHeight
()
);
...
...
calendarsupport/printing/calprintpluginbase.cpp
View file @
bfa3662f
...
...
@@ -47,6 +47,7 @@
#include <QTextDocument>
#include <QTextDocumentFragment>
#include <qmath.h> // qCeil krazy:exclude=camelcase since no QMath
#include <KLocale>
using
namespace
CalendarSupport
;
...
...
@@ -316,7 +317,7 @@ KCalCore::Event::Ptr CalPrintPluginBase::holidayEvent( const QDate &date ) const
const
KCalendarSystem
*
CalPrintPluginBase
::
calendarSystem
()
{
if
(
!
mCalSys
)
{
mCalSys
=
K
Global
::
locale
()
->
calendar
();
mCalSys
=
K
Locale
::
global
()
->
calendar
();
}
return
mCalSys
;
}
...
...
@@ -645,7 +646,7 @@ int CalPrintPluginBase::drawFooter( QPainter &p, const QRect &footbox )
p
.
setFont
(
QFont
(
QLatin1String
(
"sans-serif"
),
6
)
);
QFontMetrics
fm
(
p
.
font
()
);
QString
dateStr
=
K
Global
::
locale
()
->
formatDateTime
(
QDateTime
::
currentDateTime
(),
KLocale
::
LongDate
);
K
Locale
::
global
()
->
formatDateTime
(
QDateTime
::
currentDateTime
(),
KLocale
::
LongDate
);
p
.
drawText
(
footbox
,
Qt
::
AlignCenter
|
Qt
::
AlignVCenter
|
Qt
::
TextSingleLine
,
i18nc
(
"print date: formatted-datetime"
,
"printed: %1"
,
dateStr
)
);
p
.
setFont
(
oldfont
);
...
...
@@ -768,7 +769,7 @@ void CalPrintPluginBase::drawTimeLine( QPainter &p, const QTime &fromTime,
if
(
newY
<
box
.
bottom
()
)
{
QFont
oldFont
(
p
.
font
()
);
// draw the time:
if
(
!
K
Global
::
locale
()
->
use12Clock
()
)
{
if
(
!
K
Locale
::
global
()
->
use12Clock
()
)
{
p
.
drawLine
(
xcenter
,
(
int
)
newY
,
box
.
right
(),
(
int
)
newY
);
numStr
.
setNum
(
curTime
.
hour
()
);
if
(
cellHeight
>
30
)
{
...
...
@@ -784,7 +785,7 @@ void CalPrintPluginBase::drawTimeLine( QPainter &p, const QTime &fromTime,
}
else
{
p
.
drawLine
(
box
.
left
(),
(
int
)
newY
,
box
.
right
(),
(
int
)
newY
);
QTime
time
(
curTime
.
hour
(),
0
);
numStr
=
K
Global
::
locale
()
->
formatTime
(
time
);
numStr
=
K
Locale
::
global
()
->
formatTime
(
time
);
if
(
box
.
width
()
<
60
)
{
p
.
setFont
(
QFont
(
QLatin1String
(
"sans-serif"
),
7
,
QFont
::
Bold
)
);
// for weekprint
}
else
{
...
...
@@ -1026,14 +1027,14 @@ void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
if
(
event
->
location
().
isEmpty
()
)
{
str
=
i18nc
(
"starttime - endtime summary"
,
"%1-%2 %3"
,
K
Global
::
locale
()
->
formatTime
(
item
->
start
().
toLocalZone
().
time
()
),
K
Global
::
locale
()
->
formatTime
(
item
->
end
().
toLocalZone
().
time
()
),
K
Locale
::
global
()
->
formatTime
(
item
->
start
().
toLocalZone
().
time
()
),
K
Locale
::
global
()
->
formatTime
(
item
->
end
().
toLocalZone
().
time
()
),
cleanStr
(
event
->
summary
()
)
);
}
else
{
str
=
i18nc
(
"starttime - endtime summary, location"
,
"%1-%2 %3, %4"
,
K
Global
::
locale
()
->
formatTime
(
item
->
start
().
toLocalZone
().
time
()
),
K
Global
::
locale
()
->
formatTime
(
item
->
end
().
toLocalZone
().
time
()
),
K
Locale
::
global
()
->
formatTime
(
item
->
start
().
toLocalZone
().
time
()
),
K
Locale
::
global
()
->
formatTime
(
item
->
end
().
toLocalZone
().
time
()
),
cleanStr
(
event
->
summary
()
),
cleanStr
(
event
->
location
()
)
);
}
...
...
@@ -1075,7 +1076,7 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
bool
excludePrivate
)
{
QString
dayNumStr
;
const
KLocale
*
local
=
K
Global
::
locale
();
const
KLocale
*
local
=
K
Locale
::
global
();
QTime
myFromTime
,
myToTime
;
if
(
fromTime
.
isValid
()
)
{
...
...
@@ -1203,7 +1204,7 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
continue
;
}
if
(
todo
->
hasStartDate
()
&&
!
todo
->
allDay
()
)
{
timeText
=
K
Global
::
locale
()
->
formatTime
(
todo
->
dtStart
().
toLocalZone
().
time
()
)
+
QLatin1Char
(
' '
);
timeText
=
K
Locale
::
global
()
->
formatTime
(
todo
->
dtStart
().
toLocalZone
().
time
()
)
+
QLatin1Char
(
' '
);
}
else
{
timeText
.
clear
();
}
...
...
@@ -1220,11 +1221,11 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
if
(
!
todo
->
allDay
()
)
{
str
=
i18nc
(
"to-do summary (Due: datetime)"
,
"%1 (Due: %2)"
,
summaryStr
,
K
Global
::
locale
()
->
formatDateTime
(
todo
->
dtDue
().
toLocalZone
()
)
);
K
Locale
::
global
()
->
formatDateTime
(
todo
->
dtDue
().
toLocalZone
()
)
);
}
else
{
str
=
i18nc
(
"to-do summary (Due: date)"
,
"%1 (Due: %2)"
,
summaryStr
,
K
Global
::
locale
()
->
formatDate
(
K
Locale
::
global
()
->
formatDate
(
todo
->
dtDue
().
toLocalZone
().
date
(),
KLocale
::
ShortDate
)
);
}
}
else
{
...
...
@@ -1892,7 +1893,7 @@ void CalPrintPluginBase::drawTodo( int &count, const KCalCore::Todo::Ptr &todo,
bool
excludePrivate
)
{
QString
outStr
;
const
KLocale
*
local
=
K
Global
::
locale
();
const
KLocale
*
local
=
K
Locale
::
global
();
QRect
rect
;
TodoParentStart
startpt
;
// This list keeps all starting points of the parent to-dos so the connection
...
...
@@ -2084,7 +2085,7 @@ void CalPrintPluginBase::drawTodo( int &count, const KCalCore::Todo::Ptr &todo,
int
CalPrintPluginBase
::
weekdayColumn
(
int
weekday
)
{
int
w
=
weekday
+
7
-
K
Global
::
locale
()
->
weekStartDay
();
int
w
=
weekday
+
7
-
K
Locale
::
global
()
->
weekStartDay
();
return
w
%
7
;
}
...
...
@@ -2121,7 +2122,7 @@ void CalPrintPluginBase::drawJournal( const KCalCore::Journal::Ptr &journal, QPa
QFont
oldFont
(
p
.
font
()
);
p
.
setFont
(
QFont
(
QLatin1String
(
"sans-serif"
),
15
)
);
QString
headerText
;
QString
dateText
(
K
Global
::
locale
()
->
formatDate
(
journal
->
dtStart
().
toLocalZone
().
date
(),
QString
dateText
(
K
Locale
::
global
()
->
formatDate
(
journal
->
dtStart
().
toLocalZone
().
date
(),
KLocale
::
LongDate
)
);
if
(
journal
->
summary
().
isEmpty
()
)
{
...
...
calendarsupport/printing/yearprint.cpp
View file @
bfa3662f
...
...
@@ -26,6 +26,7 @@
#include <KGlobal>
#include <KDebug>
#include <KConfigGroup>
#include <KLocale>
using
namespace
CalendarSupport
;
...
...
@@ -119,7 +120,7 @@ void CalPrintYear::setDateRange( const QDate &from, const QDate &to )
void
CalPrintYear
::
print
(
QPainter
&
p
,
int
width
,
int
height
)
{
const
KCalendarSystem
*
calsys
=
calendarSystem
();
KLocale
*
locale
=
K
Global
::
locale
();
KLocale
*
locale
=
K
Locale
::
global
();
if
(
!
calsys
||
!
locale
)
{
return
;
}
...
...
calendarviews/agenda/agenda.cpp
View file @
bfa3662f
...
...
@@ -177,7 +177,7 @@ void MarcusBains::updateLocationRecalc( bool recalculate )
QPalette
pal1
=
d
->
mTimeBox
->
palette
();
pal1
.
setColor
(
QPalette
::
WindowText
,
color
);
d
->
mTimeBox
->
setPalette
(
pal1
);
d
->
mTimeBox
->
setText
(
K
Global
::
locale
()
->
formatTime
(
time
,
showSeconds
)
);
d
->
mTimeBox
->
setText
(
K
Locale
::
global
()
->
formatTime
(
time
,
showSeconds
)
);
d
->
mTimeBox
->
adjustSize
();
if
(
y
-
d
->
mTimeBox
->
height
()
>=
0
)
{
y
-=
d
->
mTimeBox
->
height
();
...
...
calendarviews/agenda/agendaitem.cpp
View file @
bfa3662f
...
...
@@ -48,6 +48,7 @@
#include <QPixmapCache>
#include <QToolTip>
#include <QMimeData>
#include <KLocale>
using
namespace
KCalCore
;
using
namespace
EventViews
;
...
...
@@ -942,24 +943,24 @@ void AgendaItem::paintEvent( QPaintEvent *ev )
QString
shortH
;
QString
longH
;
if
(
!
isMultiItem
()
)
{
shortH
=
K
Global
::
locale
()
->
formatTime
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleDisplayStart
).
shortH
=
K
Locale
::
global
()
->
formatTime
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleDisplayStart
).
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
time
()
);
if
(
CalendarSupport
::
hasEvent
(
mIncidence
)
)
{
longH
=
i18n
(
"%1 - %2"
,
shortH
,
K
Global
::
locale
()
->
formatTime
(
K
Locale
::
global
()
->
formatTime
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
time
()
)
);
}
else
{
longH
=
shortH
;
}
}
else
if
(
!
mMultiItemInfo
->
mFirstMultiItem
)
{
shortH
=
K
Global
::
locale
()
->
formatTime
(
shortH
=
K
Locale
::
global
()
->
formatTime
(
incidence
->
dtStart
().
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
time
()
);
longH
=
shortH
;
}
else
{
shortH
=
K
Global
::
locale
()
->
formatTime
(
shortH
=
K
Locale
::
global
()
->
formatTime
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
time
()
);
longH
=
i18n
(
"- %1"
,
shortH
);
...
...
@@ -1051,9 +1052,9 @@ void AgendaItem::paintEvent( QPaintEvent *ev )
// multi-day, all-day event
shortH
=
i18n
(
"%1 - %2"
,
K
Global
::
locale
()
->
formatDate
(
K
Locale
::
global
()
->
formatDate
(
incidence
->
dtStart
().
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
date
()
),
K
Global
::
locale
()
->
formatDate
(
K
Locale
::
global
()
->
formatDate
(
incidence
->
dateTime
(
KCalCore
::
Incidence
::
RoleEnd
).
toTimeSpec
(
mEventView
->
preferences
()
->
timeSpec
()
).
date
()
)
);
longH
=
shortH
;
...
...
calendarviews/agenda/agendaview.cpp
View file @
bfa3662f
...
...
@@ -64,6 +64,7 @@
#include <QSplitter>
#include <QStyle>
#include <QTimer>
#include <KLocale>
using
namespace
EventViews
;
...
...
@@ -1125,7 +1126,7 @@ void AgendaView::createDayLabels( bool force )
KVBox
*
bottomWeekLabelBox
=
new
KVBox
(
d
->
mBottomDayLabels
);
d
->
mLayoutBottomDayLabels
->
addWidget
(
bottomWeekLabelBox
);
const
KCalendarSystem
*
calsys
=
K
Global
::
locale
()
->
calendar
();
const
KCalendarSystem
*
calsys
=
K
Locale
::
global
()
->
calendar
();
#ifndef EVENTVIEWS_NODECOS
QList
<
CalendarDecoration
::
Decoration
*>
topDecos
;
...
...
@@ -1145,7 +1146,7 @@ void AgendaView::createDayLabels( bool force )
d
->
mLayoutBottomDayLabels
->
addWidget
(
bottomDayLabelBox
);
int
dW
=
calsys
->
dayOfWeek
(
date
);
QString
veryLongStr
=
K
Global
::
locale
()
->
formatDate
(
date
);
QString
veryLongStr
=
K
Locale
::
global
()
->
formatDate
(
date
);
QString
longstr
=
i18nc
(
"short_weekday date (e.g. Mon 13)"
,
"%1 %2"
,
calsys
->
weekDayName
(
dW
,
KCalendarSystem
::
ShortDayName
),
calsys
->
day
(
date
)
);
...
...
calendarviews/agenda/timelabels.cpp
View file @
bfa3662f
...
...
@@ -36,6 +36,7 @@
#include <QMenu>
#include <QPainter>
#include <QPointer>
#include <KLocale>
static
const
KCatalogLoader
loader
(
QLatin1String
(
"timezones4"
)
);
...
...
@@ -127,11 +128,11 @@ void TimeLabels::updateConfig()
setFont
(
mTimeLabelsZone
->
preferences
()
->
agendaTimeLabelsFont
()
);
QString
test
=
QLatin1String
(
"20"
);
if
(
K
Global
::
locale
()
->
use12Clock
()
)
{
if
(
K
Locale
::
global
()
->
use12Clock
()
)
{
test
=
QLatin1String
(
"12"
);
}
mMiniWidth
=
fontMetrics
().
width
(
test
);
if
(
K
Global
::
locale
()
->
use12Clock
()
)
{
if
(
K
Locale
::
global
()
->
use12Clock
()
)
{
test
=
QLatin1String
(
"pm"
);
}
else
{
test
=
QLatin1String
(
"00"
);
...
...
@@ -211,7 +212,7 @@ void TimeLabels::paintEvent( QPaintEvent * )
//TODO: rewrite this using KLocale's time formats. "am/pm" doesn't make sense
// in some locale's
QString
suffix
;
if
(
!
K
Global
::
locale
()
->
use12Clock
()
)
{
if
(
!
K
Locale
::
global
()
->
use12Clock
()
)
{
suffix
=
QLatin1String
(
"00"
);
}
else
{
suffix
=
QLatin1String
(
"am"
);
...
...
@@ -263,7 +264,7 @@ void TimeLabels::paintEvent( QPaintEvent * )
hour
.
setNum
(
cell
+
24
);
}
// handle 24h and am/pm time formats
if
(
K
Global
::
locale
()
->
use12Clock
()
)
{
if
(
K
Locale
::
global
()
->
use12Clock
()
)
{
if
(
cell
==
12
)
{
suffix
=
QLatin1String
(
"pm"
);
}
...
...
calendarviews/list/listview.cpp
View file @
bfa3662f
...
...
@@ -45,6 +45,7 @@
#include <QBoxLayout>
#include <QHeaderView>
#include <QTreeWidget>
#include <KLocale>
using
namespace
EventViews
;
using
namespace
KCalCore
;
...
...
@@ -65,7 +66,7 @@ static QString cleanSummary( const QString &summary, const KDateTime &next )
if
(
next
.
isValid
()
)
{
const
QString
dateStr
=
K
Global
::
locale
()
->
formatDate
(
K
Locale
::
global
()
->
formatDate
(