* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "infosidebarpage.h"
if (!url.isEmpty() && !m_multipleSelection) {
m_urlCandidate = url;
- m_timer->start(300, true);
+ m_timer->setSingleShot(true);
+ m_timer->start(300);
}
}
KIO::PreviewJob* job = KIO::filePreview(list,
m_preview->width(),
- K3Icon::SizeEnormous);
+ K3Icon::SizeEnormous,
+ 0,
+ 0,
+ true,
+ false);
+ job->setIgnoreMaximumSize(true);
+
connect(job, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)),
this, SLOT(gotPreview(const KFileItem*, const QPixmap&)));
connect(job, SIGNAL(failed(const KFileItem*)),
cancelRequest();
DolphinView* view = mainWindow()->activeView();
- connect(view, SIGNAL(signalRequestItemInfo(const KUrl&)),
+ connect(view, SIGNAL(requestItemInfo(const KUrl&)),
this, SLOT(requestDelayedItemInfo(const KUrl&)));
- connect(view, SIGNAL(signalUrlChanged(const KUrl&)),
+ connect(view, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(requestItemInfo(const KUrl&)));
m_shownUrl = view->url();
QLabel* info = new QLabel(infoText, m_infoGrid);
info->setTextFormat(Qt::RichText);
- info->setAlignment(Qt::AlignTop | Qt::TextWordWrap);
+ info->setAlignment(Qt::AlignTop);
+ info->setWordWrap(true);
info->show();
m_infoWidgets.append(info);
QStringList dirs = KGlobal::dirs()->findDirs("data", "dolphin/servicemenus/");
for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
QDir dir(*dirIt);
- QStringList entries = dir.entryList("*.desktop", QDir::Files);
+ QStringList entries = dir.entryList(QStringList("*.desktop"), QDir::Files);
for (QStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) {
KSimpleConfig cfg(*dirIt + *entryIt, true);
cfg.setDesktopGroup();
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
- const QStringList types = cfg.readListEntry("ServiceTypes");
+ const QStringList types = cfg.readEntry("ServiceTypes", QStringList(), ',');
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
// check whether the mime type is equal or whether the
// mimegroup (e. g. image/*) is supported
while (insert && mimeIt.hasNext()) {
KFileItem* item = mimeIt.next();
const QString mimeType(item->mimetype());
- const QString mimeGroup(mimeType.left(mimeType.find('/')));
+ const QString mimeGroup(mimeType.left(mimeType.indexOf('/')));
insert = (*it == mimeType) ||
((*it).right(1) == "*") &&
- ((*it).left((*it).find('/')) == mimeGroup);
+ ((*it).left((*it).indexOf('/')) == mimeGroup);
}
}
QPushButton* button = new QPushButton(submenuName, m_actionBox);
button->setFlat(true);
- button->setPopup(popup);
+ button->setMenu(popup);
button->show();
m_actionWidgets.append(button);
}
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
KDEDesktopMimeType::Service service = (*serviceIt);
if (popup == 0) {
- ServiceButton* button = new ServiceButton(SmallIcon(service.m_strIcon),
+ ServiceButton* button = new ServiceButton(KIcon(service.m_strIcon),
service.m_strName,
m_actionBox,
actionsIndex);
button->show();
}
else {
- popup->insertItem(SmallIcon(service.m_strIcon), service.m_strName, actionsIndex);
+ popup->insertItem(KIcon(service.m_strIcon), service.m_strName, actionsIndex);
}
m_actionsVector.append(service);
m_hover(false),
m_index(index)
{
- setEraseColor(colorGroup().background());
+ setEraseColor(palette().brush(QPalette::Background).color());
setFocusPolicy(Qt::NoFocus);
connect(this, SIGNAL(released()),
this, SLOT(slotReleased()));
foregroundColor = KGlobalSettings::highlightedTextColor();
}
else {
- backgroundColor = colorGroup().background();
+ backgroundColor = palette().brush(QPalette::Background).color();
foregroundColor = KGlobalSettings::buttonTextColor();
}
// draw icon
int x = spacing;
const int y = (buttonHeight - K3Icon::SizeSmall) / 2;
- const QIcon* set = iconSet();
- if (set != 0) {
- painter.drawPixmap(x, y, set->pixmap(QIcon::Small, QIcon::Normal));
+ const QIcon &set = icon();
+ if (!set.isNull()) {
+ painter.drawPixmap(x, y, set.pixmap(QIcon::Small, QIcon::Normal));
}
x += K3Icon::SizeSmall + spacing;