Commit 2b9fe262 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up. Minor optimizaton

parent 5456ec5e
......@@ -59,10 +59,6 @@ ExportWebDialog::ExportWebDialog(KOrg::HTMLExportSettings *settings, QWidget *pa
setupGeneralPage();
setupEventPage();
setupTodoPage();
// Disabled bacause the functionality is not yet implemented.
// setupJournalPage();
// setupFreeBusyPage();
// setupAdvancedPage();
connect(mExportButton, &QPushButton::clicked, this, &ExportWebDialog::slotOk);
connect(button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &ExportWebDialog::reject);
......@@ -240,54 +236,6 @@ void ExportWebDialog::setupEventPage()
topLayout->addStretch(1);
}
/*
void ExportWebDialog::setupJournalPage()
{
mJournalPage = addPage(i18n("Journal"));
QVBoxLayout *topLayout = new QVBoxLayout( mJournalPage );
topLayout->setSpacing( 10 );
QHBox *hbox = new QHBox( mJournalPage );
topLayout->addWidget( hbox );
addWidString( mSettings->journalTitleItem(), hbox );
QVBox *vbox = new QVBox( mJournalPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
topLayout->addStretch(1);
}
void ExportWebDialog::setupFreeBusyPage()
{
mFreeBusyPage = addPage(i18n("Free/Busy"));
QVBoxLayout *topLayout = new QVBoxLayout( mFreeBusyPage );
topLayout->setSpacing( 10 );
QHBox *hbox = new QHBox( mFreeBusyPage );
topLayout->addWidget( hbox );
addWidString( mSettings->journalTitleItem(), hbox );
QVBox *vbox = new QVBox( mFreeBusyPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
topLayout->addStretch(1);
}
void ExportWebDialog::setupAdvancedPage()
{
mAdvancedPage = addPage(i18n("Advanced"));
QVBoxLayout *topLayout = new QVBoxLayout( mAdvancedPage );
topLayout->setSpacing( 10 );
QVBox *vbox = new QVBox( mAdvancedPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
topLayout->addStretch(1);
}
*/
void ExportWebDialog::updateState()
{
......
......@@ -50,9 +50,6 @@ protected:
void setupGeneralPage();
void setupEventPage();
void setupTodoPage();
// void setupJournalPage();
// void setupFreeBusyPage();
// void setupAdvancedPage();
public Q_SLOTS:
void setDefaults();
......@@ -80,9 +77,6 @@ private:
QFrame *mGeneralPage;
QFrame *mEventPage;
QFrame *mTodoPage;
// QFrame *mJournalPage;
// QFrame *mFreeBusyPage;
// QFrame *mAdvancedPage;
QGroupBox *mDateRangeGroup;
QCheckBox *mMonthViewCheckBox;
QCheckBox *mEventListCheckBox;
......
......@@ -46,8 +46,9 @@ FilterEditDialog::FilterEditDialog(QList<KCalCore::CalFilter *> *filters, QWidge
: QDialog(parent)
{
setWindowTitle(i18nc("@title::window", "Edit Calendar Filters"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mApplyButton = buttonBox->button(QDialogButtonBox::Apply);
mOkButton->setDefault(true);
......@@ -130,7 +131,8 @@ void FilterEdit::updateFilterList()
Q_EMIT(dataConsistent(false));
} else {
QList<KCalCore::CalFilter *>::iterator i;
for (i = mFilters->begin(); i != mFilters->end(); ++i) {
QList<KCalCore::CalFilter *>::iterator end(mFilters->end());
for (i = mFilters->begin(); i != end; ++i) {
if (*i) {
mRulesList->addItem((*i)->name());
}
......@@ -143,7 +145,7 @@ void FilterEdit::updateFilterList()
}
Q_EMIT(dataConsistent(true));
}
if (mFilters && mFilters->count() > 0 && !mCurrent) {
if (mFilters && !mFilters->isEmpty() && !mCurrent) {
filterSelected(mFilters->at(0));
}
if (mFilters) {
......
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