diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 00:45:10 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 00:45:10 +0200 |
commit | 04da2debaea50b8339404280daba2290961203c6 (patch) | |
tree | acd15729c9a568dacfdb2b2444d6f8e6db29fcdc /src/previewimage.cpp | |
parent | Merge commit 'refs/merge-requests/1805' of git://gitorious.org/rekonq/mainlin... (diff) | |
download | rekonq-04da2debaea50b8339404280daba2290961203c6.tar.xz |
Fixing code of PluginFactory + PreviewImage.
In this way, we don't need to pass *ALL* the QStringList(s)..
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r-- | src/previewimage.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp index 0d246bf3..d6579959 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -48,26 +48,14 @@ #include <QHBoxLayout> -PreviewImage::PreviewImage(const QUrl &url, - const QStringList &argumentNames, - const QStringList &argumentValues) +PreviewImage::PreviewImage(const QUrl &url, int index, bool isFavorite) : QLabel() , ws(0) , m_url(0) - , m_isFavorite(false) - , m_index(-1) + , m_isFavorite(isFavorite) + , m_index(index) , m_button(0) { - int i; - - i = argumentNames.indexOf(QRegExp(QString("isFavorite"), Qt::CaseInsensitive, QRegExp::FixedString)); - if(i > -1 && argumentValues.at(i) == "true") - m_isFavorite = true; - - i = argumentNames.indexOf(QRegExp(QString("index"), Qt::CaseInsensitive, QRegExp::FixedString)); - if(i > -1) - m_index = argumentValues.at(i).toInt(); - setUrl(url); } @@ -274,10 +262,8 @@ void PreviewImage::setUrlFromAction() layout()->deleteLater(); m_button->menu()->deleteLater(); m_button->deleteLater(); - } - + } setUrl(url); - } |