Changeset View
Changeset View
Standalone View
Standalone View
lib/contextmanager.cpp
Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Line(s) | |||||
305 | 305 | | |||
306 | QUrl ContextManager::targetDirUrl() const | 306 | QUrl ContextManager::targetDirUrl() const | ||
307 | { | 307 | { | ||
308 | return d->mTargetDirUrl; | 308 | return d->mTargetDirUrl; | ||
309 | } | 309 | } | ||
310 | 310 | | |||
311 | void ContextManager::setTargetDirUrl(const QUrl &url) | 311 | void ContextManager::setTargetDirUrl(const QUrl &url) | ||
312 | { | 312 | { | ||
313 | GV_RETURN_IF_FAIL(url.isEmpty() || url.isValid()); | 313 | GV_RETURN_IF_FAIL(url.isEmpty() || url.isValid()); | ||
rkflx: Any reason in particular you remove this? | |||||
Using an empty (=invalid) Url is ok now if we have no default location and the dialog starts in the current folder. But why not check what we really expect here... ;) muhlenpfordt: Using an empty (=invalid) Url is ok now if we have no default location and the dialog starts in… | |||||
314 | d->mTargetDirUrl = url; | 314 | d->mTargetDirUrl = GwenviewConfig::historyEnabled() ? url | ||
315 | : QUrl(); | ||||
315 | } | 316 | } | ||
One more comment about the formatting. I have often seen it like this: d->mTargetDirUrl = GwenviewConfig::historyEnabled() ? url : QUrl(); rkflx: One more comment about the formatting. I have often seen it like this:
```
d->mTargetDirUrl… | |||||
muhlenpfordt: Looks better for this short one. :) | |||||
316 | 317 | | |||
317 | void ContextManager::slotRowsInserted() | 318 | void ContextManager::slotRowsInserted() | ||
318 | { | 319 | { | ||
319 | // We reach this method when rows have been inserted in the model, but views | 320 | // We reach this method when rows have been inserted in the model, but views | ||
320 | // may not have been updated yet and thus do not have the matching items. | 321 | // may not have been updated yet and thus do not have the matching items. | ||
321 | // Delay the selection of mUrlToSelect so that the view items exist. | 322 | // Delay the selection of mUrlToSelect so that the view items exist. | ||
322 | // | 323 | // | ||
323 | // Without this, when Gwenview is started with an image as argument and the | 324 | // Without this, when Gwenview is started with an image as argument and the | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
Any reason in particular you remove this?