#include <views/draganddrophelper.h>
-#include <KDebug>
+#include "dolphindebug.h"
FoldersPanel::FoldersPanel(QWidget* parent) :
Panel(parent),
bool FoldersPanel::urlChanged()
{
- if (!url().isValid() || url().scheme().contains("search")) {
+ if (!url().isValid() || url().scheme().contains(QStringLiteral("search"))) {
// Skip results shown by a search, as possible identical
// directory names are useless without parent-path information.
return false;
const KFileItem fileItem = m_model->fileItem(index);
- QWeakPointer<TreeViewContextMenu> contextMenu = new TreeViewContextMenu(this, fileItem);
+ QPointer<TreeViewContextMenu> contextMenu = new TreeViewContextMenu(this, fileItem);
contextMenu.data()->open();
if (contextMenu.data()) {
delete contextMenu.data();
{
Q_UNUSED(pos);
- QWeakPointer<TreeViewContextMenu> contextMenu = new TreeViewContextMenu(this, KFileItem());
+ QPointer<TreeViewContextMenu> contextMenu = new TreeViewContextMenu(this, KFileItem());
contextMenu.data()->open();
if (contextMenu.data()) {
delete contextMenu.data();
// animations.
// TODO: Check whether it makes sense to allow accessing the
// view-internal delay for usecases like this.
- QTimer::singleShot(250, this, SLOT(startFadeInAnimation()));
+ QTimer::singleShot(250, this, &FoldersPanel::startFadeInAnimation);
}
if (!m_updateCurrentItem) {
QUrl baseUrl;
if (url.isLocalFile()) {
// Use the root directory as base for local URLs (#150941)
- baseUrl = QDir::rootPath();
+ baseUrl = QUrl::fromLocalFile(QDir::rootPath());
} else {
// Clear the path for non-local URLs and use it as base
baseUrl = url;