Commit 0d4ef293 authored by hjk's avatar hjk
Browse files

debugger: remove obstructing frame around l&w item delegates

parent 873e379e
...@@ -44,9 +44,9 @@ namespace Debugger { ...@@ -44,9 +44,9 @@ namespace Debugger {
namespace Internal { namespace Internal {
// Basic watch line edit. // Basic watch line edit.
WatchLineEdit::WatchLineEdit(QWidget *parent) : QLineEdit(parent) WatchLineEdit::WatchLineEdit(QWidget *parent)
{ : QLineEdit(parent)
} {}
QVariant WatchLineEdit::modelData() const QVariant WatchLineEdit::modelData() const
{ {
...@@ -62,7 +62,8 @@ void WatchLineEdit::setModelData(const QVariant &v) ...@@ -62,7 +62,8 @@ void WatchLineEdit::setModelData(const QVariant &v)
/* ------ IntegerWatchLineEdit helpers: /* ------ IntegerWatchLineEdit helpers:
* Integer validator using different number bases. */ * Integer validator using different number bases. */
class IntegerValidator : public QValidator { class IntegerValidator : public QValidator
{
public: public:
explicit IntegerValidator(QObject *parent); explicit IntegerValidator(QObject *parent);
virtual State validate(QString &, int &) const; virtual State validate(QString &, int &) const;
......
...@@ -774,10 +774,11 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const ...@@ -774,10 +774,11 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const
if (!idx.isValid()) if (!idx.isValid())
return Qt::ItemFlags(); return Qt::ItemFlags();
// enabled, editable, selectable, checkable, and can be used both as the // Enabled, editable, selectable, checkable, and can be used both as the
// source of a drag and drop operation and as a drop target. // source of a drag and drop operation and as a drop target.
static const Qt::ItemFlags notEditable = Qt::ItemIsSelectable| Qt::ItemIsEnabled; static const Qt::ItemFlags notEditable
= Qt::ItemIsSelectable | Qt::ItemIsEnabled;
static const Qt::ItemFlags editable = notEditable | Qt::ItemIsEditable; static const Qt::ItemFlags editable = notEditable | Qt::ItemIsEditable;
// Disable editing if debuggee is positively running. // Disable editing if debuggee is positively running.
......
...@@ -51,13 +51,14 @@ ...@@ -51,13 +51,14 @@
#include <QtCore/QMetaProperty> #include <QtCore/QMetaProperty>
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QApplication>
#include <QtGui/QClipboard>
#include <QtGui/QContextMenuEvent> #include <QtGui/QContextMenuEvent>
#include <QtGui/QHeaderView> #include <QtGui/QHeaderView>
#include <QtGui/QItemDelegate> #include <QtGui/QItemDelegate>
#include <QtGui/QMenu> #include <QtGui/QMenu>
#include <QtGui/QPainter>
#include <QtGui/QResizeEvent> #include <QtGui/QResizeEvent>
#include <QtGui/QClipboard>
#include <QtGui/QApplication>
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// //
...@@ -94,12 +95,18 @@ public: ...@@ -94,12 +95,18 @@ public:
break; break;
} }
WatchLineEdit *edit = WatchLineEdit::create(type, parent); WatchLineEdit *edit = WatchLineEdit::create(type, parent);
if (IntegerWatchLineEdit *intEdit = qobject_cast<IntegerWatchLineEdit *>(edit)) edit->setFrame(false);
IntegerWatchLineEdit *intEdit
= qobject_cast<IntegerWatchLineEdit *>(edit);
if (intEdit)
intEdit->setBase(index.data(LocalsIntegerBaseRole).toInt()); intEdit->setBase(index.data(LocalsIntegerBaseRole).toInt());
return edit; return edit;
} }
// Standard line edits for the rest
return new QLineEdit(parent); // Standard line edits for the rest.
QLineEdit *lineEdit = new QLineEdit(parent);
lineEdit->setFrame(false);
return lineEdit;
} }
void setModelData(QWidget *editor, QAbstractItemModel *model, void setModelData(QWidget *editor, QAbstractItemModel *model,
......
Markdown is supported
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