Commit 95fe8d3e authored by Laurent Montel's avatar Laurent Montel
Browse files

Use namespace for dialog name

parent 2d1b3e66
Pipeline #240954 passed with stage
in 3 minutes and 57 seconds
......@@ -51,7 +51,10 @@
#include <QWindow>
using namespace IncidenceEditorNG;
namespace
{
static const char myIncidenceDialogConfigGroupName[] = "IncidenceDialog";
}
namespace IncidenceEditorNG
{
enum Tabs { GeneralTab = 0, AttendeesTab, ResourcesTab, AlarmsTab, RecurrenceTab, AttachmentsTab };
......@@ -704,7 +707,7 @@ IncidenceDialog::~IncidenceDialog()
void IncidenceDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "IncidenceDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myIncidenceDialogConfigGroupName);
KWindowConfig::saveWindowSize(windowHandle(), group);
}
......@@ -712,7 +715,7 @@ void IncidenceDialog::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(500, 500));
KConfigGroup group(KSharedConfig::openStateConfig(), "IncidenceDialog");
KConfigGroup group(KSharedConfig::openStateConfig(), myIncidenceDialogConfigGroupName);
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}
......
......@@ -29,7 +29,10 @@
#include <QWindow>
using namespace IncidenceEditorNG;
namespace
{
static const char myResourceManagementConfigGroupName[] = "ResourceManagement";
}
class FreebusyViewCalendar : public EventViews::ViewCalendar
{
public:
......@@ -150,14 +153,14 @@ void ResourceManagement::readConfig()
{
create(); // ensure a window is created
windowHandle()->resize(QSize(600, 400));
KConfigGroup group(KSharedConfig::openStateConfig(), "ResourceManagement");
KConfigGroup group(KSharedConfig::openStateConfig(), myResourceManagementConfigGroupName);
KWindowConfig::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size()); // workaround for QTBUG-40584
}
void ResourceManagement::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), "ResourceManagement");
KConfigGroup group(KSharedConfig::openStateConfig(), myResourceManagementConfigGroupName);
KWindowConfig::saveWindowSize(windowHandle(), group);
group.sync();
}
......
Supports Markdown
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