[vlc-commits] commit: Qt4: bookmarks: don't give an anonymous temporary object to qtu ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Fri Mar 12 00:35:33 CET 2010


vlc/vlc-1.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  7 17:39:50 2010 +0200| [cda4e6df4a00396893d9a817796175885567e7e8] | committer: Jean-Baptiste Kempf 

Qt4: bookmarks: don't give an anonymous temporary object to qtu

There may be similar bugs in other places
(cherry picked from commit c83ddc49d39f35257dd27cbfbf835350f9bb6d84)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=cda4e6df4a00396893d9a817796175885567e7e8
---

 modules/gui/qt4/dialogs/bookmarks.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/dialogs/bookmarks.cpp b/modules/gui/qt4/dialogs/bookmarks.cpp
index 9fa7615..aaa11bd 100644
--- a/modules/gui/qt4/dialogs/bookmarks.cpp
+++ b/modules/gui/qt4/dialogs/bookmarks.cpp
@@ -152,8 +152,9 @@ void BookmarksDialog::add()
 
     if( !input_Control( p_input, INPUT_GET_BOOKMARK, &bookmark ) )
     {
-        bookmark.psz_name = const_cast<char *>qtu( THEMIM->getIM()->getName() +
-                   QString::number( bookmarksList->topLevelItemCount() ) );
+        QString name = THEMIM->getIM()->getName()
+                     + QString::number( bookmarksList->topLevelItemCount() );
+        bookmark.psz_name = const_cast<char *>qtu( name );
 
         input_Control( p_input, INPUT_ADD_BOOKMARK, &bookmark );
     }



More information about the vlc-commits mailing list