[vlmc-devel] ProjectWizard: Don' t fake RecentProjects when a project is supposed to be opend

Yikai Lu git at videolan.org
Tue Apr 12 15:51:27 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Apr 11 17:55:13 2016 +0900| [5afcb363f500cd21ffd78c85827f9ec4691ad5ae] | committer: Hugo Beauzée-Luyssen

ProjectWizard: Don't fake RecentProjects when a project is supposed to be opend

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/5afcb363f500cd21ffd78c85827f9ec4691ad5ae
---

 src/Gui/wizard/WelcomePage.cpp | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/Gui/wizard/WelcomePage.cpp b/src/Gui/wizard/WelcomePage.cpp
index 6e44cb8..7767a55 100644
--- a/src/Gui/wizard/WelcomePage.cpp
+++ b/src/Gui/wizard/WelcomePage.cpp
@@ -146,27 +146,8 @@ WelcomePage::loadProject()
         return;
     }
 
-    // Search if the item is already in the list
-    QListWidgetItem* item = nullptr;
-    for ( int i = 0; i < m_ui.projectsListWidget->count(); ++i )
-    {
-        item = m_ui.projectsListWidget->item( i );
-        if ( item->data( FilePath ).toString().contains( projectPath ) )
-            break;
-        item = nullptr;
-    }
-
-    // Item not in list, insert it temporarily
-    if ( !item )
-    {
-        QFileInfo fi( projectPath );
-        item = new QListWidgetItem( fi.fileName() );
-        item->setData( FilePath, fi.absoluteFilePath() );
 
-        m_ui.projectsListWidget->addItem( item );
-    }
 
-    item->setSelected( true );
     selectOpenRadio();
 }
 



More information about the Vlmc-devel mailing list