[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kate/plugins/filebrowser
From: Christoph Cullmann <cullmann () kde ! org>
Date: 2010-05-09 9:05:39
Message-ID: 20100509090539.A3D72AC8B4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1124518 by cullmann:
dhaumann:
attempt to fix crash in file system browser
from the backtrace it's not entirely clear what happens. Maybe the
m_fileBrowser pointer is invalid... Check this now.
BUG: 231261
M +5 -2 katefilebrowserconfig.cpp
M +1 -0 katefilebrowserplugin.cpp
--- trunk/KDE/kdesdk/kate/plugins/filebrowser/katefilebrowserconfig.cpp \
#1124517:1124518 @@ -63,7 +63,7 @@
//BEGIN KateFileBrowserConfigPage
KateFileBrowserConfigPage::KateFileBrowserConfigPage( QWidget *parent, const char *, \
KateFileBrowser *kfb ) : Kate::PluginConfigPage( parent ),
- fileBrowser( kfb ),
+ fileBrowser( kfb ), // NOTE: fileBrowser might be 0, if createView was not \
called for the plugin yet... m_changed( false )
{
QVBoxLayout *lo = new QVBoxLayout( this );
@@ -110,6 +110,7 @@
l << aItem->idstring();
}
config.writeEntry( "toolbar actions", l );
+ if (fileBrowser)
fileBrowser->setupToolbar();
}
@@ -137,15 +138,17 @@
<< "show hidden" /*<< "view menu" << "properties"*/
<< "bookmarks" << "sync_dir" << "configure";
QRegExp re("&(?=[^&])");
- QAction *ac;
+ QAction *ac = 0;
QListWidget *lb;
for ( QStringList::Iterator it = allActions.begin(); it != allActions.end(); ++it \
) {
lb = l.contains( *it ) ? acSel->selectedListWidget() : \
acSel->availableListWidget(); + if (fileBrowser) {
if ( *it == "bookmarks" || *it == "sync_dir" || *it == "configure" )
ac = fileBrowser->actionCollection()->action( (*it).toLatin1().constData() );
else
ac = fileBrowser->dirOperator()->actionCollection()->action( \
(*it).toLatin1().constData() ); + }
if ( ac )
{
QString text = ac->text().remove( re );
--- trunk/KDE/kdesdk/kate/plugins/filebrowser/katefilebrowserplugin.cpp \
#1124517:1124518 @@ -39,6 +39,7 @@
//BEGIN KateFileBrowserPlugin
KateFileBrowserPlugin::KateFileBrowserPlugin(QObject* parent, const \
QList<QVariant>&) : Kate::Plugin ((Kate::Application*)parent)
+ , m_fileBrowser(0)
{
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic