summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp75
-rw-r--r--src/widgets/widgets/qabstractbutton.h19
-rw-r--r--src/widgets/widgets/qabstractslider.h14
-rw-r--r--src/widgets/widgets/qbuttongroup.h5
-rw-r--r--src/widgets/widgets/qcheckbox.cpp27
-rw-r--r--src/widgets/widgets/qcheckbox.h16
-rw-r--r--src/widgets/widgets/qcombobox.cpp30
-rw-r--r--src/widgets/widgets/qcombobox.h46
-rw-r--r--src/widgets/widgets/qdial.cpp35
-rw-r--r--src/widgets/widgets/qdial.h11
-rw-r--r--src/widgets/widgets/qframe.cpp13
-rw-r--r--src/widgets/widgets/qframe.h4
-rw-r--r--src/widgets/widgets/qgroupbox.cpp26
-rw-r--r--src/widgets/widgets/qgroupbox.h5
-rw-r--r--src/widgets/widgets/qlabel.cpp83
-rw-r--r--src/widgets/widgets/qlabel.h12
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp43
-rw-r--r--src/widgets/widgets/qlcdnumber.h8
-rw-r--r--src/widgets/widgets/qlineedit.cpp139
-rw-r--r--src/widgets/widgets/qlineedit.h47
-rw-r--r--src/widgets/widgets/qmainwindow.cpp13
-rw-r--r--src/widgets/widgets/qmainwindow.h3
-rw-r--r--src/widgets/widgets/qmenubar.cpp13
-rw-r--r--src/widgets/widgets/qmenubar.h3
-rw-r--r--src/widgets/widgets/qmenubar_p.h6
-rw-r--r--src/widgets/widgets/qpushbutton.cpp40
-rw-r--r--src/widgets/widgets/qpushbutton.h9
-rw-r--r--src/widgets/widgets/qradiobutton.cpp27
-rw-r--r--src/widgets/widgets/qradiobutton.h5
-rw-r--r--src/widgets/widgets/qscrollbar.cpp45
-rw-r--r--src/widgets/widgets/qscrollbar.h8
-rw-r--r--src/widgets/widgets/qsizegrip.cpp15
-rw-r--r--src/widgets/widgets/qsizegrip.h3
-rw-r--r--src/widgets/widgets/qslider.cpp67
-rw-r--r--src/widgets/widgets/qslider.h13
-rw-r--r--src/widgets/widgets/qspinbox.cpp29
-rw-r--r--src/widgets/widgets/qspinbox.h12
-rw-r--r--src/widgets/widgets/qsplashscreen.h5
-rw-r--r--src/widgets/widgets/qsplitter.cpp149
-rw-r--r--src/widgets/widgets/qsplitter.h14
-rw-r--r--src/widgets/widgets/qstatusbar.cpp52
-rw-r--r--src/widgets/widgets/qstatusbar.h9
-rw-r--r--src/widgets/widgets/qtabbar.cpp3
-rw-r--r--src/widgets/widgets/qtabbar.h6
-rw-r--r--src/widgets/widgets/qtabwidget.cpp17
-rw-r--r--src/widgets/widgets/qtabwidget.h63
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp13
-rw-r--r--src/widgets/widgets/qtextedit.cpp154
-rw-r--r--src/widgets/widgets/qtextedit.h86
-rw-r--r--src/widgets/widgets/qtoolbar.cpp12
-rw-r--r--src/widgets/widgets/qtoolbar.h8
-rw-r--r--src/widgets/widgets/qtoolbox.cpp14
-rw-r--r--src/widgets/widgets/qtoolbox.h16
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp187
-rw-r--r--src/widgets/widgets/qtoolbutton.h53
-rw-r--r--src/widgets/widgets/qworkspace.cpp32
-rw-r--r--src/widgets/widgets/qworkspace.h5
57 files changed, 0 insertions, 1867 deletions
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index d777cc7567..de0b2b0330 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -1391,80 +1391,5 @@ void QAbstractButton::setIconSize(const QSize &size)
}
-#ifdef QT3_SUPPORT
-/*!
- Use icon() instead.
-*/
-QIcon *QAbstractButton::iconSet() const
-{
- Q_D(const QAbstractButton);
- if (!d->icon.isNull())
- return const_cast<QIcon *>(&d->icon);
- return 0;
-}
-
-/*!
- Use QAbstractButton(QWidget *) instead.
-
- Call setObjectName() if you want to specify an object name, and
- setParent() if you want to set the window flags.
-*/
-QAbstractButton::QAbstractButton(QWidget *parent, const char *name, Qt::WindowFlags f)
- : QWidget(*new QAbstractButtonPrivate, parent, f)
-{
- Q_D(QAbstractButton);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*! \fn bool QAbstractButton::isOn() const
-
- Use isChecked() instead.
-*/
-
-/*!
- \fn QPixmap *QAbstractButton::pixmap() const
-
- This compatibility function always returns 0.
-
- Use icon() instead.
-*/
-
-/*! \fn void QAbstractButton::setPixmap(const QPixmap &p)
-
- Use setIcon() instead.
-*/
-
-/*! \fn void QAbstractButton::setIconSet(const QIcon &icon)
-
- Use setIcon() instead.
-*/
-
-/*! \fn void QAbstractButton::setOn(bool b)
-
- Use setChecked() instead.
-*/
-
-/*! \fn bool QAbstractButton::isToggleButton() const
-
- Use isCheckable() instead.
-*/
-
-/*!
- \fn void QAbstractButton::setToggleButton(bool b)
-
- Use setCheckable() instead.
-*/
-
-/*! \fn void QAbstractButton::setAccel(const QKeySequence &key)
-
- Use setShortcut() instead.
-*/
-
-/*! \fn QKeySequence QAbstractButton::accel() const
-
- Use shortcut() instead.
-*/
-#endif
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qabstractbutton.h b/src/widgets/widgets/qabstractbutton.h
index 9edfa1b267..6527c6cd32 100644
--- a/src/widgets/widgets/qabstractbutton.h
+++ b/src/widgets/widgets/qabstractbutton.h
@@ -144,25 +144,6 @@ protected:
void changeEvent(QEvent *e);
void timerEvent(QTimerEvent *e);
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QAbstractButton(QWidget *parent, const char *name, Qt::WindowFlags f=0);
- inline QT3_SUPPORT bool isOn() const { return isChecked(); }
- inline QT3_SUPPORT const QPixmap *pixmap() const { return 0; } // help styles compile
- inline QT3_SUPPORT void setPixmap( const QPixmap &p ) {
- setIcon(QIcon(p));
- setIconSize(p.size());
- }
- QT3_SUPPORT QIcon *iconSet() const;
- inline QT3_SUPPORT void setIconSet(const QIcon &icon) { setIcon(icon); }
- inline QT3_SUPPORT bool isToggleButton() const { return isCheckable(); }
- inline QT3_SUPPORT void setToggleButton(bool b) { setCheckable(b); }
- inline QT3_SUPPORT void setAccel(const QKeySequence &key) { setShortcut(key); }
- inline QT3_SUPPORT QKeySequence accel() const { return shortcut(); }
-
-public Q_SLOTS:
- inline QT_MOC_COMPAT void setOn(bool b) { setChecked(b); }
-#endif
protected:
QAbstractButton(QAbstractButtonPrivate &dd, QWidget* parent = 0);
diff --git a/src/widgets/widgets/qabstractslider.h b/src/widgets/widgets/qabstractslider.h
index 109798154e..b1f63a2c89 100644
--- a/src/widgets/widgets/qabstractslider.h
+++ b/src/widgets/widgets/qabstractslider.h
@@ -154,20 +154,6 @@ protected:
#endif
void changeEvent(QEvent *e);
-#ifdef QT3_SUPPORT
-public:
- inline QT3_SUPPORT int minValue() const { return minimum(); }
- inline QT3_SUPPORT int maxValue() const { return maximum(); }
- inline QT3_SUPPORT int lineStep() const { return singleStep(); }
- inline QT3_SUPPORT void setMinValue(int v) { setMinimum(v); }
- inline QT3_SUPPORT void setMaxValue(int v) { setMaximum(v); }
- inline QT3_SUPPORT void setLineStep(int v) { setSingleStep(v); }
- inline QT3_SUPPORT void setSteps(int single, int page) { setSingleStep(single); setPageStep(page); }
- inline QT3_SUPPORT void addPage() { triggerAction(SliderPageStepAdd); }
- inline QT3_SUPPORT void subtractPage() { triggerAction(SliderPageStepSub); }
- inline QT3_SUPPORT void addLine() { triggerAction(SliderSingleStepAdd); }
- inline QT3_SUPPORT void subtractLine() { triggerAction(SliderSingleStepSub); }
-#endif
protected:
QAbstractSlider(QAbstractSliderPrivate &dd, QWidget *parent=0);
diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h
index e3ef34644e..56f93c0332 100644
--- a/src/widgets/widgets/qbuttongroup.h
+++ b/src/widgets/widgets/qbuttongroup.h
@@ -90,11 +90,6 @@ Q_SIGNALS:
void buttonReleased(QAbstractButton *);
void buttonReleased(int);
-#ifdef QT3_SUPPORT
-public:
- inline QT3_SUPPORT void insert(QAbstractButton *b) { addButton(b); }
- inline QT3_SUPPORT void remove(QAbstractButton *b) { removeButton(b); }
-#endif
private:
Q_DISABLE_COPY(QButtonGroup)
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index c6d1317147..639bfb4513 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -385,33 +385,6 @@ bool QCheckBox::event(QEvent *e)
return QAbstractButton::event(e);
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QCheckBox::QCheckBox(QWidget *parent, const char* name)
- : QAbstractButton (*new QCheckBoxPrivate, parent)
-{
- Q_D(QCheckBox);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QCheckBox::QCheckBox(const QString &text, QWidget *parent, const char* name)
- : QAbstractButton (*new QCheckBoxPrivate, parent)
-{
- Q_D(QCheckBox);
- setObjectName(QString::fromAscii(name));
- d->init();
- setText(text);
-}
-
-#endif
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qcheckbox.h b/src/widgets/widgets/qcheckbox.h
index b040b13be1..d9a1aaaf3d 100644
--- a/src/widgets/widgets/qcheckbox.h
+++ b/src/widgets/widgets/qcheckbox.h
@@ -85,22 +85,6 @@ protected:
void mouseMoveEvent(QMouseEvent *);
void initStyleOption(QStyleOptionButton *option) const;
-#ifdef QT3_SUPPORT
-public:
- enum ToggleState {
- Off = Qt::Unchecked,
- NoChange = Qt::PartiallyChecked,
- On = Qt::Checked
- };
- inline QT3_SUPPORT ToggleState state() const
- { return static_cast<QCheckBox::ToggleState>(static_cast<int>(checkState())); }
- inline QT3_SUPPORT void setState(ToggleState state)
- { setCheckState(static_cast<Qt::CheckState>(static_cast<int>(state))); }
- inline QT3_SUPPORT void setNoChange()
- { setCheckState(Qt::PartiallyChecked); }
- QT3_SUPPORT_CONSTRUCTOR QCheckBox(QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QCheckBox(const QString &text, QWidget *parent, const char* name);
-#endif
private:
Q_DECLARE_PRIVATE(QCheckBox)
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 650227214a..f6a9b53b8d 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -860,33 +860,6 @@ QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QComboBox::QComboBox(QWidget *parent, const char *name)
- : QWidget(*new QComboBoxPrivate(), parent, 0)
-{
- Q_D(QComboBox);
- d->init();
- setObjectName(QString::fromAscii(name));
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QComboBox::QComboBox(bool rw, QWidget *parent, const char *name)
- : QWidget(*new QComboBoxPrivate(), parent, 0)
-{
- Q_D(QComboBox);
- d->init();
- setEditable(rw);
- setObjectName(QString::fromAscii(name));
-}
-
-#endif //QT3_SUPPORT
/*!
\class QComboBox
@@ -1736,9 +1709,6 @@ void QComboBox::setLineEdit(QLineEdit *edit)
connect(d->lineEdit, SIGNAL(returnPressed()), this, SLOT(_q_returnPressed()));
connect(d->lineEdit, SIGNAL(editingFinished()), this, SLOT(_q_editingFinished()));
connect(d->lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(editTextChanged(QString)));
-#ifdef QT3_SUPPORT
- connect(d->lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(textChanged(QString)));
-#endif
d->lineEdit->setFrame(false);
d->lineEdit->setContextMenuPolicy(Qt::NoContextMenu);
d->lineEdit->setFocusProxy(this);
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index ed766cc004..f0cffc2fcf 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -134,9 +134,6 @@ public:
BeforeCurrent = InsertBeforeCurrent
#endif
};
-#ifdef QT3_SUPPORT
- typedef InsertPolicy Policy;
-#endif
InsertPolicy insertPolicy() const;
void setInsertPolicy(InsertPolicy policy);
@@ -253,49 +250,6 @@ protected:
QVariant inputMethodQuery(Qt::InputMethodQuery) const;
void initStyleOption(QStyleOptionComboBox *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QComboBox(QWidget *parent, const char *name);
- QT3_SUPPORT_CONSTRUCTOR QComboBox(bool rw, QWidget *parent, const char *name = 0);
- inline QT3_SUPPORT int currentItem() const { return currentIndex(); }
- inline QT3_SUPPORT void setCurrentItem(int index) { setCurrentIndex(index); }
- inline QT3_SUPPORT InsertPolicy insertionPolicy() const { return insertPolicy(); }
- inline QT3_SUPPORT void setInsertionPolicy(InsertPolicy policy) { setInsertPolicy(policy); }
- inline QT3_SUPPORT bool editable() const { return isEditable(); }
- inline QT3_SUPPORT void popup() { showPopup(); }
- inline QT3_SUPPORT void setCurrentText(const QString& text) {
- int i = findText(text);
- if (i != -1)
- setCurrentIndex(i);
- else if (isEditable())
- setEditText(text);
- else
- setItemText(currentIndex(), text);
- }
- inline QT3_SUPPORT QString text(int index) const { return itemText(index); }
-
- inline QT3_SUPPORT QPixmap pixmap(int index) const
- { return itemIcon(index).pixmap(iconSize(), isEnabled() ? QIcon::Normal : QIcon::Disabled); }
- inline QT3_SUPPORT void insertStringList(const QStringList &list, int index = -1)
- { insertItems((index < 0 ? count() : index), list); }
- inline QT3_SUPPORT void insertItem(const QString &text, int index = -1)
- { insertItem((index < 0 ? count() : index), text); }
- inline QT3_SUPPORT void insertItem(const QPixmap &pix, int index = -1)
- { insertItem((index < 0 ? count() : index), QIcon(pix), QString()); }
- inline QT3_SUPPORT void insertItem(const QPixmap &pix, const QString &text, int index = -1)
- { insertItem((index < 0 ? count() : index), QIcon(pix), text); }
- inline QT3_SUPPORT void changeItem(const QString &text, int index)
- { setItemText(index, text); }
- inline QT3_SUPPORT void changeItem(const QPixmap &pix, int index)
- { setItemIcon(index, QIcon(pix)); }
- inline QT3_SUPPORT void changeItem(const QPixmap &pix, const QString &text, int index)
- { setItemIcon(index, QIcon(pix)); setItemText(index, text); }
- inline QT3_SUPPORT void clearValidator() { setValidator(0); }
- inline QT3_SUPPORT void clearEdit() { clearEditText(); }
-
-Q_SIGNALS:
- QT_MOC_COMPAT void textChanged(const QString &);
-#endif
protected:
QComboBox(QComboBoxPrivate &, QWidget *);
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index e2b1983f66..e79583c87c 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -91,11 +91,6 @@ void QDialPrivate::init()
Q_Q(QDial);
showNotches = false;
q->setFocusPolicy(Qt::WheelFocus);
-#ifdef QT3_SUPPORT
- QObject::connect(q, SIGNAL(sliderPressed()), q, SIGNAL(dialPressed()));
- QObject::connect(q, SIGNAL(sliderMoved(int)), q, SIGNAL(dialMoved(int)));
- QObject::connect(q, SIGNAL(sliderReleased()), q, SIGNAL(dialReleased()));
-#endif
}
int QDialPrivate::bound(int val) const
@@ -259,36 +254,6 @@ QDial::QDial(QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QDial::QDial(QWidget *parent, const char *name)
- : QAbstractSlider(*new QDialPrivate, parent)
-{
- Q_D(QDial);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QDial::QDial(int minValue, int maxValue, int pageStep, int value,
- QWidget *parent, const char *name)
- : QAbstractSlider(*new QDialPrivate, parent)
-{
- Q_D(QDial);
- setObjectName(QString::fromAscii(name));
- d->minimum = minValue;
- d->maximum = maxValue;
- d->pageStep = pageStep;
- d->position = d->value = value;
- d->init();
-}
-#endif
/*!
Destroys the dial.
*/
diff --git a/src/widgets/widgets/qdial.h b/src/widgets/widgets/qdial.h
index 7687b7e7a1..317a50df35 100644
--- a/src/widgets/widgets/qdial.h
+++ b/src/widgets/widgets/qdial.h
@@ -96,17 +96,6 @@ protected:
void sliderChange(SliderChange change);
void initStyleOption(QStyleOptionSlider *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QDial(int minValue, int maxValue, int pageStep, int value,
- QWidget* parent = 0, const char* name = 0);
- QT3_SUPPORT_CONSTRUCTOR QDial(QWidget *parent, const char *name);
-
-Q_SIGNALS:
- QT_MOC_COMPAT void dialPressed();
- QT_MOC_COMPAT void dialMoved(int value);
- QT_MOC_COMPAT void dialReleased();
-#endif
private:
Q_DECLARE_PRIVATE(QDial)
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index 083136f9fe..83261c4875 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -220,19 +220,6 @@ QFrame::QFrame(QFramePrivate &dd, QWidget* parent, Qt::WindowFlags f)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QFrame::QFrame(QWidget *parent, const char *name, Qt::WindowFlags f)
- : QWidget(*new QFramePrivate, parent, f)
-{
- Q_D(QFrame);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-#endif
/*!
Destroys the frame.
diff --git a/src/widgets/widgets/qframe.h b/src/widgets/widgets/qframe.h
index 80d41365cd..bee80403ab 100644
--- a/src/widgets/widgets/qframe.h
+++ b/src/widgets/widgets/qframe.h
@@ -128,10 +128,6 @@ protected:
void changeEvent(QEvent *);
void drawFrame(QPainter *);
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QFrame(QWidget* parent, const char* name, Qt::WindowFlags f = 0);
-#endif
protected:
QFrame(QFramePrivate &dd, QWidget* parent = 0, Qt::WindowFlags f = 0);
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index 56fb2dd412..b9bf1ecc9d 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -747,32 +747,6 @@ void QGroupBox::mouseReleaseEvent(QMouseEvent *event)
update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QGroupBox::QGroupBox(QWidget *parent, const char *name)
- : QWidget(*new QGroupBoxPrivate, parent, 0)
-{
- Q_D(QGroupBox);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QGroupBox::QGroupBox(const QString &title, QWidget *parent, const char *name)
- : QWidget(*new QGroupBoxPrivate, parent, 0)
-{
- Q_D(QGroupBox);
- setObjectName(QString::fromAscii(name));
- d->init();
- setTitle(title);
-}
-#endif // QT3_SUPPORT
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qgroupbox.h b/src/widgets/widgets/qgroupbox.h
index fba094d303..a4e2327267 100644
--- a/src/widgets/widgets/qgroupbox.h
+++ b/src/widgets/widgets/qgroupbox.h
@@ -101,11 +101,6 @@ protected:
void mouseReleaseEvent(QMouseEvent *event);
void initStyleOption(QStyleOptionGroupBox *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QGroupBox(QWidget* parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QGroupBox(const QString &title, QWidget* parent, const char* name);
-#endif
private:
Q_DISABLE_COPY(QGroupBox)
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index b122632e44..8a698c528a 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -193,75 +193,6 @@ QLabel::QLabel(const QString &text, QWidget *parent, Qt::WindowFlags f)
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
- Constructs an empty label.
-
- The \a parent, \a name and widget flag \a f, arguments are passed
- to the QFrame constructor.
-
- \sa setAlignment(), setFrameStyle(), setIndent()
-*/
-
-QLabel::QLabel(QWidget *parent, const char *name, Qt::WindowFlags f)
- : QFrame(*new QLabelPrivate(), parent, f)
-{
- Q_D(QLabel);
- if (name)
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-
-/*! \obsolete
- Constructs a label that displays the text, \a text.
-
- The \a parent, \a name and widget flag \a f, arguments are passed
- to the QFrame constructor.
-
- \sa setText(), setAlignment(), setFrameStyle(), setIndent()
-*/
-
-QLabel::QLabel(const QString &text, QWidget *parent, const char *name,
- Qt::WindowFlags f)
- : QFrame(*new QLabelPrivate(), parent, f)
-{
- Q_D(QLabel);
- if (name)
- setObjectName(QString::fromAscii(name));
- d->init();
- setText(text);
-}
-
-
-/*! \obsolete
- Constructs a label that displays the text \a text. The label has a
- buddy widget, \a buddy.
-
- If the \a text contains an underlined letter (a letter preceded by
- an ampersand, \&), when the user presses Alt+ the underlined letter,
- focus is passed to the buddy widget.
-
- The \a parent, \a name and widget flag, \a f, arguments are passed
- to the QFrame constructor.
-
- \sa setText(), setBuddy(), setAlignment(), setFrameStyle(),
- setIndent()
-*/
-QLabel::QLabel(QWidget *buddy, const QString &text,
- QWidget *parent, const char *name, Qt::WindowFlags f)
- : QFrame(*new QLabelPrivate(), parent, f)
-{
- Q_D(QLabel);
- if (name)
- setObjectName(QString::fromAscii(name));
- d->init();
-#ifndef QT_NO_SHORTCUT
- setBuddy(buddy);
-#endif
- setText(text);
-}
-#endif //QT3_SUPPORT
/*!
Destroys the label.
@@ -512,20 +443,6 @@ void QLabel::setAlignment(Qt::Alignment alignment)
d->updateLabel();
}
-#ifdef QT3_SUPPORT
-/*!
- Use setAlignment(Qt::Alignment) instead.
-
- If \a alignment specifies text flags as well, use setTextFormat()
- to set those.
-*/
-void QLabel::setAlignment(int alignment)
-{
- Q_D(QLabel);
- d->align = alignment & ~(Qt::AlignVertical_Mask|Qt::AlignHorizontal_Mask|Qt::TextWordWrap);
- setAlignment(Qt::Alignment(QFlag(alignment)));
-}
-#endif
Qt::Alignment QLabel::alignment() const
{
diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h
index d8fc297299..e249c2d876 100644
--- a/src/widgets/widgets/qlabel.h
+++ b/src/widgets/widgets/qlabel.h
@@ -148,18 +148,6 @@ protected:
void focusOutEvent(QFocusEvent *ev);
bool focusNextPrevChild(bool next);
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QLabel(QWidget *parent, const char* name, Qt::WindowFlags f=0);
- QT3_SUPPORT_CONSTRUCTOR QLabel(const QString &text, QWidget *parent, const char* name,
- Qt::WindowFlags f=0);
- QT3_SUPPORT_CONSTRUCTOR QLabel(QWidget *buddy, const QString &,
- QWidget *parent=0, const char* name=0, Qt::WindowFlags f=0);
- QT3_SUPPORT void setAlignment(int alignment);
-
- // don't mark the next function with QT3_SUPPORT
- inline void setAlignment(Qt::AlignmentFlag flag) { setAlignment((Qt::Alignment)flag); }
-#endif
private:
Q_DISABLE_COPY(QLabel)
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 1e034cf3ed..a591339ea4 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -336,49 +336,6 @@ static const char *getSegments(char ch) // gets list of segments f
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
- Constructs an LCD number, sets the number of digits to 5, the base
- to decimal, the decimal point mode to 'small' and the frame style
- to a raised box. The segmentStyle() is set to \c Outline.
-
- The \a parent and \a name arguments are passed to the QFrame
- constructor.
-
- \sa setDigitCount(), setSmallDecimalPoint()
-*/
-
-QLCDNumber::QLCDNumber(QWidget *parent, const char *name)
- : QFrame(*new QLCDNumberPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- Q_D(QLCDNumber);
- d->ndigits = 5;
- d->init();
-}
-
-
-/*! \obsolete
- Constructs an LCD number, sets the number of digits to \a
- numDigits, the base to decimal, the decimal point mode to 'small'
- and the frame style to a raised box. The segmentStyle() is set to
- \c Outline.
-
- The \a parent and \a name arguments are passed to the QFrame
- constructor.
-
- \sa setDigitCount(), setSmallDecimalPoint()
-*/
-
-QLCDNumber::QLCDNumber(uint numDigits, QWidget *parent, const char *name)
- : QFrame(*new QLCDNumberPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- Q_D(QLCDNumber);
- d->ndigits = numDigits;
- d->init();
-}
-#endif //QT3_SUPPORT
/*!
Constructs an LCD number, sets the number of digits to 5, the base
diff --git a/src/widgets/widgets/qlcdnumber.h b/src/widgets/widgets/qlcdnumber.h
index 7b104cbfcf..b48fbedc46 100644
--- a/src/widgets/widgets/qlcdnumber.h
+++ b/src/widgets/widgets/qlcdnumber.h
@@ -121,14 +121,6 @@ protected:
void paintEvent(QPaintEvent *);
public:
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QLCDNumber(QWidget* parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QLCDNumber(uint numDigits, QWidget* parent, const char* name);
-
- QT3_SUPPORT void setMargin(int margin) { setContentsMargins(margin, margin, margin, margin); }
- QT3_SUPPORT int margin() const
- { int margin; int dummy; getContentsMargins(&margin, &dummy, &dummy, &dummy); return margin; }
-#endif
private:
Q_DISABLE_COPY(QLCDNumber)
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 30f90cd5db..55b5cd81eb 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -291,67 +291,6 @@ QLineEdit::QLineEdit(const QString& contents, QWidget* parent)
}
-#ifdef QT3_SUPPORT
-/*!
- Constructs a line edit with no text.
-
- The maximum text length is set to 32767 characters.
-
- The \a parent and \a name arguments are sent to the QWidget constructor.
-
- \sa setText(), setMaxLength()
-*/
-QLineEdit::QLineEdit(QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent,0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(QString());
-}
-
-/*!
- Constructs a line edit containing the text \a contents.
-
- The cursor position is set to the end of the line and the maximum
- text length to 32767 characters.
-
- The \a parent and \a name arguments are sent to the QWidget
- constructor.
-
- \sa text(), setMaxLength()
-*/
-
-QLineEdit::QLineEdit(const QString& contents, QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent, 0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(contents);
-}
-
-/*!
- Constructs a line edit with an input \a inputMask and the text \a
- contents.
-
- The cursor position is set to the end of the line and the maximum
- text length is set to the length of the mask (the number of mask
- characters and separators).
-
- The \a parent and \a name arguments are sent to the QWidget
- constructor.
-
- \sa setMask() text()
-*/
-QLineEdit::QLineEdit(const QString& contents, const QString &inputMask, QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent, 0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(contents);
- d->control->setInputMask(inputMask);
- d->control->moveCursor(d->control->nextMaskBlank(contents.length()));
-}
-#endif
/*!
Destroys the line edit.
@@ -730,33 +669,6 @@ int QLineEdit::cursorPositionAt(const QPoint &pos)
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
-
- Use setText(), setCursorPosition() and setSelection() instead.
-*/
-bool QLineEdit::validateAndSet(const QString &newText, int newPos,
- int newMarkAnchor, int newMarkDrag)
-{
- // The suggested functions above in the docs don't seem to validate,
- // below code tries to mimic previous behaviour.
- QString oldText = text();
- setText(newText);
- if(!hasAcceptableInput()){
- setText(oldText);
- return false;
- }
- int selstart = qMin(newMarkAnchor, newMarkDrag);
- int sellength = qAbs(newMarkAnchor - newMarkDrag);
- if (selstart == newPos) {
- selstart = qMax(newMarkAnchor, newMarkDrag);
- sellength = -sellength;
- }
- //setSelection also set the position
- setSelection(selstart, sellength);
- return true;
-}
-#endif //QT3_SUPPORT
/*!
\property QLineEdit::alignment
@@ -986,54 +898,6 @@ int QLineEdit::selectionStart() const
}
-#ifdef QT3_SUPPORT
-
-/*!
- \fn void QLineEdit::lostFocus()
-
- This signal is emitted when the line edit has lost focus.
-
- Use editingFinished() instead
- \sa editingFinished(), returnPressed()
-*/
-
-/*!
- Use isModified() instead.
-*/
-bool QLineEdit::edited() const { return isModified(); }
-/*!
- Use setModified() or setText().
-*/
-void QLineEdit::setEdited(bool on) { setModified(on); }
-
-/*!
- There exists no equivalent functionality in Qt 4.
-*/
-int QLineEdit::characterAt(int xpos, QChar *chr) const
-{
- Q_D(const QLineEdit);
- int pos = d->xToPos(xpos + contentsRect().x() - d->hscroll + d->horizontalMargin);
- QString txt = d->control->text();
- if (chr && pos < (int) txt.length())
- *chr = txt.at(pos);
- return pos;
-
-}
-
-/*!
- Use selectedText() and selectionStart() instead.
-*/
-bool QLineEdit::getSelection(int *start, int *end)
-{
- Q_D(QLineEdit);
- if (d->control->hasSelectedText() && start && end) {
- *start = selectionStart();
- *end = *start + selectedText().length();
- return true;
- }
- return false;
-}
-#endif
/*!
@@ -1857,9 +1721,6 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
|| !(QApplication::activePopupWidget() && QApplication::activePopupWidget()->parentWidget() == this)) {
if (hasAcceptableInput() || d->control->fixup())
emit editingFinished();
-#ifdef QT3_SUPPORT
- emit lostFocus();
-#endif
}
#ifdef Q_WS_MAC
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)
diff --git a/src/widgets/widgets/qlineedit.h b/src/widgets/widgets/qlineedit.h
index b0971db968..107710eccc 100644
--- a/src/widgets/widgets/qlineedit.h
+++ b/src/widgets/widgets/qlineedit.h
@@ -90,11 +90,6 @@ class Q_WIDGETS_EXPORT QLineEdit : public QWidget
public:
explicit QLineEdit(QWidget* parent=0);
explicit QLineEdit(const QString &, QWidget* parent=0);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QLineEdit(QWidget* parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QLineEdit(const QString &, QWidget* parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QLineEdit(const QString &, const QString &, QWidget* parent=0, const char* name=0);
-#endif
~QLineEdit();
QString text() const;
@@ -218,9 +213,6 @@ protected:
#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent *);
#endif
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void repaintArea(int, int) { update(); }
-#endif
void inputMethodEvent(QInputMethodEvent *);
void initStyleOption(QStyleOptionFrame *option) const;
@@ -231,45 +223,6 @@ protected:
QRect cursorRect() const;
public:
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void clearModified() { setModified(false); }
- inline QT3_SUPPORT void cursorLeft(bool mark, int steps = 1) { cursorForward(mark, -steps); }
- inline QT3_SUPPORT void cursorRight(bool mark, int steps = 1) { cursorForward(mark, steps); }
- QT3_SUPPORT bool validateAndSet(const QString &, int, int, int);
- inline QT3_SUPPORT bool frame() const { return hasFrame(); }
-#ifndef QT_NO_VALIDATOR
- inline QT3_SUPPORT void clearValidator() { setValidator(0); }
-#endif
- inline QT3_SUPPORT bool hasMarkedText() const { return hasSelectedText(); }
- inline QT3_SUPPORT QString markedText() const { return selectedText(); }
- QT3_SUPPORT bool edited() const;
- QT3_SUPPORT void setEdited(bool);
- QT3_SUPPORT int characterAt(int, QChar*) const;
- QT3_SUPPORT bool getSelection(int *, int *);
-
- QT3_SUPPORT void setFrameRect(QRect) {}
- QT3_SUPPORT QRect frameRect() const { return QRect(); }
- enum DummyFrame { Box, Sunken, Plain, Raised, MShadow, NoFrame, Panel, StyledPanel,
- HLine, VLine, GroupBoxPanel, WinPanel, ToolBarPanel, MenuBarPanel,
- PopupPanel, LineEditPanel, TabWidgetPanel, MShape };
- QT3_SUPPORT void setFrameShadow(DummyFrame) {}
- QT3_SUPPORT DummyFrame frameShadow() const { return Plain; }
- QT3_SUPPORT void setFrameShape(DummyFrame) {}
- QT3_SUPPORT DummyFrame frameShape() const { return NoFrame; }
- QT3_SUPPORT void setFrameStyle(int) {}
- QT3_SUPPORT int frameStyle() const { return 0; }
- QT3_SUPPORT int frameWidth() const { return 0; }
- QT3_SUPPORT void setLineWidth(int) {}
- QT3_SUPPORT int lineWidth() const { return 0; }
- QT3_SUPPORT void setMargin(int margin) { setContentsMargins(margin, margin, margin, margin); }
- QT3_SUPPORT int margin() const
- { int margin; int dummy; getContentsMargins(&margin, &dummy, &dummy, &dummy); return margin; }
- QT3_SUPPORT void setMidLineWidth(int) {}
- QT3_SUPPORT int midLineWidth() const { return 0; }
-
-Q_SIGNALS:
- QT_MOC_COMPAT void lostFocus();
-#endif
private:
friend class QAbstractSpinBox;
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index b3bd972497..a53055424a 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -370,19 +370,6 @@ QMainWindow::QMainWindow(QWidget *parent, Qt::WindowFlags flags)
d_func()->init();
}
-#ifdef QT3_SUPPORT
-/*!
- \obsolete
- Constructs a QMainWindow with the given \a parent, \a name, and
- with the specified widget \a flags.
- */
-QMainWindow::QMainWindow(QWidget *parent, const char *name, Qt::WindowFlags flags)
- : QWidget(*(new QMainWindowPrivate()), parent, flags | Qt::WType_TopLevel)
-{
- setObjectName(QString::fromAscii(name));
- d_func()->init();
-}
-#endif
/*!
Destroys the main window.
diff --git a/src/widgets/widgets/qmainwindow.h b/src/widgets/widgets/qmainwindow.h
index f060d3f460..88cff31841 100644
--- a/src/widgets/widgets/qmainwindow.h
+++ b/src/widgets/widgets/qmainwindow.h
@@ -183,9 +183,6 @@ public:
virtual QMenu *createPopupMenu();
#endif
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QMainWindow(QWidget *parent, const char *name, Qt::WindowFlags flags = 0);
-#endif
#ifndef QT_NO_DOCKWIDGET
public Q_SLOTS:
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 385df52adf..2f424b0893 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -59,10 +59,6 @@
#ifndef QT_NO_MENUBAR
-#ifdef QT3_SUPPORT
-#include <private/qaction_p.h>
-#include <qmenudata.h>
-#endif
#include "qmenu_p.h"
#include "qmenubar_p.h"
@@ -259,12 +255,6 @@ void QMenuBarPrivate::updateGeometries()
extension->hide();
}
q->updateGeometry();
-#ifdef QT3_SUPPORT
- if (parent) {
- QMenubarUpdatedEvent menubarUpdated(q);
- QApplication::sendEvent(parent, &menubarUpdated);
- }
-#endif
}
QRect QMenuBarPrivate::actionRect(QAction *act) const
@@ -529,9 +519,6 @@ void QMenuBarPrivate::_q_actionTriggered()
Q_Q(QMenuBar);
if (QAction *action = qobject_cast<QAction *>(q->sender())) {
emit q->triggered(action);
-#ifdef QT3_SUPPORT
- emit q->activated(q->findIdForAction(action));
-#endif
}
}
diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h
index b165ec78f3..0eb668e373 100644
--- a/src/widgets/widgets/qmenubar.h
+++ b/src/widgets/widgets/qmenubar.h
@@ -59,9 +59,6 @@ QT_MODULE(Gui)
class QMenuBarPrivate;
class QStyleOptionMenuItem;
class QWindowsStyle;
-#ifdef QT3_SUPPORT
-class QMenuItem;
-#endif
class Q_WIDGETS_EXPORT QMenuBar : public QWidget
{
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index 5f482c228e..e9201fc877 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -79,9 +79,6 @@ public:
QMenuBarPrivate() : itemsDirty(0), currentAction(0), mouseDown(0),
closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0),
nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0)
-#ifdef QT3_SUPPORT
- , doAutoResize(false)
-#endif
#ifdef Q_WS_WINCE
, wce_menubar(0), wceClassicMenu(false)
@@ -165,9 +162,6 @@ public:
QPointer<QAction> defaultAction;
QBasicTimer autoReleaseTimer;
-#ifdef QT3_SUPPORT
- bool doAutoResize;
-#endif
QPlatformMenuBar *platformMenuBar;
#ifdef Q_WS_WINCE
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index a1bc4d9cb9..0094a5a95b 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -714,46 +714,6 @@ bool QPushButtonPrivate::hitButton(const QPoint &pos)
}
#endif // Q_WS_MAC
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QPushButton::QPushButton(QWidget *parent, const char *name)
- : QAbstractButton(*new QPushButtonPrivate, parent)
-{
- Q_D(QPushButton);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QPushButton::QPushButton(const QString &text, QWidget *parent, const char *name)
- : QAbstractButton(*new QPushButtonPrivate, parent)
-{
- Q_D(QPushButton);
- setObjectName(QString::fromAscii(name));
- setText(text);
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QPushButton::QPushButton(const QIcon& icon, const QString &text, QWidget *parent, const char *name)
- : QAbstractButton(*new QPushButtonPrivate, parent)
-{
- Q_D(QPushButton);
- setObjectName(QString::fromAscii(name));
- setText(text);
- setIcon(icon);
- d->init();
-}
-#endif
/*!
\fn void QPushButton::openPopup()
diff --git a/src/widgets/widgets/qpushbutton.h b/src/widgets/widgets/qpushbutton.h
index 4f1f85dea4..fefbd9e81f 100644
--- a/src/widgets/widgets/qpushbutton.h
+++ b/src/widgets/widgets/qpushbutton.h
@@ -102,15 +102,6 @@ protected:
QPushButton(QPushButtonPrivate &dd, QWidget* parent = 0);
public:
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QPushButton(QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QPushButton(const QString &text, QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QPushButton(const QIcon& icon, const QString &text, QWidget *parent, const char* name);
- inline QT3_SUPPORT void openPopup() { showMenu(); }
- inline QT3_SUPPORT bool isMenuButton() const { return menu() != 0; }
- inline QT3_SUPPORT void setPopup(QMenu* popup) {setMenu(popup); }
- inline QT3_SUPPORT QMenu* popup() const { return menu(); }
-#endif
private:
Q_DISABLE_COPY(QPushButton)
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index eeef40e00a..778a71dce9 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -265,32 +265,5 @@ bool QRadioButton::event(QEvent *e)
return QAbstractButton::event(e);
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QRadioButton::QRadioButton(QWidget *parent, const char* name)
- : QAbstractButton(*new QRadioButtonPrivate, parent)
-{
- Q_D(QRadioButton);
- d->init();
- setObjectName(QString::fromAscii(name));
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QRadioButton::QRadioButton(const QString &text, QWidget *parent, const char* name)
- : QAbstractButton(*new QRadioButtonPrivate, parent)
-{
- Q_D(QRadioButton);
- d->init();
- setObjectName(QString::fromAscii(name));
- setText(text);
-}
-
-#endif
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qradiobutton.h b/src/widgets/widgets/qradiobutton.h
index e3837253c8..f1d9f5500a 100644
--- a/src/widgets/widgets/qradiobutton.h
+++ b/src/widgets/widgets/qradiobutton.h
@@ -71,11 +71,6 @@ protected:
void mouseMoveEvent(QMouseEvent *);
void initStyleOption(QStyleOptionButton *button) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QRadioButton(QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QRadioButton(const QString &text, QWidget *parent, const char* name);
-#endif
private:
Q_DECLARE_PRIVATE(QRadioButton)
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 534ff6e619..b21d22e5f0 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -364,51 +364,6 @@ QScrollBar::QScrollBar(Qt::Orientation orientation, QWidget *parent)
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QScrollBar::QScrollBar(QWidget *parent, const char *name)
- : QAbstractSlider(*new QScrollBarPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- d_func()->orientation = Qt::Vertical;
- d_func()->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QScrollBar::QScrollBar(Qt::Orientation orientation, QWidget *parent, const char *name)
- : QAbstractSlider(*new QScrollBarPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- d_func()->orientation = orientation;
- d_func()->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QScrollBar::QScrollBar(int minimum, int maximum, int lineStep, int pageStep,
- int value, Qt::Orientation orientation,
- QWidget *parent, const char *name)
- : QAbstractSlider(*new QScrollBarPrivate, parent)
-{
- Q_D(QScrollBar);
- setObjectName(QString::fromAscii(name));
- d->minimum = minimum;
- d->maximum = maximum;
- d->singleStep = lineStep;
- d->pageStep = pageStep;
- d->value = value;
- d->orientation = orientation;
- d->init();
-}
-#endif // QT3_SUPPORT
/*!
Destroys the scroll bar.
diff --git a/src/widgets/widgets/qscrollbar.h b/src/widgets/widgets/qscrollbar.h
index 2fd00de522..f51a000a12 100644
--- a/src/widgets/widgets/qscrollbar.h
+++ b/src/widgets/widgets/qscrollbar.h
@@ -79,14 +79,6 @@ protected:
#endif
void initStyleOption(QStyleOptionSlider *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QScrollBar(QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QScrollBar(Qt::Orientation, QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QScrollBar(int minValue, int maxValue, int lineStep, int pageStep,
- int value, Qt::Orientation, QWidget *parent=0, const char* name = 0);
- inline QT3_SUPPORT bool draggingSlider() { return isSliderDown(); }
-#endif
private:
friend Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollBar);
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index 10e99ba135..c5fe442ece 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -216,21 +216,6 @@ QSizeGrip::QSizeGrip(QWidget * parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- \obsolete
-
- Constructs a resize corner with the given \a name, as a child
- widget of the given \a parent.
-*/
-QSizeGrip::QSizeGrip(QWidget * parent, const char* name)
- : QWidget(*new QSizeGripPrivate, parent, 0)
-{
- Q_D(QSizeGrip);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-#endif
void QSizeGripPrivate::init()
{
diff --git a/src/widgets/widgets/qsizegrip.h b/src/widgets/widgets/qsizegrip.h
index 9e75f38457..144eb8e160 100644
--- a/src/widgets/widgets/qsizegrip.h
+++ b/src/widgets/widgets/qsizegrip.h
@@ -77,9 +77,6 @@ protected:
#endif
public:
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QSizeGrip(QWidget *parent, const char *name);
-#endif
private:
Q_DECLARE_PRIVATE(QSizeGrip)
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index 2858b98781..7aa91e829f 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -312,73 +312,6 @@ QSlider::QSlider(Qt::Orientation orientation, QWidget *parent)
d_func()->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use QSlider() and QObject::setObjectName() instead.
-
- \oldcode
- QSlider *mySlider = new QSlider(parent, name);
- \newcode
- QSlider *mySlider = new QSlider(parent);
- mySlider->setObjectName(name);
- \endcode
-*/
-QSlider::QSlider(QWidget *parent, const char *name)
- : QAbstractSlider(*new QSliderPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- d_func()->orientation = Qt::Vertical;
- d_func()->init();
-}
-
-/*!
- Use QSlider() and QObject::setObjectName() instead.
-
- \oldcode
- QSlider *mySlider = new QSlider(orientation, parent, name);
- \newcode
- QSlider *mySlider = new QSlider(orientation, parent);
- mySlider->setObjectName(name);
- \endcode
-*/
-QSlider::QSlider(Qt::Orientation orientation, QWidget *parent, const char *name)
- : QAbstractSlider(*new QSliderPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- d_func()->orientation = orientation;
- d_func()->init();
-}
-
-/*!
- Use QSlider(), QObject::setObjectName() and the functionality
- inherited from QAbstractSlider instead.
-
- \oldcode
- QSlider *mySlider = new QSlider(minValue, maxValue, pageStep,
- value, orientation, parent, name);
- \newcode
- QSlider *mySlider = new QSlider(orientation, parent);
- mySlider->setObjectName(name);
- mySlider->setMinimum(minValue);
- mySlider->setMaximum(maxValue);
- mySlider->setPageStep(pageStep);
- mySlider->setValue(value);
- \endcode
-*/
-QSlider::QSlider(int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation,
- QWidget *parent, const char *name)
- : QAbstractSlider(*new QSliderPrivate, parent)
-{
- Q_D(QSlider);
- setObjectName(QString::fromAscii(name));
- d->minimum = minValue;
- d->maximum = maxValue;
- d->pageStep = pageStep;
- d->position = d->value = value;
- d->orientation = orientation;
- d->init();
-}
-#endif
/*!
Destroys this slider.
diff --git a/src/widgets/widgets/qslider.h b/src/widgets/widgets/qslider.h
index 907548fcb2..a4552d8cf5 100644
--- a/src/widgets/widgets/qslider.h
+++ b/src/widgets/widgets/qslider.h
@@ -104,19 +104,6 @@ protected:
void mouseMoveEvent(QMouseEvent *ev);
void initStyleOption(QStyleOptionSlider *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QSlider(QWidget *parent, const char *name);
- QT3_SUPPORT_CONSTRUCTOR QSlider(Qt::Orientation, QWidget *parent, const char *name);
- QT3_SUPPORT_CONSTRUCTOR QSlider(int minValue, int maxValue, int pageStep, int value,
- Qt::Orientation orientation,
- QWidget *parent = 0, const char *name = 0);
- inline QT3_SUPPORT void setTickmarks(TickPosition position) { setTickPosition(position); }
- inline QT3_SUPPORT TickPosition tickmarks() const { return tickPosition(); }
-public Q_SLOTS:
- inline QT_MOC_COMPAT void addStep() { triggerAction(SliderSingleStepAdd); }
- inline QT_MOC_COMPAT void subtractStep() { triggerAction(SliderSingleStepSub); }
-#endif
private:
friend Q_WIDGETS_EXPORT QStyleOptionSlider qt_qsliderStyleOption(QSlider *slider);
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 952f9e2728..15a932ad31 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -209,35 +209,6 @@ QSpinBox::QSpinBox(QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QSpinBox::QSpinBox(QWidget *parent, const char *name)
- : QAbstractSpinBox(*new QSpinBoxPrivate, parent)
-{
- Q_D(QSpinBox);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QSpinBox::QSpinBox(int minimum, int maximum, int step, QWidget *parent, const char *name)
- : QAbstractSpinBox(*new QSpinBoxPrivate, parent)
-{
- Q_D(QSpinBox);
- d->minimum = QVariant(qMin<int>(minimum, maximum));
- d->maximum = QVariant(qMax<int>(minimum, maximum));
- d->singleStep = QVariant(step);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-#endif
/*!
\property QSpinBox::value
diff --git a/src/widgets/widgets/qspinbox.h b/src/widgets/widgets/qspinbox.h
index 1421b1d6d2..0846103cca 100644
--- a/src/widgets/widgets/qspinbox.h
+++ b/src/widgets/widgets/qspinbox.h
@@ -67,11 +67,6 @@ class Q_WIDGETS_EXPORT QSpinBox : public QAbstractSpinBox
public:
explicit QSpinBox(QWidget *parent = 0);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QSpinBox(QWidget *parent, const char *name);
- QT3_SUPPORT_CONSTRUCTOR QSpinBox(int min, int max, int step, QWidget *parent,
- const char *name = 0);
-#endif
int value() const;
@@ -94,13 +89,6 @@ public:
void setRange(int min, int max);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void setLineStep(int step) { setSingleStep(step); }
- inline QT3_SUPPORT void setMaxValue(int val) { setMaximum(val); }
- inline QT3_SUPPORT void setMinValue(int val) { setMinimum(val); }
- inline QT3_SUPPORT int maxValue() const { return maximum(); }
- inline QT3_SUPPORT int minValue() const { return minimum(); }
-#endif
protected:
bool event(QEvent *event);
diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h
index 0faaa628c8..133146943e 100644
--- a/src/widgets/widgets/qsplashscreen.h
+++ b/src/widgets/widgets/qsplashscreen.h
@@ -71,11 +71,6 @@ public Q_SLOTS:
void showMessage(const QString &message, int alignment = Qt::AlignLeft,
const QColor &color = Qt::black);
void clearMessage();
-#ifdef QT3_SUPPORT
- inline QT_MOC_COMPAT void message(const QString &str, int alignment = Qt::AlignLeft,
- const QColor &color = Qt::black) { showMessage(str, alignment, color); }
- inline QT_MOC_COMPAT void clear() { clearMessage(); }
-#endif
Q_SIGNALS:
void messageChanged(const QString &message);
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 5d5897311b..12c851b88b 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -809,92 +809,6 @@ QSplitterLayoutStruct *QSplitterPrivate::findWidget(QWidget *w) const
return 0;
}
-#ifdef QT3_SUPPORT
-static void setStretch(QWidget *w, int sf)
-{
- QSizePolicy sp = w->sizePolicy();
- sp.setHorizontalStretch(sf);
- sp.setVerticalStretch(sf);
- w->setSizePolicy(sp);
-}
-
-static int getStretch(const QWidget *w)
-{
- QSizePolicy sp = w->sizePolicy();
- return qMax(sp.horizontalStretch(), sp.verticalStretch());
-}
-
-void QSplitter::setResizeMode(QWidget *w, ResizeMode mode)
-{
- /*
- Internal comment:
-
- This function tries to simulate the Qt 3.x ResizeMode
- behavior using QSizePolicy stretch factors. This isn't easy,
- because the default \l ResizeMode was \l Stretch, not \l
- KeepSize, whereas the default stetch factor is 0.
-
- So what we do is this: When the user calls setResizeMode()
- the first time, we iterate through all the child widgets and
- set their stretch factors to 1. Later on, if children are
- added (using addWidget()), their stretch factors are also set
- to 1.
-
- There is just one problem left: Often, setResizeMode() is
- called \e{before} addWidget(), because addWidget() is called
- from the event loop. In that case, we use a special value,
- 243, instead of 0 to prevent 0 from being overwritten with 1
- in addWidget(). This is a wicked hack, but fortunately it
- only occurs as a result of calling a \c QT3_SUPPORT function.
- */
-
- Q_D(QSplitter);
- bool metWidget = false;
- if (!d->compatMode) {
- d->compatMode = true;
- for (int i = 0; i < d->list.size(); ++i) {
- QSplitterLayoutStruct *s = d->list.at(i);
- if (s->widget == w)
- metWidget = true;
- if (getStretch(s->widget) == 0)
- setStretch(s->widget, 1);
- }
- }
- int sf;
- if (mode == KeepSize)
- sf = metWidget ? 0 : 243;
- else
- sf = 1;
- setStretch(w, sf);
-}
-
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QSplitter::QSplitter(QWidget *parent, const char *name)
- : QFrame(*new QSplitterPrivate, parent)
-{
- Q_D(QSplitter);
- setObjectName(QString::fromAscii(name));
- d->orient = Qt::Horizontal;
- d->init();
-}
-
-
-/*!
- Use one of the constructors that don't take the \a name argument
- and then use setObjectName() instead.
-*/
-QSplitter::QSplitter(Qt::Orientation orientation, QWidget *parent, const char *name)
- : QFrame(*new QSplitterPrivate, parent)
-{
- Q_D(QSplitter);
- setObjectName(QString::fromAscii(name));
- d->orient = orientation;
- d->init();
-}
-#endif
/*!
\internal
@@ -953,15 +867,6 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
if (newHandle && q->isVisible())
newHandle->show(); // will trigger sending of post events
-#ifdef QT3_SUPPORT
- if (compatMode) {
- int sf = getStretch(sls->widget);
- if (sf == 243)
- setStretch(sls->widget, 0);
- else if (sf == 0)
- setStretch(sls->widget, 1);
- }
-#endif
}
return sls;
}
@@ -1372,9 +1277,6 @@ bool QSplitter::event(QEvent *e)
case QEvent::HideToParent:
case QEvent::ShowToParent:
case QEvent::LayoutRequest:
-#ifdef QT3_SUPPORT
- case QEvent::LayoutHint:
-#endif
d->recalc(isVisible());
break;
default:
@@ -1503,57 +1405,6 @@ void QSplitter::setOpaqueResize(bool on)
d->opaque = on;
}
-#ifdef QT3_SUPPORT
-/*!
- \fn void QSplitter::moveToFirst(QWidget *widget)
-
- Use insertWidget(0, \a widget) instead.
-*/
-
-
-/*!
- \fn void QSplitter::moveToLast(QWidget *widget)
-
- Use addWidget(\a widget) instead.
-*/
-
-/*!
- \fn void QSplitter::setResizeMode(QWidget *widget, ResizeMode mode)
-
- Use setStretchFactor() instead.
-
- \oldcode
- splitter->setResizeMode(firstChild, QSplitter::KeepSize);
- splitter->setResizeMode(secondChild, QSplitter::Stretch);
- \newcode
- splitter->setStretchFactor(splitter->indexOf(firstChild), 0);
- splitter->setStretchFactor(splitter->indexOf(secondChild), 1);
- \endcode
-*/
-
-/*!
- \fn void QSplitter::setCollapsible(QWidget *widget, bool collapsible)
-
- Use setCollapsible(indexOf(\a widget, \a collapsible)) instead.
-*/
-
-/*!
- \fn void QSplitter::setMargin(int margin)
- Sets the width of the margin around the contents of the widget to \a margin.
-
- Use QWidget::setContentsMargins() instead.
- \sa margin(), QWidget::setContentsMargins()
-*/
-
-/*!
- \fn int QSplitter::margin() const
- Returns the width of the margin around the contents of the widget.
-
- Use QWidget::getContentsMargins() instead.
- \sa setMargin(), QWidget::getContentsMargins()
-*/
-
-#endif
/*!
\reimp
diff --git a/src/widgets/widgets/qsplitter.h b/src/widgets/widgets/qsplitter.h
index 09d7d3589d..7579e1a2c3 100644
--- a/src/widgets/widgets/qsplitter.h
+++ b/src/widgets/widgets/qsplitter.h
@@ -125,20 +125,6 @@ protected:
void setRubberBand(int position);
int closestLegalPosition(int, int);
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QSplitter(QWidget* parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QSplitter(Qt::Orientation, QWidget* parent, const char* name);
- enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
- QT3_SUPPORT void setResizeMode(QWidget *w, ResizeMode mode);
- inline QT3_SUPPORT void moveToFirst(QWidget *w) { insertWidget(0,w); }
- inline QT3_SUPPORT void moveToLast(QWidget *w) { addWidget(w); }
- inline QT3_SUPPORT void setCollapsible(QWidget *w, bool collapse)
- { setCollapsible(indexOf(w), collapse); }
- QT3_SUPPORT void setMargin(int margin) { setContentsMargins(margin, margin, margin, margin); }
- QT3_SUPPORT int margin() const
- { int margin; int dummy; getContentsMargins(&margin, &dummy, &dummy, &dummy); return margin; }
-#endif
private:
Q_DISABLE_COPY(QSplitter)
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index dbf299a712..b45666b724 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -218,55 +218,6 @@ QRect QStatusBarPrivate::messageRect() const
Status Bar}, {Application Example}
*/
-#ifdef QT3_SUPPORT
-/*!
- Constructs a status bar with a size grip and the given \a parent
- and object \a name.
-
- Use the QStatusBar() constructor and the QObject::setObjectName()
- function instead.
-
- \oldcode
- QStatusBar *myStatusBar = new QStatusBar(parent, name);
- \newcode
- QStatusBar *myStatusBar = new QStatusBar(parent);
- myStatusBar->setObjectName(name);
- \endcode
-*/
-QStatusBar::QStatusBar(QWidget * parent, const char *name)
- : QWidget(*new QStatusBarPrivate, parent, 0)
-{
- Q_D(QStatusBar);
- setObjectName(QString::fromAscii(name));
- d->box = 0;
- d->timer = 0;
-
-#ifndef QT_NO_SIZEGRIP
- d->resizer = 0;
- d->showSizeGrip = false;
- setSizeGripEnabled(true); // causes reformat()
-#else
- reformat();
-#endif
-}
-
-
-/*!
- \fn void QStatusBar::addWidget(QWidget * widget, int stretch, bool permanent)
-
- Use addWidget() or addPermanentWidget() instead, depending on the
- value of the \a permanent parameter.
-
- \oldcode
- QStatusBar *myStatusBar;
- myStatusBar->addWidget(widget, stretch, permanent); // permanent == true
- \newcode
- QStatusBar *myStatusBar;
- myStatusBar->addPermanentWidget(widget, stretch);
- \endcode
- */
-
-#endif
/*!
Constructs a status bar with a size grip and the given \a parent.
@@ -760,9 +711,6 @@ bool QStatusBar::event(QEvent *e)
Q_D(QStatusBar);
if (e->type() == QEvent::LayoutRequest
-#ifdef QT3_SUPPORT
- || e->type() == QEvent::LayoutHint
-#endif
) {
// Calculate new strut height and call reformat() if it has changed
int maxH = fontMetrics().height();
diff --git a/src/widgets/widgets/qstatusbar.h b/src/widgets/widgets/qstatusbar.h
index 32dfed8f7b..c983f6d199 100644
--- a/src/widgets/widgets/qstatusbar.h
+++ b/src/widgets/widgets/qstatusbar.h
@@ -79,15 +79,6 @@ public Q_SLOTS:
void showMessage(const QString &text, int timeout = 0);
void clearMessage();
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QStatusBar(QWidget* parent, const char* name);
- QT3_SUPPORT void addWidget(QWidget *w, int stretch, bool permanent)
- { if (permanent) addPermanentWidget(w, stretch); else addWidget(w, stretch); }
-public Q_SLOTS:
- inline QT_MOC_COMPAT void message(const QString &text, int timeout = 0) { showMessage(text, timeout); }
- inline QT_MOC_COMPAT void clear() { clearMessage(); }
-#endif
Q_SIGNALS:
void messageChanged(const QString &text);
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 26109df6a3..def724983b 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1228,9 +1228,6 @@ void QTabBar::setCurrentIndex(int index)
QAccessible::updateAccessibility(this, index + 1, QAccessible::Selection);
}
#endif
-#ifdef QT3_SUPPORT
- emit selected(index);
-#endif
emit currentChanged(index);
}
}
diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h
index 3e2ff3e9d0..e5e8175733 100644
--- a/src/widgets/widgets/qtabbar.h
+++ b/src/widgets/widgets/qtabbar.h
@@ -202,12 +202,6 @@ protected:
void changeEvent(QEvent *);
void initStyleOption(QStyleOptionTab *option, int tabIndex) const;
-#ifdef QT3_SUPPORT
-public Q_SLOTS:
- QT_MOC_COMPAT void setCurrentTab(int index) { setCurrentIndex(index); }
-Q_SIGNALS:
- QT_MOC_COMPAT void selected(int);
-#endif
friend class QAccessibleTabBar;
private:
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index c6551e591e..0eeb6b35bd 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -345,19 +345,6 @@ QTabWidget::QTabWidget(QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QTabWidget::QTabWidget(QWidget *parent, const char *name, Qt::WindowFlags f)
- : QWidget(*new QTabWidgetPrivate, parent, f)
-{
- Q_D(QTabWidget);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-#endif
/*!
Destroys the tabbed widget.
@@ -743,10 +730,6 @@ void QTabWidgetPrivate::_q_showTab(int index)
if (index < stack->count() && index >= 0)
stack->setCurrentIndex(index);
emit q->currentChanged(index);
-#ifdef QT3_SUPPORT
- emit q->selected(q->tabText(index));
- emit q->currentChanged(stack->widget(index));
-#endif
}
void QTabWidgetPrivate::_q_removeTab(int index)
diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h
index 899b7a5dba..5ee6a38c80 100644
--- a/src/widgets/widgets/qtabwidget.h
+++ b/src/widgets/widgets/qtabwidget.h
@@ -171,69 +171,6 @@ protected:
bool event(QEvent *);
void initStyleOption(QStyleOptionTabWidgetFrame *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QTabWidget(QWidget *parent, const char *name, Qt::WindowFlags f = 0);
-
- inline QT3_SUPPORT void insertTab(QWidget * w, const QString &s, int index = -1) { insertTab(index, w, s); }
- inline QT3_SUPPORT void insertTab(QWidget *child, const QIcon& icon,
- const QString &label, int index = -1) { insertTab(index, child, icon, label); }
-
- inline QT3_SUPPORT void changeTab(QWidget *w, const QString &s) {setTabText(indexOf(w), s); }
- inline QT3_SUPPORT void changeTab(QWidget *w, const QIcon& icon,
- const QString &label) { int idx = indexOf(w); setTabText(idx, label); setTabIcon(idx, icon); }
-
- inline QT3_SUPPORT bool isTabEnabled( QWidget *w) const {return isTabEnabled(indexOf(w)); }
- inline QT3_SUPPORT void setTabEnabled(QWidget *w, bool b) { setTabEnabled(indexOf(w), b); }
-
- inline QT3_SUPPORT QString tabLabel(QWidget *w) const {return tabText(indexOf(w)); }
- inline QT3_SUPPORT void setTabLabel(QWidget *w, const QString &l) { setTabText(indexOf(w), l); }
-
- inline QT3_SUPPORT QIcon tabIconSet(QWidget * w) const {return tabIcon(indexOf(w)); }
- inline QT3_SUPPORT void setTabIconSet(QWidget * w, const QIcon & icon) { setTabIcon(indexOf(w), icon); }
-
- inline QT3_SUPPORT void removeTabToolTip(QWidget * w) {
-#ifndef QT_NO_TOOLTIP
- setTabToolTip(indexOf(w), QString());
-#else
- Q_UNUSED(w);
-#endif
- }
- inline QT3_SUPPORT void setTabToolTip(QWidget * w, const QString & tip) {
-#ifndef QT_NO_TOOLTIP
- setTabToolTip(indexOf(w), tip);
-#else
- Q_UNUSED(w);
- Q_UNUSED(tip);
-#endif
- }
-
- inline QT3_SUPPORT QString tabToolTip(QWidget * w) const {
-#ifndef QT_NO_TOOLTIP
- return tabToolTip(indexOf(w));
-#else
- Q_UNUSED(w);
- return QString();
-#endif
- }
-
- inline QT3_SUPPORT QWidget * currentPage() const { return currentWidget(); }
- inline QT3_SUPPORT QWidget *page(int index) const { return widget(index); }
- inline QT3_SUPPORT QString label(int index) const { return tabText(index); }
- inline QT3_SUPPORT int currentPageIndex() const { return currentIndex(); }
-
- inline QT3_SUPPORT int margin() const { return 0; }
- inline QT3_SUPPORT void setMargin(int) {}
-
-public Q_SLOTS:
- inline QT_MOC_COMPAT void setCurrentPage(int index) { setCurrentIndex(index); }
- inline QT_MOC_COMPAT void showPage(QWidget *w) { setCurrentIndex(indexOf(w)); }
- inline QT_MOC_COMPAT void removePage(QWidget *w) { removeTab(indexOf(w)); }
-
-Q_SIGNALS:
- QT_MOC_COMPAT void currentChanged(QWidget *);
- QT_MOC_COMPAT void selected(const QString&);
-#endif // QT3_SUPPORT
private:
Q_DECLARE_PRIVATE(QTabWidget)
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index cd8fa117b7..f1cdc25def 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -669,19 +669,6 @@ QTextBrowser::QTextBrowser(QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QTextBrowser::QTextBrowser(QWidget *parent, const char *name)
- : QTextEdit(*new QTextBrowserPrivate, parent)
-{
- setObjectName(QString::fromAscii(name));
- Q_D(QTextBrowser);
- d->init();
-}
-#endif
/*!
\internal
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 67be9dbed3..967496cee1 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -571,28 +571,6 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect)
automatic bullet lists are supported.
*/
-#ifdef QT3_SUPPORT
-/*!
- \enum QTextEdit::CursorAction
- \compat
-
- \value MoveBackward
- \value MoveForward
- \value MoveWordBackward
- \value MoveWordForward
- \value MoveUp
- \value MoveDown
- \value MoveLineStart
- \value MoveLineEnd
- \value MoveHome
- \value MoveEnd
- \value MovePageUp
- \value MovePageDown
-
- \omitvalue MovePgUp
- \omitvalue MovePgDown
-*/
-#endif
/*!
Constructs an empty QTextEdit with parent \a
@@ -626,19 +604,6 @@ QTextEdit::QTextEdit(const QString &text, QWidget *parent)
d->init(text);
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QTextEdit::QTextEdit(QWidget *parent, const char *name)
- : QAbstractScrollArea(*new QTextEditPrivate, parent)
-{
- Q_D(QTextEdit);
- d->init();
- setObjectName(QString::fromAscii(name));
-}
-#endif
/*!
@@ -1516,11 +1481,6 @@ void QTextEditPrivate::_q_currentCharFormatChanged(const QTextCharFormat &fmt)
{
Q_Q(QTextEdit);
emit q->currentCharFormatChanged(fmt);
-#ifdef QT3_SUPPORT
- // compat signals
- emit q->currentFontChanged(fmt.font());
- emit q->currentColorChanged(fmt.foreground().color());
-#endif
}
void QTextEditPrivate::updateDefaultTextOption()
@@ -2486,120 +2446,6 @@ void QTextEdit::setText(const QString &text)
setPlainText(text);
}
-#ifdef QT3_SUPPORT
-/*!
- Use the QTextCursor class instead.
-*/
-void QTextEdit::moveCursor(CursorAction action, QTextCursor::MoveMode mode)
-{
- Q_D(QTextEdit);
- if (action == MovePageUp) {
- d->pageUpDown(QTextCursor::Up, mode);
- return;
- } else if (action == MovePageDown) {
- d->pageUpDown(QTextCursor::Down, mode);
- return;
- }
-
- QTextCursor cursor = d->control->textCursor();
- QTextCursor::MoveOperation op = QTextCursor::NoMove;
- switch (action) {
- case MoveBackward: op = QTextCursor::Left; break;
- case MoveForward: op = QTextCursor::Right; break;
- case MoveWordBackward: op = QTextCursor::WordLeft; break;
- case MoveWordForward: op = QTextCursor::WordRight; break;
- case MoveUp: op = QTextCursor::Up; break;
- case MoveDown: op = QTextCursor::Down; break;
- case MoveLineStart: op = QTextCursor::StartOfLine; break;
- case MoveLineEnd: op = QTextCursor::EndOfLine; break;
- case MoveHome: op = QTextCursor::Start; break;
- case MoveEnd: op = QTextCursor::End; break;
- default: return;
- }
- cursor.movePosition(op, mode);
- d->control->setTextCursor(cursor);
-}
-
-/*!
- Use the QTextCursor class instead.
-*/
-void QTextEdit::moveCursor(CursorAction action, bool select)
-{
- moveCursor(action, select ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);
-}
-
-/*!
- Executes keyboard action \a action.
-
- Use the QTextCursor class instead.
-
- \sa textCursor()
-*/
-void QTextEdit::doKeyboardAction(KeyboardAction action)
-{
- Q_D(QTextEdit);
- QTextCursor cursor = d->control->textCursor();
- switch (action) {
- case ActionBackspace: cursor.deletePreviousChar(); break;
- case ActionDelete: cursor.deleteChar(); break;
- case ActionReturn: cursor.insertBlock(); break;
- case ActionKill: {
- QTextBlock block = cursor.block();
- if (cursor.position() == block.position() + block.length() - 2)
- cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);
- else
- cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
- cursor.deleteChar();
- break;
- }
- case ActionWordBackspace:
- cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);
- cursor.deletePreviousChar();
- break;
- case ActionWordDelete:
- cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
- cursor.deleteChar();
- break;
- }
- d->control->setTextCursor(cursor);
-}
-
-/*!
- Returns all the text in the text edit as plain text.
-*/
-QString QTextEdit::text() const
-{
- Q_D(const QTextEdit);
- if (d->textFormat == Qt::RichText || d->textFormat == Qt::LogText || (d->textFormat == Qt::AutoText && d->preferRichText))
- return d->control->toHtml();
- else
- return d->control->toPlainText();
-}
-
-
-/*!
- Sets the text format to format \a f.
-
- \sa textFormat()
-*/
-void QTextEdit::setTextFormat(Qt::TextFormat f)
-{
- Q_D(QTextEdit);
- d->textFormat = f;
-}
-
-/*!
- Returns the text format.
-
- \sa setTextFormat()
-*/
-Qt::TextFormat QTextEdit::textFormat() const
-{
- Q_D(const QTextEdit);
- return d->textFormat;
-}
-
-#endif // QT3_SUPPORT
/*!
Appends a new paragraph with \a text to the end of the text edit.
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index 69f5ac23d5..b3c1193c2b 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -50,10 +50,6 @@
#ifndef QT_NO_TEXTEDIT
-#ifdef QT3_SUPPORT
-#include <QtGui/qtextobject.h>
-#include <QtGui/qtextlayout.h>
-#endif
QT_BEGIN_HEADER
@@ -325,88 +321,6 @@ protected:
virtual void scrollContentsBy(int dx, int dy);
-#ifdef QT3_SUPPORT
-Q_SIGNALS:
- QT_MOC_COMPAT void currentFontChanged(const QFont &f);
- QT_MOC_COMPAT void currentColorChanged(const QColor &c);
-
-public:
- QT3_SUPPORT_CONSTRUCTOR QTextEdit(QWidget *parent, const char *name);
- inline QT3_SUPPORT bool find(const QString &exp, bool cs, bool wo)
- {
- QTextDocument::FindFlags flags = 0;
- if (cs)
- flags |= QTextDocument::FindCaseSensitively;
- if (wo)
- flags |= QTextDocument::FindWholeWords;
- return find(exp, flags);
- }
-
- inline QT3_SUPPORT void sync() {}
-
- QT3_SUPPORT void moveCursor(CursorAction action, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor);
- QT3_SUPPORT void moveCursor(CursorAction action, bool select);
-
- enum KeyboardAction {
- ActionBackspace,
- ActionDelete,
- ActionReturn,
- ActionKill,
- ActionWordBackspace,
- ActionWordDelete
- };
-
- QT3_SUPPORT void doKeyboardAction(KeyboardAction action);
-
- QT3_SUPPORT QString text() const;
- QT3_SUPPORT void setTextFormat(Qt::TextFormat);
- QT3_SUPPORT Qt::TextFormat textFormat() const;
-
- inline QT3_SUPPORT void setBold(bool b) { setFontWeight(b ? QFont::Bold : QFont::Normal); }
- inline QT3_SUPPORT void setUnderline(bool b) { setFontUnderline(b); }
- inline QT3_SUPPORT void setItalic(bool i) { setFontItalic(i); }
- inline QT3_SUPPORT void setFamily(const QString &family) { setFontFamily(family); }
- inline QT3_SUPPORT void setPointSize(int size) { setFontPointSize(size); }
-
- inline QT3_SUPPORT bool italic() const { return fontItalic(); }
- inline QT3_SUPPORT bool bold() const { return fontWeight() >= QFont::Bold; }
- inline QT3_SUPPORT bool underline() const { return fontUnderline(); }
- inline QT3_SUPPORT QString family() const { return fontFamily(); }
- inline QT3_SUPPORT int pointSize() const { return (int)(fontPointSize()+0.5); }
-
- inline QT3_SUPPORT bool hasSelectedText() const
- { return textCursor().hasSelection(); }
- inline QT3_SUPPORT QString selectedText() const
- { return textCursor().selectedText(); }
-
- inline QT3_SUPPORT bool isUndoAvailable() const
- { return document()->isUndoAvailable(); }
- inline QT3_SUPPORT bool isRedoAvailable() const
- { return document()->isRedoAvailable(); }
-
- inline QT3_SUPPORT void insert(const QString &text)
- { insertPlainText(text); }
-
- inline QT3_SUPPORT bool isModified() const
- { return document()->isModified(); }
-
- inline QT3_SUPPORT QColor color() const
- { return textColor(); }
-
-public Q_SLOTS:
- inline QT_MOC_COMPAT void setModified(bool m = true)
- { document()->setModified(m); }
-public:
- inline QT3_SUPPORT void undo() const
- { document()->undo(); }
- inline QT3_SUPPORT void redo() const
- { document()->redo(); }
-
-public Q_SLOTS:
- inline QT_MOC_COMPAT void setColor(const QColor &c)
- { setTextColor(c); }
-
-#endif
private:
Q_DISABLE_COPY(QTextEdit)
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 7527baa518..b2e1ce8e67 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -568,18 +568,6 @@ QToolBar::QToolBar(const QString &title, QWidget *parent)
setWindowTitle(title);
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
- Constructs a QToolBar with the given \a parent and \a name.
-*/
-QToolBar::QToolBar(QWidget *parent, const char *name)
- : QWidget(*new QToolBarPrivate, parent, 0)
-{
- Q_D(QToolBar);
- d->init();
- setObjectName(QString::fromAscii(name));
-}
-#endif
/*!
Destroys the toolbar.
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index 98c44f059a..3e85d74e49 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -154,14 +154,6 @@ protected:
bool event(QEvent *event);
void initStyleOption(QStyleOptionToolBar *option) const;
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QToolBar(QWidget *parent, const char *name);
- inline QT3_SUPPORT void setLabel(const QString &label)
- { setWindowTitle(label); }
- inline QT3_SUPPORT QString label() const
- { return windowTitle(); }
-#endif
private:
Q_DECLARE_PRIVATE(QToolBar)
diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp
index 711bf8c89c..e8bbccec04 100644
--- a/src/widgets/widgets/qtoolbox.cpp
+++ b/src/widgets/widgets/qtoolbox.cpp
@@ -291,20 +291,6 @@ void QToolBoxButton::paintEvent(QPaintEvent *)
current item.
*/
-#ifdef QT3_SUPPORT
-/*!
- Constructs a toolbox called \a name with parent \a parent and flags \a f.
-*/
-QToolBox::QToolBox(QWidget *parent, const char *name, Qt::WindowFlags f)
- : QFrame(*new QToolBoxPrivate, parent, f)
-{
- Q_D(QToolBox);
- setObjectName(QString::fromAscii(name));
- d->layout = new QVBoxLayout(this);
- d->layout->setMargin(0);
- setBackgroundRole(QPalette::Button);
-}
-#endif
/*!
Constructs a new toolbox with the given \a parent and the flags, \a f.
diff --git a/src/widgets/widgets/qtoolbox.h b/src/widgets/widgets/qtoolbox.h
index b08d37e424..ac4125229c 100644
--- a/src/widgets/widgets/qtoolbox.h
+++ b/src/widgets/widgets/qtoolbox.h
@@ -106,22 +106,6 @@ protected:
void showEvent(QShowEvent *e);
void changeEvent(QEvent *);
-#ifdef QT3_SUPPORT
-public:
- QT3_SUPPORT_CONSTRUCTOR QToolBox(QWidget *parent, const char *name, Qt::WindowFlags f = 0);
- inline QT3_SUPPORT void setItemLabel(int index, const QString &text) { setItemText(index, text); }
- inline QT3_SUPPORT QString itemLabel(int index) const { return itemText(index); }
- inline QT3_SUPPORT QWidget *currentItem() const { return widget(currentIndex()); }
- inline QT3_SUPPORT void setCurrentItem(QWidget *item) { setCurrentIndex(indexOf(item)); }
- inline QT3_SUPPORT void setItemIconSet(int index, const QIcon &icon) { setItemIcon(index, icon); }
- inline QT3_SUPPORT QIcon itemIconSet(int index) const { return itemIcon(index); }
- inline QT3_SUPPORT int removeItem(QWidget *item)
- { int i = indexOf(item); removeItem(i); return i; }
- inline QT3_SUPPORT QWidget *item(int index) const { return widget(index); }
- QT3_SUPPORT void setMargin(int margin) { setContentsMargins(margin, margin, margin, margin); }
- QT3_SUPPORT int margin() const
- { int margin; int dummy; getContentsMargins(&margin, &dummy, &dummy, &dummy); return margin; }
-#endif
private:
Q_DECLARE_PRIVATE(QToolBox)
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index f023f8af0f..67f251036c 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -96,9 +96,6 @@ public:
//workaround for task 177850
QList<QAction *> actionsCopy;
#endif
-#ifdef QT3_SUPPORT
- bool userDefinedPopupDelay;
-#endif
};
#ifndef QT_NO_MENU
@@ -193,77 +190,6 @@ QToolButton::QToolButton(QWidget * parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Constructs an empty tool button called \a name, with parent \a
- parent.
-*/
-
-QToolButton::QToolButton(QWidget * parent, const char *name)
- : QAbstractButton(*new QToolButtonPrivate, parent)
-{
- Q_D(QToolButton);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-
-/*!
- Constructs a tool button called \a name, that is a child of \a
- parent.
-
- The tool button will display the given \a icon, with its text
- label and tool tip set to \a textLabel and its status bar message
- set to \a statusTip. It will be connected to the \a slot in
- object \a receiver.
-*/
-
-QToolButton::QToolButton(const QIcon& icon, const QString &textLabel,
- const QString& statusTip,
- QObject * receiver, const char *slot,
- QWidget * parent, const char *name)
- : QAbstractButton(*new QToolButtonPrivate, parent)
-{
- Q_D(QToolButton);
- setObjectName(QString::fromAscii(name));
- d->init();
- setIcon(icon);
- setText(textLabel);
- if (receiver && slot)
- connect(this, SIGNAL(clicked()), receiver, slot);
-#ifndef QT_NO_TOOLTIP
- if (!textLabel.isEmpty())
- setToolTip(textLabel);
-#endif
-#ifndef QT_NO_STATUSTIP
- if (!statusTip.isEmpty())
- setStatusTip(statusTip);
-#else
- Q_UNUSED(statusTip);
-#endif
-}
-
-
-/*!
- Constructs a tool button as an arrow button. The Qt::ArrowType \a
- type defines the arrow direction. Possible values are
- Qt::LeftArrow, Qt::RightArrow, Qt::UpArrow, and Qt::DownArrow.
-
- An arrow button has auto-repeat turned on by default.
-
- The \a parent and \a name arguments are sent to the QWidget
- constructor.
-*/
-QToolButton::QToolButton(Qt::ArrowType type, QWidget *parent, const char *name)
- : QAbstractButton(*new QToolButtonPrivate, parent)
-{
- Q_D(QToolButton);
- setObjectName(QString::fromAscii(name));
- d->init();
- setAutoRepeat(true);
- d->arrowType = type;
-}
-
-#endif
/* Set-up code common to all the constructors */
@@ -272,9 +198,6 @@ void QToolButtonPrivate::init()
{
Q_Q(QToolButton);
delay = q->style()->styleHint(QStyle::SH_ToolButton_PopupDelay, 0, q);
-#ifdef QT3_SUPPORT
- userDefinedPopupDelay = false;
-#endif
defaultAction = 0;
#ifndef QT_NO_TOOLBAR
if (qobject_cast<QToolBar*>(parent))
@@ -324,15 +247,6 @@ void QToolButton::initStyleOption(QStyleOptionToolButton *option) const
if (QToolBar *toolBar = qobject_cast<QToolBar *>(parentWidget())) {
option->iconSize = toolBar->iconSize();
}
-#ifdef QT3_SUPPORT
- else if (parentWidget()->inherits("Q3ToolBar")) {
- if (!option->iconSize.isValid()) {
- int iconSize = style()->pixelMetric(QStyle::PM_ToolBarIconSize, option, this);
- option->iconSize = d->icon.actualSize(QSize(iconSize, iconSize));
- }
- forceNoText = d->toolButtonStyle == Qt::ToolButtonIconOnly;
- }
-#endif
}
#endif // QT_NO_TOOLBAR
@@ -663,9 +577,6 @@ void QToolButton::changeEvent(QEvent *e)
|| e->type() == QEvent::MacSizeChange
#endif
) {
-#ifdef QT3_SUPPORT
- if (!d->userDefinedPopupDelay)
-#endif
d->delay = style()->styleHint(QStyle::SH_ToolButton_PopupDelay, 0, this);
d->setLayoutItemMargins(QStyle::SE_ToolButtonLayoutItem);
}
@@ -717,80 +628,6 @@ bool QToolButton::hitButton(const QPoint &pos) const
return false;
}
-#ifdef QT3_SUPPORT
-
-/*!
- Use icon() instead.
-*/
-QIcon QToolButton::onIconSet() const
-{
- return icon();
-}
-
-/*!
- Use icon() instead.
-*/
-QIcon QToolButton::offIconSet() const
-{
- return icon();
-}
-
-
-/*!
- \obsolete
-
- Use setIcon() instead.
-*/
-void QToolButton::setOnIconSet(const QIcon& set)
-{
- setIcon(set);
-}
-
-/*!
- \obsolete
-
- Use setIcon() instead.
-*/
-void QToolButton::setOffIconSet(const QIcon& set)
-{
- setIcon(set);
-}
-
-
-/*! \overload
- \obsolete
-
- Since Qt 3.0, QIcon contains both the On and Off icons.
-
- For ease of porting, this function ignores the \a on parameter and
- sets the \l{QAbstractButton::icon} {icon} property. If you relied on
- the \a on parameter, you probably want to update your code to use
- the QIcon On/Off mechanism.
-
- \sa icon QIcon::State
-*/
-
-void QToolButton::setIconSet(const QIcon & set, bool /* on */)
-{
- QAbstractButton::setIcon(set);
-}
-
-/*! \overload
- \obsolete
-
- Since Qt 3.0, QIcon contains both the On and Off icons.
-
- For ease of porting, this function ignores the \a on parameter and
- returns the \l{QAbstractButton::icon} {icon} property. If you relied
- on the \a on parameter, you probably want to update your code to use
- the QIcon On/Off mechanism.
-*/
-QIcon QToolButton::iconSet(bool /* on */) const
-{
- return QAbstractButton::icon();
-}
-
-#endif
#ifndef QT_NO_MENU
/*!
@@ -970,30 +807,6 @@ void QToolButtonPrivate::_q_menuTriggered(QAction *action)
}
#endif // QT_NO_MENU
-#ifdef QT3_SUPPORT
-/*!
- \fn void QToolButton::setPopupDelay(int delay)
-
- Use the style hint QStyle::SH_ToolButton_PopupDelay instead.
-*/
-void QToolButton::setPopupDelay(int delay)
-{
- Q_D(QToolButton);
- d->userDefinedPopupDelay = true;
- d->delay = delay;
-
- update();
-}
-
-/*!
- Use the style hint QStyle::SH_ToolButton_PopupDelay instead.
-*/
-int QToolButton::popupDelay() const
-{
- Q_D(const QToolButton);
- return d->delay;
-}
-#endif
#ifndef QT_NO_MENU
/*! \enum QToolButton::ToolButtonPopupMode
diff --git a/src/widgets/widgets/qtoolbutton.h b/src/widgets/widgets/qtoolbutton.h
index 7d1ff13409..5ec507904a 100644
--- a/src/widgets/widgets/qtoolbutton.h
+++ b/src/widgets/widgets/qtoolbutton.h
@@ -135,59 +135,6 @@ private:
#endif
Q_PRIVATE_SLOT(d_func(), void _q_actionTriggered())
-#ifdef QT3_SUPPORT
-public:
- enum TextPosition {
- BesideIcon,
- BelowIcon
- , Right = BesideIcon,
- Under = BelowIcon
- };
-
- QT3_SUPPORT_CONSTRUCTOR QToolButton(QWidget * parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QToolButton(Qt::ArrowType type, QWidget *parent, const char* name);
- QT3_SUPPORT_CONSTRUCTOR QToolButton( const QIcon& s, const QString &textLabel,
- const QString& grouptext,
- QObject * receiver, const char* slot,
- QWidget * parent, const char* name=0 );
- inline QT3_SUPPORT void setPixmap(const QPixmap &pixmap) { setIcon(static_cast<QIcon>(pixmap)); }
- QT3_SUPPORT void setOnIconSet(const QIcon&);
- QT3_SUPPORT void setOffIconSet(const QIcon&);
- inline QT3_SUPPORT void setIconSet(const QIcon &icon){setIcon(icon);}
- QT3_SUPPORT void setIconSet(const QIcon &, bool on);
- inline QT3_SUPPORT void setTextLabel(const QString &text, bool tooltip = true) {
- setText(text);
-#ifndef QT_NO_TOOLTIP
- if (tooltip)
- setToolTip(text);
-#else
- Q_UNUSED(tooltip);
-#endif
- }
- inline QT3_SUPPORT QString textLabel() const { return text(); }
- QT3_SUPPORT QIcon onIconSet() const;
- QT3_SUPPORT QIcon offIconSet() const;
- QT3_SUPPORT QIcon iconSet(bool on) const;
- inline QT3_SUPPORT QIcon iconSet() const { return icon(); }
- inline QT3_SUPPORT void openPopup() { showMenu(); }
- inline QT3_SUPPORT void setPopup(QMenu* popup) {setMenu(popup); }
- inline QT3_SUPPORT QMenu* popup() const { return menu(); }
- inline QT3_SUPPORT bool usesBigPixmap() const { return iconSize().height() > 22; }
- inline QT3_SUPPORT bool usesTextLabel() const { return toolButtonStyle() != Qt::ToolButtonIconOnly; }
- inline QT3_SUPPORT TextPosition textPosition() const
- { return toolButtonStyle() == Qt::ToolButtonTextUnderIcon ? BelowIcon : BesideIcon; }
- QT3_SUPPORT void setPopupDelay(int delay);
- QT3_SUPPORT int popupDelay() const;
-
-public Q_SLOTS:
- QT_MOC_COMPAT void setUsesBigPixmap(bool enable)
- { setIconSize(enable?QSize(32,32):QSize(22,22)); }
- QT_MOC_COMPAT void setUsesTextLabel(bool enable)
- { setToolButtonStyle(enable?Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly); }
- QT_MOC_COMPAT void setTextPosition(QToolButton::TextPosition pos)
- { setToolButtonStyle(pos == BesideIcon ? Qt::ToolButtonTextBesideIcon : Qt::ToolButtonTextUnderIcon); }
-
-#endif
};
#endif // QT_NO_TOOLBUTTON
diff --git a/src/widgets/widgets/qworkspace.cpp b/src/widgets/widgets/qworkspace.cpp
index 9516bcaa7d..53de90984b 100644
--- a/src/widgets/widgets/qworkspace.cpp
+++ b/src/widgets/widgets/qworkspace.cpp
@@ -1051,19 +1051,6 @@ QWorkspace::QWorkspace(QWidget *parent)
d->init();
}
-#ifdef QT3_SUPPORT
-/*!
- Use one of the constructors that doesn't take the \a name
- argument and then use setObjectName() instead.
-*/
-QWorkspace::QWorkspace(QWidget *parent, const char *name)
- : QWidget(*new QWorkspacePrivate, parent, 0)
-{
- Q_D(QWorkspace);
- setObjectName(QString::fromAscii(name));
- d->init();
-}
-#endif // QT3_SUPPORT
/*!
\internal
@@ -1171,25 +1158,6 @@ QSize QWorkspace::sizeHint() const
}
-#ifdef QT3_SUPPORT
-/*!
- Sets the background color to \a c.
- Use setBackground() instead.
-*/
-void QWorkspace::setPaletteBackgroundColor(const QColor & c)
-{
- setBackground(c);
-}
-
-/*!
- Sets the background pixmap to \a pm.
- Use setBackground() instead.
-*/
-void QWorkspace::setPaletteBackgroundPixmap(const QPixmap & pm)
-{
- setBackground(pm);
-}
-#endif // QT3_SUPPORT
/*!
\property QWorkspace::background
diff --git a/src/widgets/widgets/qworkspace.h b/src/widgets/widgets/qworkspace.h
index a251242542..843879a8e7 100644
--- a/src/widgets/widgets/qworkspace.h
+++ b/src/widgets/widgets/qworkspace.h
@@ -79,11 +79,6 @@ public:
bool scrollBarsEnabled() const;
void setScrollBarsEnabled(bool enable);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QWorkspace(QWidget* parent, const char* name);
- QT3_SUPPORT void setPaletteBackgroundColor(const QColor &);
- QT3_SUPPORT void setPaletteBackgroundPixmap(const QPixmap &);
-#endif
void setBackground(const QBrush &background);
QBrush background() const;