From fc755c02489f5c52319f5b48d59b753a6c9666b8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 18 Jul 2011 23:54:43 +0200 Subject: Pedantic compile fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PS: Andrè, thanks for the notice... CCMAIL: Woebbeking@kde.org --- src/downloaditem.h | 2 +- src/tabpreviewpopup.cpp | 9 +++++++-- src/tabpreviewpopup.h | 4 ---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/downloaditem.h b/src/downloaditem.h index 05e4d438..45015f5c 100644 --- a/src/downloaditem.h +++ b/src/downloaditem.h @@ -106,7 +106,7 @@ private: }; -Q_DECLARE_METATYPE(DownloadItem*); +Q_DECLARE_METATYPE(DownloadItem*) typedef QList DownloadList; diff --git a/src/tabpreviewpopup.cpp b/src/tabpreviewpopup.cpp index f6ede995..bb438aae 100644 --- a/src/tabpreviewpopup.cpp +++ b/src/tabpreviewpopup.cpp @@ -40,6 +40,11 @@ #include #include +// static +static const int borderRadius = 5; +static const int borderSpacing = 2; +static const int transparency = 0.90; + TabPreviewPopup::TabPreviewPopup(WebTab* tab, QWidget* parent) : KPassivePopup(parent), @@ -96,7 +101,7 @@ void TabPreviewPopup::setUrl(const QString& text) void TabPreviewPopup::setFixedSize(int w, int h) { KPassivePopup::setFixedSize(w, h); - m_url->setText(m_url->fontMetrics().elidedText(m_url->text(), Qt::ElideMiddle, this->width() - this->borderRadius)); + m_url->setText(m_url->fontMetrics().elidedText(m_url->text(), Qt::ElideMiddle, this->width() - borderRadius)); QPixmap pixmap(size()); QPainter painter(&pixmap); @@ -105,4 +110,4 @@ void TabPreviewPopup::setFixedSize(int w, int h) painter.setBrush(QBrush(Qt::black)); painter.drawRoundRect(borderSpacing, borderSpacing, pixmap.width() - borderSpacing * 2, pixmap.height() - borderSpacing * 2, borderRadius, borderRadius); setMask(pixmap.createMaskFromColor(Qt::red)); -} \ No newline at end of file +} diff --git a/src/tabpreviewpopup.h b/src/tabpreviewpopup.h index 7a6f81e4..e70372c3 100644 --- a/src/tabpreviewpopup.h +++ b/src/tabpreviewpopup.h @@ -49,7 +49,6 @@ public: explicit TabPreviewPopup(WebTab *tab, QWidget *parent = 0); virtual ~TabPreviewPopup(); - private: QLabel *m_thumbnail; QLabel *m_url; @@ -58,9 +57,6 @@ private: void setUrl(const QString& text); void setThumbnail(const QPixmap& pixmap); void setFixedSize(int w, int h); - static const int borderRadius = 5; - static const int borderSpacing = 2; - static const double transparency = 0.90; }; #endif // TABPREVIEWPOPUP_H -- cgit v1.2.1