<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>136288</bug_id>
          
          <creation_ts>2006-10-25 13:21:49 +0000</creation_ts>
          <short_desc>Shift + Left and Shift+Right causes SIGSEGV</short_desc>
          <delta_ts>2007-01-30 07:37:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>umbrello</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Maruschenko Dmitry">maruschenko</reporter>
          <assigned_to name="Umbrello Development Group">umbrello-devel</assigned_to>
          <cc>sasq</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>479713</commentid>
    <comment_count>0</comment_count>
    <who name="Maruschenko Dmitry">maruschenko</who>
    <bug_when>2006-10-25 13:21:49 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages

Behaviour:
----------

Umbrello crashes with SIGSEGV when I press Shift+Left (or Shift+Right).

Crash Log:
----------

(no debugging symbols found)
Using host libthread_db library &quot;/lib/tls/i686/cmov/libthread_db.so.1&quot;.
(no debugging symbols found)
(no debugging symbols found)
...
&lt;SKIPPED&gt;
...
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1234221392 (LWP 6244)]
(no debugging symbols found)
(no debugging symbols found)
...
&lt;SKIPPED&gt;
...
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb78f87fd in QTabWidget::currentPageIndex () from /usr/lib/libqt-mt.so.3
#7  0x0810c9c8 in UMLApp::slotChangeTabRight ()
#8  0x081d0abf in UMLApp::qt_invoke ()
#9  0xb77a7957 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#10 0xb77a83fc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#11 0xb68cb3b9 in KAction::activated () from /usr/lib/libkdeui.so.4
#12 0xb6908c02 in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#13 0xb69d154f in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#14 0xb77a7957 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#15 0xb77a83fc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#16 0xb7e0a249 in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#17 0xb7e593d7 in KAccelPrivate::emitActivatedSignal ()
   from /usr/lib/libkdecore.so.4
#18 0xb7ef746e in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#19 0xb77a6f04 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#20 0xb77a6f82 in QObject::event () from /usr/lib/libqt-mt.so.3
#21 0xb77de65b in QWidget::event () from /usr/lib/libqt-mt.so.3
#22 0xb78b4c5e in QMainWindow::event () from /usr/lib/libqt-mt.so.3
#23 0xb773eb88 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#24 0xb7740b58 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#25 0xb7eefdb2 in KApplication::notify () from /usr/lib/libkdecore.so.4
#26 0xb76d13fd in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#27 0xb773b93f in QAccelManager::tryAccelEvent () from /usr/lib/libqt-mt.so.3
#28 0xb773c1ff in qt_tryAccelEvent () from /usr/lib/libqt-mt.so.3
#29 0xb76c15b0 in QETWidget::translateKeyEvent () from /usr/lib/libqt-mt.so.3
#30 0xb76ce1cf in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#31 0xb76e5320 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#32 0xb775925e in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#33 0xb775906e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#34 0xb7740731 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#35 0x081d00f7 in main ()

How to reproduce:
-----------------
Open Umbrello, then open any XMI document with diagrams. Press Shift-Left.

My operating system:
--------------------
Kubuntu Edge Eft, KDE 3.5.5 from ubuntu repo, umbrello 1.5.5 from ubuntu repo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479993</commentid>
    <comment_count>1</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-10-26 21:01:13 +0000</bug_when>
    <thetext>SVN commit 599343 by okellogg:

slotChangeTab{Left,Right}: Cycle through the available diagrams when tabbed
 diagrams are turned off.
Stop supporting KDE 3.1 while we&apos;re at it.
BUG:136288


 M  +6 -0      ChangeLog  
 M  +1 -1      VERSION  
 M  +31 -29    umbrello/uml.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #599342:599343
@@ -1,4 +1,10 @@
+Version 1.5.52
+
+* Bugs/wishes from http://bugs.kde.org:
+* Shift + Left and Shift+Right causes SIGSEGV (136288)
+
 Version 1.5.51
+
 * This is an interim release that fixes a serious regression in version 1.5.5
   which is detailed at http://bugs.kde.org/135749 (Crash when opening a document)
 
--- branches/KDE/3.5/kdesdk/umbrello/VERSION #599342:599343
@@ -1 +1 @@
-1.5.51
+1.5.52
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #599342:599343
@@ -36,9 +36,7 @@
 #include &lt;kstandarddirs.h&gt;
 #include &lt;kstatusbar.h&gt;
 #include &lt;ktip.h&gt;
-#if KDE_IS_VERSION(3,1,90)
 #include &lt;ktabwidget.h&gt;
-#endif
 #include &lt;ktoolbarbutton.h&gt;
 #include &lt;kpopupmenu.h&gt;
 
@@ -175,13 +173,8 @@
     editCut = KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
     editCopy = KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
     editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
-#if KDE_IS_VERSION(3,1,90)
     createStandardStatusBarAction();
     setStandardToolBarMenuEnabled(true);
-#else
-    viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
-    viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
-#endif
     selectAll = KStdAction::selectAll(this,  SLOT( slotSelectAll() ), actionCollection());
     fileExportDocbook = new KAction(i18n(&quot;&amp;Export model to DocBook&quot;), 0, 
                                     this, SLOT( slotFileExportDocbook() ), 
@@ -218,10 +211,6 @@
     editCut-&gt;setToolTip(i18n(&quot;Cuts the selected section and puts it to the clipboard&quot;));
     editCopy-&gt;setToolTip(i18n(&quot;Copies the selected section to the clipboard&quot;));
     editPaste-&gt;setToolTip(i18n(&quot;Pastes the contents of the clipboard&quot;));
-#if !KDE_IS_VERSION(3,1,90)
-    viewToolBar-&gt;setToolTip(i18n(&quot;Enables/disables the toolbar&quot;));
-    viewStatusBar-&gt;setToolTip(i18n(&quot;Enables/disables the statusbar&quot;));
-#endif
     preferences-&gt;setToolTip( i18n( &quot;Set the default program preferences&quot;) );
 
     deleteSelectedWidget = new KAction( i18n(&quot;Delete &amp;Selected&quot;),
@@ -410,7 +399,6 @@
     addToolBar(m_alignToolBar, Qt::DockTop, false);
 
     m_mainDock = createDockWidget(&quot;maindock&quot;, 0L, 0L, &quot;main dock&quot;);
-#if KDE_IS_VERSION(3,1,90)
     m_newSessionButton = NULL;
     m_diagramMenu = NULL;
     m_closeDiagramButton = NULL;
@@ -457,7 +445,6 @@
         m_mainDock-&gt;setWidget(m_tabWidget);
     }
     else
-#endif
     {
         m_tabWidget = NULL;
         m_viewStack = new QWidgetStack(m_mainDock, &quot;viewstack&quot;);
@@ -531,11 +518,7 @@
     if( m_doc-&gt;URL().fileName() == i18n( &quot;Untitled&quot; ) ) {
         m_config -&gt; writeEntry( &quot;lastFile&quot;, &quot;&quot; );
     } else {
-#if KDE_IS_VERSION(3,1,3)
         m_config -&gt; writePathEntry( &quot;lastFile&quot;, m_doc -&gt; URL().prettyURL() );
-#else
-        m_config -&gt; writeEntry( &quot;lastFile&quot;, m_doc -&gt; URL().prettyURL() );
-#endif
     }
     m_config-&gt;writeEntry( &quot;imageMimeType&quot;, getImageMimeType() );
 
@@ -609,11 +592,7 @@
 
     } else {
         KURL url=m_doc-&gt;URL();
-#if KDE_IS_VERSION(3,1,3)
         _config-&gt;writePathEntry(&quot;filename&quot;, url.url());
-#else
-        _config-&gt;writeEntry(&quot;filename&quot;, url.url());
-#endif
         _config-&gt;writeEntry(&quot;modified&quot;, m_doc-&gt;isModified());
         QString tempname = kapp-&gt;tempSaveName(url.url());
         QString tempurl= KURL::encode_string(tempname);
@@ -1607,11 +1586,9 @@
 }
 
 QWidget* UMLApp::getMainViewWidget() {
-#if KDE_IS_VERSION(3,1,90)
     Settings::OptionState&amp; optionState = Settings::getOptionState();
     if (optionState.generalState.tabdiagrams)
         return m_tabWidget;
-#endif
     return m_viewStack;
 }
 
@@ -1623,6 +1600,9 @@
     kapp-&gt;processEvents();
     if (view) {
         slotStatusMsg(view-&gt;getName());
+        UMLListViewItem* lvitem = m_listView-&gt;findView(view);
+        if (lvitem)
+            m_listView-&gt;setCurrentItem(lvitem);
     }
 }
 
@@ -1655,15 +1635,37 @@
 }
 
 void UMLApp::slotChangeTabLeft() {
-#if KDE_IS_VERSION(3,1,90)
-    m_tabWidget-&gt;setCurrentPage( m_tabWidget-&gt;currentPageIndex() - 1 );
-#endif
+    if (m_tabWidget) {
+        m_tabWidget-&gt;setCurrentPage( m_tabWidget-&gt;currentPageIndex() - 1 );
+        return;
+    }
+    UMLViewList views = m_doc-&gt;getViewIterator();
+    UMLView *currView = m_view;
+    if (views.find(currView) &lt; 0) {
+        kdError() &lt;&lt; &quot;UMLApp::slotChangeTabLeft(): currView not found in viewlist&quot; &lt;&lt; endl;
+        return;
+    }
+    if ((currView = views.prev()) != NULL)
+        setCurrentView(currView);
+    else
+        setCurrentView(views.last());
 }
 
 void UMLApp::slotChangeTabRight() {
-#if KDE_IS_VERSION(3,1,90)
-    m_tabWidget-&gt;setCurrentPage( m_tabWidget-&gt;currentPageIndex() + 1 );
-#endif
+    if (m_tabWidget) {
+        m_tabWidget-&gt;setCurrentPage( m_tabWidget-&gt;currentPageIndex() + 1 );
+        return;
+    }
+    UMLViewList views = m_doc-&gt;getViewIterator();
+    UMLView *currView = m_view;
+    if (views.find(currView) &lt; 0) {
+        kdError() &lt;&lt; &quot;UMLApp::slotChangeTabRight(): currView not found in viewlist&quot; &lt;&lt; endl;
+        return;
+    }
+    if ((currView = views.next()) != NULL)
+        setCurrentView(currView);
+    else
+        setCurrentView(views.first());
 }
 
 void UMLApp::slotMoveTabLeft() {
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>505132</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2007-01-30 07:37:36 +0000</bug_when>
    <thetext>*** Bug 140872 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>