From bc0a0281d535079745ed1544a063571b86ca718e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 12 Jul 2011 09:49:12 +0200 Subject: Get rid of some obsolete functions in QImage / QPixmap / QPixmapData. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0d2412c9196475b926a17de9fcc3281f6625fae0 Reviewed-on: http://codereview.qt.nokia.com/1733 Reviewed-by: Qt Sanity Bot Reviewed-by: Olivier Goffart Reviewed-by: Jørgen Lind --- src/gui/image/qimage.cpp | 77 ------------------------------------------------ 1 file changed, 77 deletions(-) (limited to 'src/gui/image/qimage.cpp') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index de813d3659..3e251ba705 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1354,10 +1354,6 @@ int QImage::depth() const \sa setColorCount() */ -int QImage::numColors() const -{ - return d ? d->colortable.size() : 0; -} /*! \since 4.6 @@ -1425,10 +1421,6 @@ QVector QImage::colorTable() const \sa byteCount() */ -int QImage::numBytes() const -{ - return d ? d->nbytes : 0; -} /*! \since 4.6 @@ -1862,10 +1854,6 @@ void QImage::invertPixels(InvertMode mode) \sa setColorCount() */ -void QImage::setNumColors(int numColors) -{ - setColorCount(numColors); -} /*! \since 4.6 @@ -5084,15 +5072,6 @@ void QImage::setText(const QString &key, const QString &value) The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation. */ -QString QImage::text(const char* key, const char* lang) const -{ - if (!d) - return QString(); - QString k = QString::fromAscii(key); - if (lang && *lang) - k += QLatin1Char('/') + QString::fromAscii(lang); - return d->text.value(k); -} /*! \fn QString QImage::text(const QImageTextKeyLang& keywordAndLanguage) const @@ -5106,15 +5085,6 @@ QString QImage::text(const char* key, const char* lang) const The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation. */ -QString QImage::text(const QImageTextKeyLang& kl) const -{ - if (!d) - return QString(); - QString k = QString::fromAscii(kl.key); - if (!kl.lang.isEmpty()) - k += QLatin1Char('/') + QString::fromAscii(kl.lang); - return d->text.value(k); -} /*! \obsolete @@ -5126,20 +5096,6 @@ QString QImage::text(const QImageTextKeyLang& kl) const The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation. */ -QStringList QImage::textLanguages() const -{ - if (!d) - return QStringList(); - QStringList keys = textKeys(); - QStringList languages; - for (int i = 0; i < keys.size(); ++i) { - int index = keys.at(i).indexOf(QLatin1Char('/')); - if (index > 0) - languages += keys.at(i).mid(index+1); - } - - return languages; -} /*! \obsolete @@ -5152,24 +5108,6 @@ QStringList QImage::textLanguages() const The language the text is recorded in is no longer relevant since the text is always set using QString and UTF-8 representation. */ -QList QImage::textList() const -{ - QList imageTextKeys; - if (!d) - return imageTextKeys; - QStringList keys = textKeys(); - for (int i = 0; i < keys.size(); ++i) { - int index = keys.at(i).indexOf(QLatin1Char('/')); - if (index > 0) { - QImageTextKeyLang tkl; - tkl.key = keys.at(i).left(index).toAscii(); - tkl.lang = keys.at(i).mid(index+1).toAscii(); - imageTextKeys += tkl; - } - } - - return imageTextKeys; -} /*! \fn void QImage::setText(const char* key, const char* language, const QString& text) @@ -5194,21 +5132,6 @@ QList QImage::textList() const \l{http://www.rfc-editor.org/rfc/rfc1766.txt}{RFC 1766}) or 0. \endomit */ -void QImage::setText(const char* key, const char* lang, const QString& s) -{ - if (!d) - return; - detach(); - - // In case detach() ran out of memory - if (!d) - return; - - QString k = QString::fromAscii(key); - if (lang && *lang) - k += QLatin1Char('/') + QString::fromAscii(lang); - d->text.insert(k, s); -} #endif // QT_NO_IMAGE_TEXT -- cgit v1.2.3