Commit 2ec494ed authored by Laurent Montel's avatar Laurent Montel 😁

Rename GlobalSettings

parent fc26a0ca
......@@ -733,9 +733,9 @@ void IncidenceDialog::writeConfig()
const Akonadi::Collection col = d_ptr->mCalSelector->currentCollection();
// col might not be valid if the collection wasn't found yet (the combo is async), skip saving in that case
if (col.isValid() && col.id() != IncidenceEditorNG::GlobalSettings::self()->lastSelectedFolder()) {
IncidenceEditorNG::GlobalSettings::self()->setLastSelectedFolder(col.id());
IncidenceEditorNG::GlobalSettings::self()->save();
if (col.isValid() && col.id() != IncidenceEditorNG::IncidenceEditorSettings::self()->lastSelectedFolder()) {
IncidenceEditorNG::IncidenceEditorSettings::self()->setLastSelectedFolder(col.id());
IncidenceEditorNG::IncidenceEditorSettings::self()->save();
}
}
......
......@@ -23,23 +23,23 @@
using namespace IncidenceEditorNG;
GlobalSettings *GlobalSettings::mSelf = 0;
IncidenceEditorSettings *IncidenceEditorSettings::mSelf = 0;
GlobalSettings *GlobalSettings::self()
IncidenceEditorSettings *IncidenceEditorSettings::self()
{
if (!mSelf) {
mSelf = new GlobalSettings();
mSelf = new IncidenceEditorSettings();
mSelf->load();
}
return mSelf;
}
GlobalSettings::GlobalSettings()
IncidenceEditorSettings::IncidenceEditorSettings()
{
}
GlobalSettings::~GlobalSettings()
IncidenceEditorSettings::~IncidenceEditorSettings()
{
}
......@@ -29,17 +29,17 @@
namespace IncidenceEditorNG
{
class INCIDENCEEDITORS_NG_EXPORT GlobalSettings : public IncidenceEditorNG::GlobalSettingsBase
class INCIDENCEEDITORS_NG_EXPORT IncidenceEditorSettings : public IncidenceEditorNG::GlobalSettingsBase
{
Q_OBJECT
public:
static GlobalSettings *self();
static IncidenceEditorSettings *self();
private:
GlobalSettings();
virtual ~GlobalSettings();
static GlobalSettings *mSelf;
IncidenceEditorSettings();
virtual ~IncidenceEditorSettings();
static IncidenceEditorSettings *mSelf;
};
}
......
......@@ -1618,11 +1618,11 @@ void ActionManager::openEventEditor(const QString &summary,
const QStringList &attendees,
const QString &attachmentMimetype)
{
int action = IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethod();
int action = IncidenceEditorNG::IncidenceEditorSettings::self()->defaultEmailAttachMethod();
if (attachmentMimetype != QLatin1String("message/rfc822")) {
action = IncidenceEditorNG::GlobalSettings::Link;
} else if (IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethod() ==
IncidenceEditorNG::GlobalSettings::Ask) {
action = IncidenceEditorNG::IncidenceEditorSettings::Link;
} else if (IncidenceEditorNG::IncidenceEditorSettings::self()->defaultEmailAttachMethod() ==
IncidenceEditorNG::IncidenceEditorSettings::Ask) {
QMenu *menu = new QMenu(Q_NULLPTR);
QAction *attachLink = menu->addAction(i18n("Attach as &link"));
QAction *attachInline = menu->addAction(i18n("Attach &inline"));
......@@ -1634,11 +1634,11 @@ void ActionManager::openEventEditor(const QString &summary,
delete menu;
if (ret == attachLink) {
action = IncidenceEditorNG::GlobalSettings::Link;
action = IncidenceEditorNG::IncidenceEditorSettings::Link;
} else if (ret == attachInline) {
action = IncidenceEditorNG::GlobalSettings::InlineFull;
action = IncidenceEditorNG::IncidenceEditorSettings::InlineFull;
} else if (ret == attachBody) {
action = IncidenceEditorNG::GlobalSettings::InlineBody;
action = IncidenceEditorNG::IncidenceEditorSettings::InlineBody;
} else {
return;
}
......@@ -1648,13 +1648,13 @@ void ActionManager::openEventEditor(const QString &summary,
QTemporaryFile tf;
tf.setAutoRemove(true);
switch (action) {
case IncidenceEditorNG::GlobalSettings::Link:
case IncidenceEditorNG::IncidenceEditorSettings::Link:
attData = uri;
break;
case IncidenceEditorNG::GlobalSettings::InlineFull:
case IncidenceEditorNG::IncidenceEditorSettings::InlineFull:
attData = file;
break;
case IncidenceEditorNG::GlobalSettings::InlineBody: {
case IncidenceEditorNG::IncidenceEditorSettings::InlineBody: {
QFile f(file);
if (!f.open(QFile::ReadOnly)) {
return;
......@@ -1694,7 +1694,7 @@ void ActionManager::openEventEditor(const QString &summary,
mCalendarView->newEvent(summary, description, QStringList(attData),
attendees, QStringList(attachmentMimetype),
action != IncidenceEditorNG::GlobalSettings::Link);
action != IncidenceEditorNG::IncidenceEditorSettings::Link);
}
void ActionManager::openTodoEditor(const QString &text)
......
......@@ -2711,7 +2711,7 @@ Akonadi::Collection CalendarView::defaultCollection(const QLatin1String &mimeTyp
}
// 3. Try last selected folder
collection = mCalendar->collection(IncidenceEditorNG::GlobalSettings::self()->lastSelectedFolder());
collection = mCalendar->collection(IncidenceEditorNG::IncidenceEditorSettings::self()->lastSelectedFolder());
supportsMimeType = collection.contentMimeTypes().contains(mimeType) || mimeType == QLatin1String("");
hasRights = collection.rights() & Akonadi::Collection::CanCreateItem;
if (collection.isValid() && supportsMimeType && hasRights) {
......
......@@ -117,7 +117,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
KPIM::KPrefsWidRadios *defaultEmailAttachMethod =
addWidRadios(
IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethodItem(), personalFrame);
IncidenceEditorNG::IncidenceEditorSettings::self()->defaultEmailAttachMethodItem(), personalFrame);
personalLayout->addWidget(defaultEmailAttachMethod->groupBox());
personalLayout->addStretch(1);
......@@ -205,7 +205,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
void KOPrefsDialogMain::usrWriteConfig()
{
KPIM::KPrefsModule::usrWriteConfig();
IncidenceEditorNG::GlobalSettings::self()->save();
IncidenceEditorNG::IncidenceEditorSettings::self()->save();
}
void KOPrefsDialogMain::toggleEmailSettings(bool on)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment