Переглянути джерело

Fix unused variable warnings in recent widgets

Julien Finet 13 роки тому
батько
коміт
39c710211b

+ 0 - 1
Libs/Widgets/ctkBasePopupWidget.cpp

@@ -182,7 +182,6 @@ QWidgetList ctkBasePopupWidgetPrivate::focusWidgets(bool onlyVisible)const
 // -------------------------------------------------------------------------
 QWidget* ctkBasePopupWidgetPrivate::mouseOver()
 {
-  Q_Q(ctkBasePopupWidget);
   QList<QWidget*> widgets = this->focusWidgets(true);
   foreach(QWidget* widget, widgets)
     {

+ 0 - 1
Libs/Widgets/ctkFileDialog.cpp

@@ -185,6 +185,5 @@ bool ctkFileDialog::eventFilter(QObject *obj, QEvent *event)
 //------------------------------------------------------------------------------
 void ctkFileDialog::onSelectionChanged()
 {
-  Q_D(ctkFileDialog);
   emit this->fileSelectionChanged(this->selectedFiles());
 }

+ 0 - 1
Libs/Widgets/ctkMatrixWidget.cpp

@@ -414,7 +414,6 @@ void ctkMatrixWidget::setValue(int i, int j, double newValue)
 // --------------------------------------------------------------------------
 QVector<double> ctkMatrixWidget::values()const
 {
-  Q_D(const ctkMatrixWidget);
   QVector<double> values;
 
   for (int i=0; i < this->rowCount(); i++)

+ 2 - 3
Libs/Widgets/ctkMenuComboBox.cpp

@@ -220,11 +220,10 @@ void ctkMenuComboBoxPrivate::addMenuToCompleter(QMenu* menu)
 // -------------------------------------------------------------------------
 void ctkMenuComboBoxPrivate::addActionToCompleter(QAction *action)
 {
-  QStringListModel* model = qobject_cast<QStringListModel* >(this->SearchCompleter->model());
-  Q_ASSERT(model);
+  Q_ASSERT(qobject_cast<QStringListModel* >(this->SearchCompleter->model()));
   QModelIndex start = this->SearchCompleter->model()->index(0,0);
   QModelIndexList indexList = this->SearchCompleter->model()->match(
-      start, 0, action->text());
+    start, 0, action->text());
   if (indexList.count())
     {
     return;

+ 0 - 2
Libs/Widgets/ctkPopupWidget.cpp

@@ -486,8 +486,6 @@ void ctkPopupWidget::updatePopup()
 // --------------------------------------------------------------------------
 void ctkPopupWidget::hidePopup()
 {
-  Q_D(ctkPopupWidget);
-
   // just in case it was set.
   this->setProperty("forcedClosed", 0);