Commit c09ff326 authored by Stephan Kulow's avatar Stephan Kulow

fixed some uses of deprecated functions - still doesn't build

because of K*Accel

svn path=/trunk/KDE/kdemultimedia/juk/; revision=534462
parent 56b60d02
......@@ -125,8 +125,7 @@ void CoverInfo::setCover(const QImage &image)
m_needsConverting = false;
m_hasCover = true;
QPixmap cover;
cover.convertFromImage(image);
QPixmap cover = QPixmap::fromImage(image);
// If we use replaceCover we'll change the cover for every other track
// with the same coverKey, which we don't want since that case will be
......
......@@ -281,7 +281,7 @@ QByteArray CoverDrag::encodedData(const char *mimetype) const
}
else if(qstrcmp(mimetype, "image/png") == 0) {
QPixmap large = CoverManager::coverFromId(m_id, CoverManager::FullSize);
QImage img = large.convertToImage();
QImage img = large.toImage();
QByteArray data;
QBuffer buffer(&data);
......
......@@ -124,8 +124,7 @@ void GoogleFetcherDialog::slotOk()
KMessageBox::sorry(this,
i18n("The cover you have selected is unavailable. Please select another."),
i18n("Cover Unavailable"));
QPixmap blankPix;
blankPix.resize(80, 80);
QPixmap blankPix(80,80);
blankPix.fill();
m_iconWidget->currentItem()->setPixmap(blankPix, true, true);
return;
......@@ -204,8 +203,7 @@ CoverIconViewItem::CoverIconViewItem(Q3IconView *parent, const GoogleImage &imag
{
// Set up the iconViewItem
QPixmap mainMap;
mainMap.resize(80, 80);
QPixmap mainMap(80,80);
mainMap.fill();
setPixmap(mainMap, true, true);
......
......@@ -18,7 +18,7 @@
#include <config.h>
#if HAVE_TUNEPIMP
#ifdef HAVE_TUNEPIMP
#include "ktrm.h"
#include "filehandle.h"
......
......@@ -849,7 +849,7 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection)
// Guess tag info menu
#if HAVE_TUNEPIMP
#ifdef HAVE_TUNEPIMP
menu = new KActionMenu(i18n("&Guess Tag Information"), QString::null, actions(), "guessTag");
/* menu->setIconSet(SmallIconSet("wizard")); */
......
......@@ -35,7 +35,7 @@ PlaylistItemList PlaylistItem::m_playingItems; // static
static void startMusicBrainzQuery(const FileHandle &file)
{
#if HAVE_TUNEPIMP
#ifdef HAVE_TUNEPIMP
// This deletes itself when finished.
new MusicBrainzLookup(file);
#else
......
......@@ -440,18 +440,14 @@ bool SystemTray::buttonsToLeft() const
QPixmap SystemTray::createPixmap(const QString &pixName)
{
QPixmap bgPix = m_appPix;
QPixmap fgPix = SmallIcon(pixName);
QImage bgImage = bgPix.convertToImage(); // Probably 22x22
QImage fgImage = fgPix.convertToImage(); // Should be 16x16
QImage bgImage = m_appPix.toImage(); // Probably 22x22
QImage fgImage = SmallIcon(pixName).toImage(); // Should be 16x16
KIconEffect::semiTransparent(bgImage);
copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2,
(bgImage.height() - fgImage.height()) / 2);
bgPix.convertFromImage(bgImage);
return bgPix;
return QPixmap::fromImage(bgImage);
}
void SystemTray::createButtonBox(QWidget *parent)
......@@ -536,7 +532,7 @@ void SystemTray::setToolTip(const QString &tip, const QPixmap &cover)
if(cover.isNull())
myCover = DesktopIcon("juk");
QImage coverImage = myCover.convertToImage();
QImage coverImage = myCover.toImage();
if(coverImage.size().width() > 32 || coverImage.size().height() > 32)
coverImage = coverImage.smoothScale(32, 32);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment