diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/capture_filter_edit.cpp | 26 | ||||
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 2 | ||||
-rw-r--r-- | ui/qt/display_filter_edit.cpp | 26 | ||||
-rw-r--r-- | ui/qt/field_filter_edit.cpp | 31 | ||||
-rw-r--r-- | ui/qt/field_filter_edit.h | 1 | ||||
-rw-r--r-- | ui/qt/qcustomplot.cpp | 8 |
6 files changed, 0 insertions, 94 deletions
diff --git a/ui/qt/capture_filter_edit.cpp b/ui/qt/capture_filter_edit.cpp index 0a033f43dc..20f48ac0bd 100644 --- a/ui/qt/capture_filter_edit.cpp +++ b/ui/qt/capture_filter_edit.cpp @@ -239,30 +239,6 @@ void CaptureFilterEdit::paintEvent(QPaintEvent *evt) { QSize bksz = bookmark_button_->size(); painter.drawLine(bksz.width(), cr.top(), bksz.width(), cr.bottom()); } - -#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) - // http://wiki.forum.nokia.com/index.php/Custom_QLineEdit - if (text().isEmpty() && ! this->hasFocus()) { - QPainter p(this); - QFont f = font(); - f.setItalic(true); - p.setFont(f); - - QColor color(palette().color(foregroundRole())); - color.setAlphaF(0.5); - p.setPen(color); - - QStyleOptionFrame opt; - initStyleOption(&opt); - QRect cr = style()->subElementRect(QStyle::SE_LineEditContents, &opt, this); - cr.setLeft(cr.left() + 2); - cr.setRight(cr.right() - 2); - - p.drawText(cr, Qt::AlignLeft|Qt::AlignVCenter, placeholder_text_); - } - // else check filter syntax and set the background accordingly - // XXX - Should we add little warning/error icons as well? -#endif // QT < 4.7 } void CaptureFilterEdit::resizeEvent(QResizeEvent *) @@ -303,9 +279,7 @@ void CaptureFilterEdit::setConflict(bool conflict) placeholder_text_ = QString(tr("Enter a capture filter %1")).arg(UTF8_HORIZONTAL_ELLIPSIS); setToolTip(QString()); } -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) setPlaceholderText(placeholder_text_); -#endif } // XXX Make this private along with setConflict. diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index 3f84f005e2..221cbde492 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -213,9 +213,7 @@ CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) : interface_item_delegate_.setTree(ui->interfaceTree); -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) ui->filenameLineEdit->setPlaceholderText(tr("Leave blank to use a temporary file")); -#endif // Changes in interface selections or capture filters should be propagated // to the main welcome screen where they will be applied to the global diff --git a/ui/qt/display_filter_edit.cpp b/ui/qt/display_filter_edit.cpp index 2c3d83131b..7537be572e 100644 --- a/ui/qt/display_filter_edit.cpp +++ b/ui/qt/display_filter_edit.cpp @@ -218,9 +218,7 @@ void DisplayFilterEdit::setDefaultPlaceholderText() placeholder_text_ = QString(tr("Apply a read filter %1")).arg(UTF8_HORIZONTAL_ELLIPSIS); break; } -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) setPlaceholderText(placeholder_text_); -#endif } void DisplayFilterEdit::paintEvent(QPaintEvent *evt) { @@ -240,30 +238,6 @@ void DisplayFilterEdit::paintEvent(QPaintEvent *evt) { QSize bksz = bookmark_button_->size(); painter.drawLine(bksz.width(), cr.top(), bksz.width(), cr.bottom()); } - -#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) - // http://wiki.forum.nokia.com/index.php/Custom_QLineEdit - if (text().isEmpty() && ! this->hasFocus()) { - QPainter p(this); - QFont f = font(); - f.setItalic(true); - p.setFont(f); - - QColor color(palette().color(foregroundRole())); - color.setAlphaF(0.5); - p.setPen(color); - - QStyleOptionFrame opt; - initStyleOption(&opt); - QRect cr = style()->subElementRect(QStyle::SE_LineEditContents, &opt, this); - cr.setLeft(cr.left() + 2); - cr.setRight(cr.right() - 2); - - p.drawText(cr, Qt::AlignLeft|Qt::AlignVCenter, placeholder_text_); - } - // else check filter syntax and set the background accordingly - // XXX - Should we add little warning/error icons as well? -#endif // QT < 4.7 } void DisplayFilterEdit::resizeEvent(QResizeEvent *) diff --git a/ui/qt/field_filter_edit.cpp b/ui/qt/field_filter_edit.cpp index 317252641d..8a67f67825 100644 --- a/ui/qt/field_filter_edit.cpp +++ b/ui/qt/field_filter_edit.cpp @@ -90,38 +90,7 @@ void FieldFilterEdit::setDefaultPlaceholderText() { placeholder_text_ = QString(tr("Enter a field %1")).arg(UTF8_HORIZONTAL_ELLIPSIS); -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) setPlaceholderText(placeholder_text_); -#endif -} - -void FieldFilterEdit::paintEvent(QPaintEvent *evt) { - SyntaxLineEdit::paintEvent(evt); - - -#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) - // http://wiki.forum.nokia.com/index.php/Custom_QLineEdit - if (text().isEmpty() && ! this->hasFocus()) { - QPainter p(this); - QFont f = font(); - f.setItalic(true); - p.setFont(f); - - QColor color(palette().color(foregroundRole())); - color.setAlphaF(0.5); - p.setPen(color); - - QStyleOptionFrame opt; - initStyleOption(&opt); - QRect cr = style()->subElementRect(QStyle::SE_LineEditContents, &opt, this); - cr.setLeft(cr.left() + 2); - cr.setRight(cr.right() - 2); - - p.drawText(cr, Qt::AlignLeft|Qt::AlignVCenter, placeholder_text_); - } - // else check filter syntax and set the background accordingly - // XXX - Should we add little warning/error icons as well? -#endif // QT < 4.7 } void FieldFilterEdit::focusOutEvent(QFocusEvent *event) diff --git a/ui/qt/field_filter_edit.h b/ui/qt/field_filter_edit.h index 821f905c86..072e7b23d9 100644 --- a/ui/qt/field_filter_edit.h +++ b/ui/qt/field_filter_edit.h @@ -34,7 +34,6 @@ public: explicit FieldFilterEdit(QWidget *parent = 0); protected: - void paintEvent(QPaintEvent *evt); void keyPressEvent(QKeyEvent *event) { completionKeyPressEvent(event); } void focusInEvent(QFocusEvent *event) { completionFocusInEvent(event); } void focusOutEvent(QFocusEvent *event); diff --git a/ui/qt/qcustomplot.cpp b/ui/qt/qcustomplot.cpp index 8cba9e1cf7..a289e3ea7e 100644 --- a/ui/qt/qcustomplot.cpp +++ b/ui/qt/qcustomplot.cpp @@ -2174,9 +2174,7 @@ QList<QCPLayoutElement*> QCPLayout::elements(bool recursive) const { const int c = elementCount(); QList<QCPLayoutElement*> result; -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) result.reserve(c); -#endif for (int i=0; i<c; ++i) result.append(elementAt(i)); if (recursive) @@ -2900,9 +2898,7 @@ QList<QCPLayoutElement*> QCPLayoutGrid::elements(bool recursive) const QList<QCPLayoutElement*> result; int colC = columnCount(); int rowC = rowCount(); -#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) result.reserve(colC*rowC); -#endif for (int row=0; row<rowC; ++row) { for (int col=0; col<colC; ++col) @@ -5592,11 +5588,7 @@ void QCPAxis::setupTickVectors() { for (int i=mLowestVisibleTick; i<=mHighestVisibleTick; ++i) { -#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) // use fromMSecsSinceEpoch function if available, to gain sub-second accuracy on tick labels (e.g. for format "hh:mm:ss:zzz") - mTickVectorLabels[i] = mParentPlot->locale().toString(QDateTime::fromTime_t(mTickVector.at(i)).toTimeSpec(mDateTimeSpec), mDateTimeFormat); -#else mTickVectorLabels[i] = mParentPlot->locale().toString(QDateTime::fromMSecsSinceEpoch(mTickVector.at(i)*1000).toTimeSpec(mDateTimeSpec), mDateTimeFormat); -#endif } } } else // mAutoTickLabels == false |