Changeset View
Changeset View
Standalone View
Standalone View
app/urlinfo.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 44 | { | |||
---|---|---|---|---|---|
81 | if (!url.isValid()) { | 81 | if (!url.isValid()) { | ||
82 | /** | 82 | /** | ||
83 | * create absolute file path, we will e.g. pass this over dbus to other processes | 83 | * create absolute file path, we will e.g. pass this over dbus to other processes | ||
84 | */ | 84 | */ | ||
85 | url = QUrl::fromLocalFile(QDir::current().absoluteFilePath(path)); | 85 | url = QUrl::fromLocalFile(QDir::current().absoluteFilePath(path)); | ||
86 | } | 86 | } | ||
87 | } | 87 | } | ||
88 | 88 | | |||
89 | bool isDirectory() const | ||||
90 | { | ||||
91 | return url.isLocalFile() && QFileInfo(url.toLocalFile()).isDir() && !cursor.isValid(); | ||||
kfunk: Rather: `QFileInfo(...).isDir()`? More lightweight I think. | |||||
apol: If you say so... :) | |||||
92 | } | ||||
93 | | ||||
89 | /** | 94 | /** | ||
90 | * url computed out of the passed path | 95 | * url computed out of the passed path | ||
91 | */ | 96 | */ | ||
92 | QUrl url; | 97 | QUrl url; | ||
93 | 98 | | |||
94 | /** | 99 | /** | ||
95 | * initial cursor position, if any found inside the path as line/column specification at the end | 100 | * initial cursor position, if any found inside the path as line/column specification at the end | ||
96 | */ | 101 | */ | ||
Show All 23 Lines |
Rather: QFileInfo(...).isDir()? More lightweight I think.