diff options
Diffstat (limited to 'Swift/QtUI/QtStatusWidget.cpp')
-rw-r--r-- | Swift/QtUI/QtStatusWidget.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp index 53f93b5..57ef3e0 100644 --- a/Swift/QtUI/QtStatusWidget.cpp +++ b/Swift/QtUI/QtStatusWidget.cpp @@ -6,7 +6,7 @@ namespace Swift { -QtStatusWidget::QtStatusWidget(QWidget *parent) { +QtStatusWidget::QtStatusWidget(QWidget *parent) : QWidget(parent) { types_ = new QComboBox(this); types_->addItem("Available", QVariant(StatusShow::Online)); types_->addItem("Free For Chat", QVariant(StatusShow::FFC)); @@ -22,7 +22,12 @@ QtStatusWidget::QtStatusWidget(QWidget *parent) { } void QtStatusWidget::handleTypeSelected(int index) { - emit onChangeStatusRequest((StatusShow::Type)types_->itemData(index).toInt(), ""); + Q_UNUSED(index); + emit onChangeStatusRequest(getSelectedStatusShow()); +} + +StatusShow::Type QtStatusWidget::getSelectedStatusShow() { + return (StatusShow::Type)types_->itemData(types_->currentIndex()).toInt(); } } |