summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-03 22:51:17 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-03 22:51:17 +0200
commit54c9b1a80c04a5ecc685dc29e27a27de81d8cc1b (patch)
treeaa2a0374e57a8fd82036485a77bacfcee208a532 /src/gui
parent181df199d31a8018cfcfc31b548909fe4b57ccbd (diff)
even less QT3_SUPPORT
the new libQtGui should now be free of any Qt3 related methods.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qkeysequence.h3
-rw-r--r--src/gui/kernel/qsound.cpp23
-rw-r--r--src/gui/kernel/qsound.h5
-rw-r--r--src/gui/painting/qmatrix.cpp36
-rw-r--r--src/gui/painting/qprinter.cpp159
-rw-r--r--src/gui/painting/qprinter.h54
-rw-r--r--src/gui/painting/qregion.cpp11
-rw-r--r--src/gui/painting/qregion.h6
-rw-r--r--src/gui/statemachine/qguistatemachine.cpp23
-rw-r--r--src/gui/text/qfont.cpp49
-rw-r--r--src/gui/text/qfont.h8
-rw-r--r--src/gui/text/qfontdatabase.h4
-rw-r--r--src/gui/text/qfontmetrics.h9
-rw-r--r--src/gui/text/qtextcontrol_p.h5
14 files changed, 0 insertions, 395 deletions
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 9eabb89d29..c61501036a 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -161,9 +161,6 @@ public:
NoMatch,
PartialMatch,
ExactMatch
-#ifdef QT3_SUPPORT
- , Identical = ExactMatch
-#endif
};
QString toString(SequenceFormat format = PortableText) const;
diff --git a/src/gui/kernel/qsound.cpp b/src/gui/kernel/qsound.cpp
index a61310a4eb..55a98758c3 100644
--- a/src/gui/kernel/qsound.cpp
+++ b/src/gui/kernel/qsound.cpp
@@ -189,29 +189,6 @@ QSound::QSound(const QString& filename, QObject* parent)
server().init(this);
}
-#ifdef QT3_SUPPORT
-/*!
- \obsolete
-
- Constructs a QSound object from the file specified by the given \a
- filename and with the given \a parent and \a name. Use the
- QSound() construcor and QObject::setObjectName() instead.
-
- \oldcode
- QSound *mySound = new QSound(filename, parent, name);
- \newcode
- QSounc *mySound = new QSound(filename, parent);
- mySound->setObjectName(name);
- \endcode
-*/
-QSound::QSound(const QString& filename, QObject* parent, const char* name)
- : QObject(*new QSoundPrivate(filename), parent)
-{
- setObjectName(QString::fromAscii(name));
- server().init(this);
-}
-#endif
-
/*!
Destroys this sound object. If the sound is not finished playing,
the stop() function is called before the sound object is
diff --git a/src/gui/kernel/qsound.h b/src/gui/kernel/qsound.h
index 70957762b2..a0d058011a 100644
--- a/src/gui/kernel/qsound.h
+++ b/src/gui/kernel/qsound.h
@@ -76,11 +76,6 @@ public Q_SLOTS:
void play();
void stop();
-public:
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QSound(const QString& filename, QObject* parent, const char* name);
- static inline QT3_SUPPORT bool available() { return isAvailable(); }
-#endif
private:
Q_DECLARE_PRIVATE(QSound)
friend class QAuServer;
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 38f78e1a46..a7523fd3cb 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -731,42 +731,6 @@ QPainterPath QMatrix::map(const QPainterPath &path) const
}
/*!
- \fn QRegion QMatrix::mapToRegion(const QRect &rectangle) const
-
- Returns the transformed rectangle \a rectangle as a QRegion
- object. A rectangle which has been rotated or sheared may result
- in a non-rectangular region being returned.
-
- Use the mapToPolygon() or map() function instead.
-*/
-#ifdef QT3_SUPPORT
-QRegion QMatrix::mapToRegion(const QRect &rect) const
-{
- QRegion result;
- if (isIdentity()) {
- result = rect;
- } else if (m12() == 0.0F && m21() == 0.0F) {
- int x = qRound(m11()*rect.x() + dx());
- int y = qRound(m22()*rect.y() + dy());
- int w = qRound(m11()*rect.width());
- int h = qRound(m22()*rect.height());
- if (w < 0) {
- w = -w;
- x -= w - 1;
- }
- if (h < 0) {
- h = -h;
- y -= h - 1;
- }
- result = QRect(x, y, w, h);
- } else {
- result = QRegion(mapToPolygon(rect));
- }
- return result;
-
-}
-#endif
-/*!
\fn QPolygon QMatrix::mapToPolygon(const QRect &rectangle) const
Creates and returns a QPolygon representation of the given \a
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp
index f5ba8e76db..5f93a2c735 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -72,10 +72,6 @@
#include <qpicture.h>
#include <private/qpaintengine_preview_p.h>
-#if defined(QT3_SUPPORT)
-# include "qprintdialog.h"
-#endif // QT3_SUPPORT
-
QT_BEGIN_NAMESPACE
#define ABORT_IF_ACTIVE(location) \
@@ -2085,161 +2081,6 @@ QPrinter::PrintRange QPrinter::printRange() const
return PrintRange(d->printRange);
}
-#if defined(QT3_SUPPORT)
-
-void QPrinter::setOutputToFile(bool f)
-{
- if (f) {
- if (outputFileName().isEmpty())
- setOutputFileName(QLatin1String("untitled_printer_document"));
- } else {
- setOutputFileName(QString());
- }
-}
-
-bool qt_compat_QPrinter_printSetup(QPrinter *printer, QPrinterPrivate *pd, QWidget *parent)
-{
- Q_UNUSED(pd);
- QPrintDialog dlg(printer, parent);
- return dlg.exec() != 0;
-}
-
-
-#ifdef Q_WS_MAC
-bool qt_compat_QPrinter_pageSetup(QPrinter *p, QWidget *parent)
-{
- QPageSetupDialog psd(p, parent);
- return psd.exec() != 0;
-}
-
-/*!
- Executes a page setup dialog so that the user can configure the type of
- page used for printing. Returns true if the contents of the dialog are
- accepted; returns false if the dialog is canceled.
-*/
-bool QPrinter::pageSetup(QWidget *parent)
-{
- return qt_compat_QPrinter_pageSetup(this, parent);
-}
-
-/*!
- Executes a print setup dialog so that the user can configure the printing
- process. Returns true if the contents of the dialog are accepted; returns
- false if the dialog is canceled.
-*/
-bool QPrinter::printSetup(QWidget *parent)
-{
- Q_D(QPrinter);
- return qt_compat_QPrinter_printSetup(this, d, parent);
-}
-#endif // Q_WS_MAC
-
-/*!
- Use QPrintDialog instead.
-
- \oldcode
- if (printer->setup(parent))
- ...
- \newcode
- QPrintDialog dialog(printer, parent);
- if (dialog.exec())
- ...
- \endcode
-*/
-bool QPrinter::setup(QWidget *parent)
-{
- Q_D(QPrinter);
- return qt_compat_QPrinter_printSetup(this, d, parent)
-#ifdef Q_WS_MAC
- && qt_compat_QPrinter_pageSetup(this, parent);
-#endif
- ;
-}
-
-/*!
- Use QPrintDialog::minPage() instead.
-*/
-int QPrinter::minPage() const
-{
- Q_D(const QPrinter);
- return d->minPage;
-}
-
-/*!
- Use QPrintDialog::maxPage() instead.
-*/
-int QPrinter::maxPage() const
-{
- Q_D(const QPrinter);
- return d->maxPage;
-}
-
-/*!
- Use QPrintDialog::setMinMax() instead.
-*/
-void QPrinter::setMinMax( int minPage, int maxPage )
-{
- Q_D(QPrinter);
- Q_ASSERT_X(minPage <= maxPage, "QPrinter::setMinMax",
- "'min' must be less than or equal to 'max'");
- d->minPage = minPage;
- d->maxPage = maxPage;
- d->options |= QPrintDialog::PrintPageRange;
-}
-
-/*!
- Returns true if the printer is set up to collate copies of printed documents;
- otherwise returns false.
-
- Use QPrintDialog::isOptionEnabled(QPrintDialog::PrintCollateCopies)
- instead.
-
- \sa collateCopies()
-*/
-bool QPrinter::collateCopiesEnabled() const
-{
- Q_D(const QPrinter);
- return (d->options & QPrintDialog::PrintCollateCopies);
-}
-
-/*!
- Use QPrintDialog::setOption(QPrintDialog::PrintCollateCopies)
- or QPrintDialog::setOptions(QPrintDialog::options()
- & ~QPrintDialog::PrintCollateCopies) instead, depending on \a
- enable.
-*/
-void QPrinter::setCollateCopiesEnabled(bool enable)
-{
- Q_D(QPrinter);
-
- if (enable)
- d->options |= QPrintDialog::PrintCollateCopies;
- else
- d->options &= ~QPrintDialog::PrintCollateCopies;
-}
-
-/*!
- Use QPrintDialog instead.
-*/
-void QPrinter::setOptionEnabled( PrinterOption option, bool enable )
-{
- Q_D(QPrinter);
- if (enable)
- d->options |= QPrintDialog::PrintDialogOption(1 << option);
- else
- d->options &= ~QPrintDialog::PrintDialogOption(1 << option);
-}
-
-/*!
- Use QPrintDialog instead.
-*/
-bool QPrinter::isOptionEnabled( PrinterOption option ) const
-{
- Q_D(const QPrinter);
- return (d->options & QPrintDialog::PrintDialogOption(option));
-}
-
-#endif // QT3_SUPPORT
/*!
\class QPrintEngine
diff --git a/src/gui/painting/qprinter.h b/src/gui/painting/qprinter.h
index a2b7fcf4b1..8b4dcb3857 100644
--- a/src/gui/painting/qprinter.h
+++ b/src/gui/painting/qprinter.h
@@ -143,10 +143,6 @@ public:
DuplexShortSide
};
-#ifdef QT3_SUPPORT
- enum PrinterOption { PrintToFile, PrintSelection, PrintPageRange };
-#endif // QT3_SUPPORT
-
void setOutputFormat(OutputFormat format);
OutputFormat outputFormat() const;
@@ -259,33 +255,6 @@ public:
void setPageMargins(qreal left, qreal top, qreal right, qreal bottom, Unit unit);
void getPageMargins(qreal *left, qreal *top, qreal *right, qreal *bottom, Unit unit) const;
-#ifdef QT3_SUPPORT
-#ifdef Q_WS_MAC
- QT3_SUPPORT bool pageSetup(QWidget *parent = 0);
- QT3_SUPPORT bool printSetup(QWidget *parent = 0);
-#endif
-
- QT3_SUPPORT bool setup(QWidget *parent = 0);
-
- QT3_SUPPORT void setMinMax(int minPage, int maxPage);
- QT3_SUPPORT int minPage() const;
- QT3_SUPPORT int maxPage() const;
-
- QT3_SUPPORT void setCollateCopiesEnabled(bool);
- QT3_SUPPORT bool collateCopiesEnabled() const;
-
- QT3_SUPPORT void setOptionEnabled(PrinterOption, bool enable);
- QT3_SUPPORT bool isOptionEnabled(PrinterOption) const;
-
- inline QT3_SUPPORT QSize margins() const;
- inline QT3_SUPPORT void margins(uint *top, uint *left, uint *bottom, uint *right) const;
-
- inline QT3_SUPPORT bool aborted() { return printerState() == Aborted; }
-
- QT3_SUPPORT void setOutputToFile(bool);
- inline QT3_SUPPORT bool outputToFile() const { return !outputFileName().isEmpty(); }
-#endif
-
protected:
int metric(PaintDeviceMetric) const;
void setEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine);
@@ -305,29 +274,6 @@ private:
friend class QPageSetupWidget;
};
-#ifdef QT3_SUPPORT
-inline QSize QPrinter::margins() const
-{
- QRect page = pageRect();
- QRect paper = paperRect();
- return QSize(page.left() - paper.left(), page.top() - paper.top());
-}
-
-inline void QPrinter::margins(uint *top, uint *left, uint *bottom, uint *right) const
-{
- QRect page = pageRect();
- QRect paper = paperRect();
- if (top)
- *top = page.top() - paper.top();
- if (left)
- *left = page.left() - paper.left();
- if (bottom)
- *bottom = paper.bottom() - page.bottom();
- if (right)
- *right = paper.right() - page.right();
-}
-#endif
-
#endif // QT_NO_PRINTER
QT_END_NAMESPACE
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index d713346902..ae9dc63a8f 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -252,17 +252,6 @@ QRegion::QRegion(int x, int y, int w, int h, RegionType t)
d = tmp.d;
}
-#ifdef QT3_SUPPORT
-/*!
- Use the constructor tha takes a Qt::FillRule as the second
- argument instead.
-*/
-QRegion::QRegion(const QPolygon &pa, bool winding)
-{
- new (this) QRegion(pa, winding ? Qt::WindingFill : Qt::OddEvenFill);
-}
-#endif
-
/*!
\fn QRegion::~QRegion()
\internal
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 1cd38d41b8..3093dc08c4 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -74,9 +74,6 @@ public:
QRegion(int x, int y, int w, int h, RegionType t = Rectangle);
QRegion(const QRect &r, RegionType t = Rectangle);
QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QRegion(const QPolygon &pa, bool winding);
-#endif
QRegion(const QRegion &region);
QRegion(const QBitmap &bitmap);
~QRegion();
@@ -86,9 +83,6 @@ public:
{ qSwap(d, other.d); return *this; }
#endif
inline void swap(QRegion &other) { qSwap(d, other.d); }
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool isNull() const { return isEmpty(); }
-#endif
bool isEmpty() const;
bool contains(const QPoint &p) const;
diff --git a/src/gui/statemachine/qguistatemachine.cpp b/src/gui/statemachine/qguistatemachine.cpp
index 2a0de3c1c7..031c135158 100644
--- a/src/gui/statemachine/qguistatemachine.cpp
+++ b/src/gui/statemachine/qguistatemachine.cpp
@@ -155,15 +155,6 @@ static QEvent *cloneEvent(QEvent *e)
return new QChildEvent(*static_cast<QChildEvent*>(e));
case QEvent::ChildPolished:
return new QChildEvent(*static_cast<QChildEvent*>(e));
-#ifdef QT3_SUPPORT
- case QEvent::ChildInsertedRequest:
- return new QEvent(*e);
- case QEvent::ChildInserted:
- return new QChildEvent(*static_cast<QChildEvent*>(e));
- case QEvent::LayoutHint:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
case QEvent::ChildRemoved:
return new QChildEvent(*static_cast<QChildEvent*>(e));
case QEvent::ShowWindowRequest:
@@ -266,15 +257,6 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::ShortcutOverride:
return new QKeyEvent(*static_cast<QKeyEvent*>(e));
-#ifdef QT3_SUPPORT
- case QEvent::Accel:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::AccelAvailable:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
-
#ifndef QT_NO_WHATSTHIS
case QEvent::WhatsThisClicked:
return new QWhatsThisClickedEvent(*static_cast<QWhatsThisClickedEvent*>(e));
@@ -321,11 +303,6 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::AcceptDropsChange:
return new QEvent(*e);
-#ifdef QT3_SUPPORT
- case QEvent::MenubarUpdated:
- return new QMenubarUpdatedEvent(*static_cast<QMenubarUpdatedEvent*>(e));
-#endif
-
case QEvent::ZeroTimerEvent:
Q_ASSERT_X(false, "cloneEvent()", "not implemented");
break;
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index b8cfb1f902..f2e76531d9 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1096,18 +1096,6 @@ int QFont::pixelSize() const
return d->request.pixelSize;
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
-
- Sets the logical pixel height of font characters when shown on
- the screen to \a pixelSize.
-*/
-void QFont::setPixelSizeFloat(qreal pixelSize)
-{
- setPixelSize((int)pixelSize);
-}
-#endif
-
/*!
\fn bool QFont::italic() const
@@ -1875,43 +1863,6 @@ QFont QFont::resolve(const QFont &other) const
\internal
*/
-#ifdef QT3_SUPPORT
-
-/*! \obsolete
-
- Please use QApplication::font() instead.
-*/
-QFont QFont::defaultFont()
-{
- return QApplication::font();
-}
-
-/*! \obsolete
-
- Please use QApplication::setFont() instead.
-*/
-void QFont::setDefaultFont(const QFont &f)
-{
- QApplication::setFont(f);
-}
-
-/*!
- \fn qreal QFont::pointSizeFloat() const
- \compat
-
- Use pointSizeF() instead.
-*/
-
-/*!
- \fn void QFont::setPointSizeFloat(qreal size)
- \compat
-
- Use setPointSizeF() instead.
-*/
-#endif
-
-
-
/*****************************************************************************
QFont substitution management
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 8dbc746813..18c39cbe31 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -283,14 +283,6 @@ public:
inline uint resolve() const { return resolve_mask; }
inline void resolve(uint mask) { resolve_mask = mask; }
-#ifdef QT3_SUPPORT
- static QT3_SUPPORT QFont defaultFont();
- static QT3_SUPPORT void setDefaultFont(const QFont &);
- QT3_SUPPORT void setPixelSizeFloat(qreal);
- QT3_SUPPORT qreal pointSizeFloat() const { return pointSizeF(); }
- QT3_SUPPORT void setPointSizeFloat(qreal size) { setPointSizeF(size); }
-#endif
-
private:
QFont(QFontPrivate *);
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index ae1130eadc..c9ca5dcb60 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -45,10 +45,6 @@
#include <QtGui/qwindowdefs.h>
#include <QtCore/qstring.h>
#include <QtGui/qfont.h>
-#ifdef QT3_SUPPORT
-#include <QtCore/qstringlist.h>
-#include <QtCore/qlist.h>
-#endif
QT_BEGIN_HEADER
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 5fe8676993..56e5a5c6bb 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -122,15 +122,6 @@ public:
inline bool operator !=(const QFontMetrics &other) { return !operator==(other); } // 5.0 - remove me
inline bool operator !=(const QFontMetrics &other) const { return !operator==(other); }
-#ifdef QT3_SUPPORT
- inline QRect boundingRect(const QString &text, int len) const
- { return boundingRect(text.left(len)); }
- inline QRect boundingRect(int x, int y, int w, int h, int flags, const QString& str, int len,
- int tabstops=0, int *tabarray=0) const
- { return boundingRect(QRect(x, y, w, h), flags, str.left(len), tabstops, tabarray); }
- inline QSize size(int flags, const QString& str, int len, int tabstops=0, int *tabarray=0) const
- { return size(flags, str.left(len), tabstops, tabarray); }
-#endif
private:
#if defined(Q_WS_MAC)
friend class QFontPrivate;
diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h
index 31fa843a3a..dce0ca90a5 100644
--- a/src/gui/text/qtextcontrol_p.h
+++ b/src/gui/text/qtextcontrol_p.h
@@ -64,11 +64,6 @@
#include <QtGui/qtextdocumentfragment.h>
#include <QtGui/qclipboard.h>
-#ifdef QT3_SUPPORT
-#include <QtGui/qtextobject.h>
-#include <QtGui/qtextlayout.h>
-#endif
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE