fixed gui crash on hardy

This commit is contained in:
Vadim Kurland
2008-08-21 03:24:22 +00:00
parent 514d417251
commit c673f0bcbe
5 changed files with 43 additions and 26 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 476
#define BUILD_NUM 479
+11
View File
@@ -1,3 +1,14 @@
2008-08-20 vadim <vadim@vk.crocodile.org>
* ObjectTreeView.cpp (ObjectTreeView::ObjectTreeView): Fixed GUI
crash on Ubuntu Hardy that happened b/c of a bug in QT
4.3.4. Crash happened when user added second object to any branch
of the tree. When second object was added to the tree, the program
terminated with assertion "ASSERT: "left.level > right.level" in
file itemviews/qtreeview.cpp". This did not happen with QT 4.4.1
and 4.3.2 (could not test with 4.3.5). The fix was to disable
sorting in the QTreeView widget used to represent object tree.
2008-08-19 Vadim Kurland <vadim@vk.crocodile.org>
* NATCompiler_PrintRule.cpp (PrintRule::_printSrcService): fixed
+16 -16
View File
@@ -11,15 +11,15 @@ SO_VERSION = @LIBFWBUILDER_SOLIB_VERSION@
DEFINES += $$(DEFINES)
LANGUAGE = C++
UI_DIR = ui
MANDIR = /home/vadim/src/fwb3-branch-v3/install_root/share/man/
DOCDIR = /home/vadim/src/fwb3-branch-v3/install_root/share/doc/fwbuilder-3.0.0
MANDIR = /home/vadim/src/fwb3/install_root/share/man/
DOCDIR = /home/vadim/src/fwb3/install_root/share/doc/fwbuilder-3.0.0
HAVE_ANTLR_RUNTIME = 1
HAVE_EXTERNAL_ANTLR = 0
unix {
ANTLR_INCLUDEPATH = /home/vadim/src/fwb3-branch-v3/source/fwbuilder/src/
ANTLR_LIBS = /home/vadim/src/fwb3-branch-v3/source/fwbuilder/src/antlr/libantlr.a
ANTLR_INCLUDEPATH = /home/vadim/src/fwb3/source/fwbuilder/src/
ANTLR_LIBS = /home/vadim/src/fwb3/source/fwbuilder/src/antlr/libantlr.a
FWBPARSER_LIB = ../parsers/libfwbparser.a
}
@@ -30,32 +30,32 @@ unix {
MOC_DIR = .moc
OBJECTS_DIR = .obj
PREFIX = /home/vadim/src/fwb3-branch-v3/install_root
PREFIX = /home/vadim/src/fwb3/install_root
exec_prefix = @EXEC_PREFIX@
DESTDIR =
ICONSDIR = /home/vadim/src/fwb3-branch-v3/install_root/share//icons/hicolor/
ICONSDIR = /home/vadim/src/fwb3/install_root/share//icons/hicolor/
INCLUDEPATH += .. ../.. $$(INCLUDEPATH) /home/vadim/src/fwb3-branch-v3/install_root/include/ /home/vadim/src/fwb3-branch-v3/install_root/include/fwb-3 /usr/include/libxml2
INCLUDEPATH += .. ../.. $$(INCLUDEPATH) /home/vadim/src/fwb3/install_root/include/ /home/vadim/src/fwb3/install_root/include/fwb-3 /usr/include/libxml2
LIBS_FWCOMPILER = -L/home/vadim/src/fwb3-branch-v3/install_root/lib -pthread -lfwcompiler -lfwbuilder -lxslt -lxml2 -lnetsnmp -lm -lwrap
LIBS_FWBUILDER = -L/home/vadim/src/fwb3-branch-v3/install_root/lib -pthread -lfwbuilder -lxslt -lxml2 -lnetsnmp -lm -lwrap
LIBS_FWCOMPILER = -L/home/vadim/src/fwb3/install_root/lib -Wl,-Bsymbolic-functions -pthread -lfwcompiler -lfwbuilder -lxslt -lxml2 -lnetsnmp
LIBS_FWBUILDER = -L/home/vadim/src/fwb3/install_root/lib -Wl,-Bsymbolic-functions -pthread -lfwbuilder -lxslt -lxml2 -lnetsnmp
target.path = $$PREFIX/bin
dtd.path = @TEMPLATE_DIR@/
migration.path = @TEMPLATE_DIR@/migration
doc.path = /home/vadim/src/fwb3-branch-v3/install_root/share/doc/fwbuilder-3.0.0
datadir.path = /home/vadim/src/fwb3-branch-v3/install_root/share/
doc.path = /home/vadim/src/fwb3/install_root/share/doc/fwbuilder-3.0.0
datadir.path = /home/vadim/src/fwb3/install_root/share/
# win32:target.path = $$PREFIX/
# unix:target.path = $$PREFIX/share/fwbuilder/
# macx:target.path = $$PREFIX/
res.path = /home/vadim/src/fwb3-branch-v3/install_root/share/fwbuilder-3.0.0
res_os.path = /home/vadim/src/fwb3-branch-v3/install_root/share/fwbuilder-3.0.0/os/
res_platform.path = /home/vadim/src/fwb3-branch-v3/install_root/share/fwbuilder-3.0.0/platform/
res_help.path = /home/vadim/src/fwb3-branch-v3/install_root/share/fwbuilder-3.0.0/help/
res_desktop.path = /home/vadim/src/fwb3-branch-v3/install_root/share//applications/
res.path = /home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.0
res_os.path = /home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.0/os/
res_platform.path = /home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.0/platform/
res_help.path = /home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.0/help/
res_desktop.path = /home/vadim/src/fwb3/install_root/share//applications/
INSTALLS += res
INSTALLS += res_os
+9 -1
View File
@@ -289,6 +289,8 @@ ObjectTreeViewItem* ObjectManipulator::insertObject( ObjectTreeViewItem *itm,
obj->getTypeName() + "/hidden") ) return NULL;
nitm = new ObjectTreeViewItem( itm );
nitm->setLib("");
nitm->setText( 0, getTreeLabel(obj) );
QPixmap pm;
@@ -2773,7 +2775,13 @@ FWObject* ObjectManipulator::actuallyCreateObject(FWObject *parent,
nobj->setName( string(objName.toUtf8().constData()) );
makeNameUnique(parent, nobj);
parent->add(nobj);
insertSubtree(allItems[parent], nobj);
ObjectTreeViewItem* parent_item = allItems[parent];
if (fwbdebug)
qDebug("insertSubtree: parent=%s allItems[parent]=%p",
parent->getName().c_str(), parent_item);
insertSubtree(parent_item, nobj);
m_project->db()->setDirty(true);
mw->reloadAllWindowsWithFile(m_project);
return nobj;
+6 -8
View File
@@ -133,20 +133,18 @@ ObjectTreeView::ObjectTreeView(ProjectPanel* project,
setMinimumSize( QSize( 100, 0 ) );
// QFont objTreeView_font( font() );
// setFont( objTreeView_font );
// setCursor( QCursor( 0 ) );
// setColumnWidthMode(0, QTreeWidget::Maximum);
// setItemMargin( 2 );
setAutoScroll( TRUE );
setAllColumnsShowFocus( TRUE );
setSelectionMode( ExtendedSelection );
setAcceptDrops( true );
setDragDropMode( QAbstractItemView::DragDrop );
setRootIsDecorated( TRUE );
setSortingEnabled(true);
// disable sorting, otherwise gui crashes when built with
// QT 4.3.4 (discovered on Ubuntu Hardy). Crash happened when
// second object was added to any branch of the tree.
//
// setSortingEnabled(true);
}
bool ObjectTreeView::event( QEvent *event )