Bug 132535 - can recieve multiple send project , this freeze for 1 minute quanta (press more time f8)
Summary: can recieve multiple send project , this freeze for 1 minute quanta (press mo...
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-17 10:32 UTC by Roberto Innocenti
Modified: 2006-09-02 12:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Innocenti 2006-08-17 10:32:23 UTC
Version:           3.5.2 (using KDE KDE 3.4.2)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.1 
OS:                Linux

when you press f8 the upload window is not modal so if you press again f8 or equivalent menu item, it open a new upload window and after that the upload windows doesn't answer to the comand for 1 minutes...
Comment 1 András Manţia 2006-09-02 12:29:30 UTC
SVN commit 579990 by amantia:

Only one upload dialog can be shown at any time...

BUG: 132535

 M  +1 -0      ChangeLog  
 M  +15 -7     project/project.cpp  
 M  +2 -2      project/project.h  
 M  +5 -2      project/projectprivate.h  
 M  +3 -3      project/projectupload.cpp  
 M  +1 -1      project/projectupload.h  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #579989:579990
@@ -10,6 +10,7 @@
       - don't crash when closing a document in VPL mode [#133082, #126585, #125153]
       - fix crash when copying to clipboard inside VPL [#130212]
       - show the correct column number if tabs are used in the document [#133313]
+      - only one upload dialog can be shown at any time [#132535]
 
 Version 3.5.4 (Release date: 02-08-2006; Started 24-06-2005):
  - bugfixes:
--- branches/KDE/3.5/kdewebdev/quanta/project/project.cpp #579989:579990
@@ -74,6 +74,7 @@
   d = new ProjectPrivate(this);
   connect(d, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
   d->m_mainWindow = parent;
+  d->m_uploadDialog = 0L;
   keepPasswd = true;
   d->initActions(parent->actionCollection());
 }
@@ -854,9 +855,13 @@
   if (! ViewManager::ref()->saveAll())
     return;
 
-  ProjectUpload *dlg = new ProjectUpload(KURL(), "", false, false, false, i18n("Upload project items..."));
-  connect(dlg, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
-  dlg->show();
+  if (!d->m_uploadDialog)
+  {
+    d->m_uploadDialog = new ProjectUpload(KURL(), "", false, false, false, i18n("Upload project items..."));
+    connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+    d->m_uploadDialog->show();
+  } else
+    d->m_uploadDialog->raise();
 }
 
 void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName, bool quickUpload, bool markOnly)
@@ -865,10 +870,13 @@
     return;
 
   KURL url = QExtFileInfo::toRelative( urlToUpload, d->baseURL);
-
-  ProjectUpload *dlg = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items..."));
-  connect(dlg, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
-  dlg->show();
+  if (!d->m_uploadDialog)
+  {
+    d->m_uploadDialog = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items..."));
+    connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+    d->m_uploadDialog->show();
+  } else
+    d->m_uploadDialog->raise();
 }
 
 
--- branches/KDE/3.5/kdewebdev/quanta/project/project.h #579989:579990
@@ -121,7 +121,7 @@
   QString yourself();
   /**
    * Get the roles of the current user in the form "role:task".
-   * Examples: "team leader", "project leader:subprojectname", "task leader:taskname". 
+   * Examples: "team leader", "project leader:subprojectname", "task leader:taskname".
    * @return the roles (in lowercase)
    */
   QStringList yourRoles();
@@ -144,7 +144,7 @@
        @return true if close is possible
   */
   bool queryClose();
-  
+
   /** Saves the bookmarks for the url into the project file */
   void saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf);
   /** Loads the bookmarks for the url from the project file and sets them in the view*/
--- branches/KDE/3.5/kdewebdev/quanta/project/projectprivate.h #579989:579990
@@ -21,10 +21,12 @@
 //qt includes
 #include <qmap.h>
 #include <qregexp.h>
+#include <qguardedptr.h>
 
 //app includes
 #include "project.h"
 #include "projectlist.h"
+#include "projectupload.h"
 
 class QWidgetStack;
 
@@ -101,6 +103,7 @@
   QString debuggerClient;
   bool m_debuggerPersistentBreakpoints;
   bool m_debuggerPersistentWatches;
+  QGuardedPtr<ProjectUpload> m_uploadDialog;
 
   TeamMember m_teamLeader;
   QMap<QString, TeamMember> m_subprojectLeaders;
@@ -171,7 +174,7 @@
       @return false if there was nothing to save or an error occured during save
   */
   bool saveProject();
-  
+
   /**
       adds information about the current open project into config
    */
@@ -213,7 +216,7 @@
 
   /** Proceed with project closing.*/
   void slotProceedWithCloseProject(bool success);
-  
+
   void slotAddDirectory();
 
   void slotAddFiles();
--- branches/KDE/3.5/kdewebdev/quanta/project/projectupload.cpp #579989:579990
@@ -169,13 +169,13 @@
  totalText->setText(i18n("Scanning project files..."));
 
  KURL u = m_project->projectBaseURL();
- if (!startUrl.isEmpty()) 
+ if (!startUrl.isEmpty())
  {
    u = QExtFileInfo::toAbsolute(startUrl, u);
  }
  QDict<KFileItem> projectDirFiles;
 
- if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder 
+ if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder
  {
    projectDirFiles = QExtFileInfo::allFilesDetailed(u, "*", this);
  } else
@@ -558,7 +558,7 @@
    // QListViewItem *it = list->findItem( currentURL.path() );
     QListViewItem *it = currentItem;
     if (it)
-    {      
+    {
      it->setSelected(false);
      UploadTreeFile *itf = dynamic_cast<UploadTreeFile*>(it);
      if (itf)
--- branches/KDE/3.5/kdewebdev/quanta/project/projectupload.h #579989:579990
@@ -26,7 +26,6 @@
 #include <qstringlist.h>
 
 #include <kio/job.h>
-#include "uploadtreeview.h"
 
 /**
   *@author Dmitry Poplavsky & Alexander Yakovlev & Andras Mantia
@@ -77,6 +76,7 @@
   virtual void resizeEvent( QResizeEvent * );
   virtual void reject();
 
+
 signals: // Signals
   /** No descriptions */
   void uploadNext();