Commit 4acbbe83 authored by hjk's avatar hjk
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 3bd633ef 12e4f2b2
...@@ -42,10 +42,15 @@ using namespace CppTools::Internal; ...@@ -42,10 +42,15 @@ using namespace CppTools::Internal;
CompletionSettingsPage::CompletionSettingsPage(CppCodeCompletion *completion) CompletionSettingsPage::CompletionSettingsPage(CppCodeCompletion *completion)
: m_completion(completion) : m_completion(completion)
, m_page(0) , m_page(new Ui_CompletionSettingsPage)
{ {
} }
CompletionSettingsPage::~CompletionSettingsPage()
{
delete m_page;
}
QString CompletionSettingsPage::name() const QString CompletionSettingsPage::name() const
{ {
return tr("Completion"); return tr("Completion");
...@@ -63,7 +68,6 @@ QString CompletionSettingsPage::trCategory() const ...@@ -63,7 +68,6 @@ QString CompletionSettingsPage::trCategory() const
QWidget *CompletionSettingsPage::createPage(QWidget *parent) QWidget *CompletionSettingsPage::createPage(QWidget *parent)
{ {
m_page = new Ui_CompletionSettingsPage;
QWidget *w = new QWidget(parent); QWidget *w = new QWidget(parent);
m_page->setupUi(w); m_page->setupUi(w);
...@@ -76,13 +80,11 @@ QWidget *CompletionSettingsPage::createPage(QWidget *parent) ...@@ -76,13 +80,11 @@ QWidget *CompletionSettingsPage::createPage(QWidget *parent)
void CompletionSettingsPage::finished(bool accepted) void CompletionSettingsPage::finished(bool accepted)
{ {
if (accepted) { if (!accepted)
m_completion->setCaseSensitivity( return;
m_page->caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive);
m_completion->setAutoInsertBraces(m_page->autoInsertBraces->isChecked());
m_completion->setPartialCompletionEnabled(m_page->partiallyComplete->isChecked());
}
delete m_page; m_completion->setCaseSensitivity(
m_page = 0; m_page->caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive);
m_completion->setAutoInsertBraces(m_page->autoInsertBraces->isChecked());
m_completion->setPartialCompletionEnabled(m_page->partiallyComplete->isChecked());
} }
...@@ -49,6 +49,7 @@ class CompletionSettingsPage : public Core::IOptionsPage ...@@ -49,6 +49,7 @@ class CompletionSettingsPage : public Core::IOptionsPage
{ {
public: public:
CompletionSettingsPage(CppCodeCompletion *completion); CompletionSettingsPage(CppCodeCompletion *completion);
~CompletionSettingsPage();
QString name() const; QString name() const;
QString category() const; QString category() const;
......
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