Commit 1938ad54d4 replaced delete by
deleteLater(). However, the latter cannot be used safely with null
pointers. This commit adds a safety check in order to make sure that
we do not get a crash.
Thanks to Christoph Feck for pointing out this issue.
This patch should make a crash with a backtrace as provided in the bug
report impossible. I'm not sure if this would really prevent the crash
- it looks like the actual cause of the problem could be in
QGraphicsView or anywhere else, but it's hard to tell because the bug
was reported just once and does not seem reproducible. But I'm pretty
sure that this change doesn't make anything worse.
BUG: 334785
REVIEW: 121087
Checking whether the input contains '*', '?' or '[' alone will
not do since there can be files with '[' in their name.
REVIEW: 120986
BUG: 340470
FIXED-IN: 14.12
The previous solution could cause problems if the user navigates to a
different URL in one view, and then activates another split view very
quickly: the new active view might be switched to the same URL as the
first view, which is unwanted.
To fix this problem, we record a history of "cd" commands that Dolphin
sends to the Terminal Panel in a queue. If a currentDirectoryChanged
signal is received, and the new terminal directory is "dir", this patch
does the following:
1. If the queue is empty, change the view URL to "dir".
2. Otherwise, take the queue's head, and check if it is equal to
"dir". If that is the case, ignore the signal and return.
3. Go back to step 1.
This ensures that every currentDirectoryChange signal that is caused by
a "cd" that was sent from Dolphin to the terminal is ignored.
BUG: 339009
BUG: 314038
REVIEW: 120768
This fixes the problem that the view URL may be reset to the Home URL
when opening the Terminal Panel while browsing a remote URL. Moreover,
it fixes crashes that can occur when the signal is received during the
shell setup if the DolphinMainWindow does not have a valid
m_activeViewContainer yet.
BUG: 339502
BUG: 340233
REVIEW: 120726
FIXED-IN: 4.14.3
In dolphin the Section that leads you to timeline claims
to show "Recently Accessed", which is not true, it shows
"Recently Saved" instead.
BUG: 304854
REVIEW: 119986
This used to work before afcf8961f6 (only
if "Open archives as folder" was enabled in the settings though). The
reason why this commit broke it is that the mime type of a file is not
determined automatically any more before asking
KProtocolManager::protocolForArchiveMimetype for the correct protocol,
so the determination of the protocol may fail.
Keeping the isMimeTypeKnown() check in DolphinView::openItemAsFolderUrl
still makes sense, because it prevents GUI blocking if the user tries
to open many files at the same time.
Therefore, we now call determineMimeType() in
DolphinViewContainer::slotUrlIsFileError(const KUrl&) and then try to
determine the correct protocol and use it to open the archive in the
view, rather than hoping that slotItemActivated(item) will do the right
thing.
BUG: 333078
REVIEW: 119877
FIXED-IN: 4.14.1
view containers are disconnected. Changing the connections is done whenever the
active view has been changed, so we can always guarantee that the active view is
connected.
The problem with restoring saved sessions is, that we create a new view container
in DolphinTabPage::restoreState() when split view was used in the previous session,
but this view container isn't connected to the main window slots because
DolphinMainWindow::connectViewSignals() is not called for this container. This leads
to these strange problems: no context menu, ...
BUG: 338549
REVIEW: 119961
FIXED-IN: 4.14.1
1. Do some operation that causes the KMessageWidget to show an error message
2. Immediately Repeat the same action.
The user has no way to know whether the error message is from the second operation or
is a leftover from the first one. By hiding the widget first and then showing it using
animatedShow(), the user can clearly see that a new message was generated. Also once the
directory successfully loads, the widget should be hidden.
BUG: 323077
FIXED-IN: 4.14.1
REVIEW: 119401
Before this patch, we still kept the URL in m_currentItemUrl if the URL
was not found in the model. This could cause problems the next time
updateViewState() was called, because the current index would then be
set to 0, which could cause other issues.
For example, all items between the first item in the view and a folder
which was expanded in Details View could be selected.
In principle, it is possible that updateViewState() is called multiple
times if many large files are being pasted in the view, but since the
item which should be made the current item (and which the view should
be scrolled to) should always be the first pasted item, this change
will most likely not cause any other problems.
BUG: 329377
REVIEW: 119703
FIXED-IN: 4.14.0
Since DolphinTabPage::saveState() and
DolphinTabPage::restoreState(const QByteArray& state) save and restore
the state of each tab in a different format than DolphinMainWindow did
before the refactoring, we can run into problems: the first time a user
logs into a session that has Dolphin 4.14, Dolphin might read session
data that does not contain the QByteArray that DolphinTabPage wants to
read the data from.
In restoreState, isSplitViewEnabled will thus have the value false, and
no secondary view will be created. Later on, m_primaryViewActive will
also be set to false, but the else branch of the following
"if (m_primaryViewActive)" then tries to activate the secondary view,
which does not exist -> we get a crash.
The easiest solution is to not restore the tab state if no session data
in the new format is found.
BUG: 338187
REVIEW: 119718
FIXED-IN: 4.14.0