summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-27 22:33:17 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commitf9e246fed2433d137e6d30c95608440eadf18770 (patch)
treea4107b5fd9b6657e2a7a8bf21f611cec7caed538 /desktop-widgets/modeldelegates.cpp
parentbe7365755e8d194d839afbde55e3040489bf38b9 (diff)
downloadsubsurface-f9e246fed2433d137e6d30c95608440eadf18770.tar.gz
cleanup: make static fields local to ComboBoxDelegate
All combobox-delegates shared a number of static status fields. In a quest to make the code more reentrant, move that to the actual object. The fields have to be defined as mutable, since they are set in const member functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/modeldelegates.cpp')
-rw-r--r--desktop-widgets/modeldelegates.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp
index f03008324..417ae2cdb 100644
--- a/desktop-widgets/modeldelegates.cpp
+++ b/desktop-widgets/modeldelegates.cpp
@@ -38,7 +38,6 @@ QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&
// Gets the index of the model in the currentRow and column.
// currCombo is defined below.
#define IDX(_XX) mymodel->index(currCombo.currRow, (_XX))
-static bool keyboardFinished = false;
StarWidgetsDelegate::StarWidgetsDelegate(QWidget *parent) : QStyledItemDelegate(parent),
parentWidget(parent)
@@ -101,14 +100,6 @@ void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
c->lineEdit()->setSelection(0, c->lineEdit()->text().length());
}
-static struct CurrSelected {
- QComboBox *comboEditor;
- int currRow;
- QString activeText;
- QAbstractItemModel *model;
- bool ignoreSelection;
-} currCombo;
-
QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex &index) const
{
QComboBox *comboDelegate = new QComboBox(parent);