diff --git a/apps/opencs/view/prefs/contextmenuwidget.cpp b/apps/opencs/view/prefs/contextmenuwidget.cpp index abf3d6edce..bb1984e9a7 100644 --- a/apps/opencs/view/prefs/contextmenuwidget.cpp +++ b/apps/opencs/view/prefs/contextmenuwidget.cpp @@ -5,7 +5,7 @@ #include "../../model/prefs/state.hpp" -CSVPrefs::ContextMenuWidget::ContextMenuWidget(QWidget* parent, const std::string& category) +CSVPrefs::ContextMenuWidget::ContextMenuWidget(const std::string& category, QWidget* parent) :QWidget(parent) ,mCategory(category) { diff --git a/apps/opencs/view/prefs/contextmenuwidget.hpp b/apps/opencs/view/prefs/contextmenuwidget.hpp index 0d8d5006c4..57c231fb6f 100644 --- a/apps/opencs/view/prefs/contextmenuwidget.hpp +++ b/apps/opencs/view/prefs/contextmenuwidget.hpp @@ -15,7 +15,7 @@ namespace CSVPrefs public: - ContextMenuWidget(QWidget* parent, const std::string& category); + ContextMenuWidget(const std::string& category, QWidget* parent = 0); protected: diff --git a/apps/opencs/view/prefs/keybindingpage.cpp b/apps/opencs/view/prefs/keybindingpage.cpp index 143665f4a0..d7756f7c83 100644 --- a/apps/opencs/view/prefs/keybindingpage.cpp +++ b/apps/opencs/view/prefs/keybindingpage.cpp @@ -9,6 +9,7 @@ #include "../../model/prefs/setting.hpp" #include "../../model/prefs/category.hpp" +#include "../../view/prefs/contextmenuwidget.hpp" namespace CSVPrefs { @@ -19,7 +20,7 @@ namespace CSVPrefs , mPageSelector(0) { // Need one widget for scroll area - QWidget* topWidget = new QWidget(); + CSVPrefs::ContextMenuWidget* topWidget = new CSVPrefs::ContextMenuWidget(category.getKey()); QVBoxLayout* topLayout = new QVBoxLayout(topWidget); // Allows switching between "pages" diff --git a/apps/opencs/view/prefs/page.cpp b/apps/opencs/view/prefs/page.cpp index c2098af443..cc9b94a04b 100644 --- a/apps/opencs/view/prefs/page.cpp +++ b/apps/opencs/view/prefs/page.cpp @@ -10,7 +10,7 @@ CSVPrefs::Page::Page (CSMPrefs::Category& category, QWidget *parent) : PageBase (category, parent) { - CSVPrefs::ContextMenuWidget *widget = new CSVPrefs::ContextMenuWidget (parent, category.getKey()); + CSVPrefs::ContextMenuWidget *widget = new CSVPrefs::ContextMenuWidget (category.getKey(), parent); mGrid = new QGridLayout (widget); for (CSMPrefs::Category::Iterator iter = category.begin(); iter!=category.end(); ++iter)