From 0ff34892a75a550f705b30d9ef2239b1639cf5ea Mon Sep 17 00:00:00 2001 From: Sérgio Basto Date: May 31 2012 05:49:23 +0000 Subject: New upstream release --- diff --git a/smb4k-1.0.2.patch b/smb4k-1.0.2.patch deleted file mode 100644 index ab5af20..0000000 --- a/smb4k-1.0.2.patch +++ /dev/null @@ -1,345 +0,0 @@ -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/ChangeLog smb4k-1.0.2/ChangeLog ---- smb4k-1.0.1/ChangeLog 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/ChangeLog 2012-05-29 18:38:46.000000000 +0100 -@@ -1,3 +1,22 @@ -+Smb4K 1.0.2 (????-??-??): -+- Fixed two potential crashes in class Smb4KHomesSharesHandler. -+- Fixed a wrong comparision between QString and QByteArray in -+ Smb4KMountJob::slotActionFinished(). -+- Fixed a wrong comparision between QString and QByteArray and a double -+ declaration in Smb4KUnmountJob::slotActionFinished(). -+- Fixed wrong assumption that qreal equals double in Smb4KShare class. -+ Patch by Rex Dieter from the Fedora Project. -+- Fixed missing assignments of the IP address in Smb4KAuthInfo::setHost() -+ and Smb4KAuthInfo::setShare(). -+- When prompting for a password for a 'homes' share, use the UNC of the -+ user's home directory and not //SERVER/homes. -+- When mounting a 'homes' share, show the UNC of the user's home directory -+ in the mainwindow's status bar instead of //SERVER/homes. -+- Fixed a crash in Smb4KMountJob::slotActionFinished() reported by -+ Peter Trenholme. -+- Fixed unmounting on exit. Many thanks go to Peter Trenholme for reporting -+ this issue. -+ - Smb4K 1.0.1 (2012-03-11): - - Fixed potential crash in Smb4KWalletManager::init(). - - Fixed KDEInit complaining when Smb4K is started from a desktop icon -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/CMakeLists.txt smb4k-1.0.2/core/CMakeLists.txt ---- smb4k-1.0.1/core/CMakeLists.txt 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/CMakeLists.txt 2012-05-29 18:38:46.000000000 +0100 -@@ -55,7 +55,7 @@ target_link_libraries( smb4kcore - ${KDE4_KIO_LIBS} - ${KDE4_SOLID_LIBS} ) - --set_target_properties( smb4kcore PROPERTIES VERSION 4.0.0 SOVERSION 4 ) -+set_target_properties( smb4kcore PROPERTIES VERSION 4.0.1 SOVERSION 4 ) - install( TARGETS smb4kcore DESTINATION ${LIB_INSTALL_DIR} ) - - -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kauthinfo.cpp smb4k-1.0.2/core/smb4kauthinfo.cpp ---- smb4k-1.0.1/core/smb4kauthinfo.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kauthinfo.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -83,6 +83,7 @@ void Smb4KAuthInfo::setHost( Smb4KHost * - m_workgroup = host->workgroupName(); - m_homes_share = false; - m_url = host->url(); -+ m_ip = host->ip(); - } - - -@@ -102,6 +103,8 @@ void Smb4KAuthInfo::setShare( Smb4KShare - { - m_url = share->homeURL(); - } -+ -+ m_ip = share->hostIP(); - } - - -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4khomesshareshandler.cpp smb4k-1.0.2/core/smb4khomesshareshandler.cpp ---- smb4k-1.0.1/core/smb4khomesshareshandler.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4khomesshareshandler.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -316,20 +316,27 @@ void Smb4KHomesSharesHandler::findHomesU - Q_ASSERT( share ); - Q_ASSERT( users ); - -- for ( int i = 0; i < m_homes_users.size(); ++i ) -+ if ( !m_homes_users.isEmpty() ) - { -- if ( QString::compare( share->unc(), m_homes_users.at( i ).share.unc(), Qt::CaseInsensitive ) == 0 && -- ((m_homes_users.at( i ).share.workgroupName().isEmpty() || share->workgroupName().isEmpty()) || -- QString::compare( share->workgroupName(), m_homes_users.at( i ).share.workgroupName(), Qt::CaseInsensitive ) == 0) ) -+ for ( int i = 0; i < m_homes_users.size(); ++i ) - { -- *users = m_homes_users.at( i ).users; -- break; -- } -- else -- { -- continue; -+ if ( QString::compare( share->unc(), m_homes_users.at( i ).share.unc(), Qt::CaseInsensitive ) == 0 && -+ ((m_homes_users.at( i ).share.workgroupName().isEmpty() || share->workgroupName().isEmpty()) || -+ QString::compare( share->workgroupName(), m_homes_users.at( i ).share.workgroupName(), Qt::CaseInsensitive ) == 0) ) -+ { -+ *users = m_homes_users.at( i ).users; -+ break; -+ } -+ else -+ { -+ continue; -+ } - } - } -+ else -+ { -+ // Do nothing -+ } - } - - -@@ -340,30 +347,37 @@ void Smb4KHomesSharesHandler::addHomesUs - - bool found = false; - -- for ( int i = 0; i < m_homes_users.size(); ++i ) -+ if ( !m_homes_users.isEmpty() ) - { -- if ( QString::compare( share->unc(), m_homes_users.at( i ).share.unc(), Qt::CaseInsensitive ) == 0 && -- ((m_homes_users.at( i ).share.workgroupName().isEmpty() || share->workgroupName().isEmpty()) || -- QString::compare( share->workgroupName(), m_homes_users.at( i ).share.workgroupName(), Qt::CaseInsensitive ) == 0) ) -+ for ( int i = 0; i < m_homes_users.size(); ++i ) - { -- m_homes_users[i].users = *users; -- found = true; -- break; -+ if ( QString::compare( share->unc(), m_homes_users.at( i ).share.unc(), Qt::CaseInsensitive ) == 0 && -+ ((m_homes_users.at( i ).share.workgroupName().isEmpty() || share->workgroupName().isEmpty()) || -+ QString::compare( share->workgroupName(), m_homes_users.at( i ).share.workgroupName(), Qt::CaseInsensitive ) == 0) ) -+ { -+ m_homes_users[i].users = *users; -+ found = true; -+ break; -+ } -+ else -+ { -+ continue; -+ } -+ } -+ -+ if ( !found ) -+ { -+ m_homes_users << Smb4KHomesUsers( *share, *users ); - } - else - { -- continue; -+ // Do nothing - } - } -- -- if ( !found ) -- { -- m_homes_users << Smb4KHomesUsers( *share, *users ); -- } - else - { - // Do nothing -- } -+ } - } - - -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kmounter.cpp smb4k-1.0.2/core/smb4kmounter.cpp ---- smb4k-1.0.1/core/smb4kmounter.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kmounter.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -1031,7 +1031,14 @@ void Smb4KMounter::unmountShares( const - } - else - { -- // Do nothing -+ if ( p->aboutToQuit() ) -+ { -+ continue; -+ } -+ else -+ { -+ // Do nothing -+ } - } - } - } -@@ -1085,13 +1092,27 @@ void Smb4KMounter::unmountShares( const - - addSubjob( job ); - -- job->start(); -+ if ( !p->aboutToQuit() ) -+ { -+ job->start(); -+ } -+ else -+ { -+ job->synchronousStart(); -+ } - } - - - void Smb4KMounter::unmountAllShares( QWidget *parent ) - { -- unmountShares( mountedSharesList(), false, parent ); -+ if ( !p->aboutToQuit() ) -+ { -+ unmountShares( mountedSharesList(), false, parent ); -+ } -+ else -+ { -+ unmountShares( mountedSharesList(), true, parent ); -+ } - } - - -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kmounter_p.cpp smb4k-1.0.2/core/smb4kmounter_p.cpp ---- smb4k-1.0.1/core/smb4kmounter_p.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kmounter_p.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -729,13 +729,13 @@ void Smb4KMountJob::slotActionFinished( - // Check if the mount process reported an error - QString stderr( reply.data()["stderr"].toString() ); - -- if ( share->canonicalPath() == reply.data()["share_mountpoint"].toByteArray() && !stderr.isEmpty() ) -+ if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && stderr.isEmpty() ) - { - #ifndef Q_OS_FREEBSD - if ( stderr.contains( "mount error 13", Qt::CaseSensitive ) || stderr.contains( "mount error(13)" ) - /* authentication error */ ) - { -- m_auth_errors << *share; -+ m_auth_errors << Smb4KShare( *share ); - emit authError( this ); - } - else if ( (stderr.contains( "mount error 6" ) || stderr.contains( "mount error(6)" )) /* bad share name */ && -@@ -854,6 +854,13 @@ void Smb4KUnmountJob::start() - } - - -+void Smb4KUnmountJob::synchronousStart() -+{ -+ m_started = true; -+ slotStartUnmount(); -+} -+ -+ - void Smb4KUnmountJob::setupUnmount( Smb4KShare *share, bool force, bool silent, QWidget *parent ) - { - Q_ASSERT( share ); -@@ -1013,20 +1020,10 @@ void Smb4KUnmountJob::slotActionFinished - // Check if the unmount process reported an error - QString stderr( reply.data()["stderr"].toString() ); - -- if ( share->canonicalPath() == reply.data()["share_mountpoint"].toByteArray() && !stderr.isEmpty() ) -+ if ( QString::compare( share->canonicalPath(), reply.data()["share_mountpoint"].toString() ) == 0 && stderr.isEmpty() ) - { -- // Check if an error occurred. -- QString stderr( reply.data().value( "stderr" ).toString() ); -- -- if ( !stderr.isEmpty() ) -- { -- Smb4KNotification *notification = new Smb4KNotification(); -- notification->unmountingFailed( share, stderr ); -- } -- else -- { -- // Do nothing -- } -+ Smb4KNotification *notification = new Smb4KNotification(); -+ notification->unmountingFailed( share, stderr ); - } - else - { -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kmounter_p.h smb4k-1.0.2/core/smb4kmounter_p.h ---- smb4k-1.0.1/core/smb4kmounter_p.h 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kmounter_p.h 2012-05-29 18:38:46.000000000 +0100 -@@ -206,6 +206,14 @@ class Smb4KUnmountJob : public KJob - void start(); - - /** -+ * Starts the job synchronously. In contrast to the start() function, it -+ * directly calls slotStartUnmount(). -+ * -+ * You should not use this function unless it is really necessary. -+ */ -+ void synchronousStart(); -+ -+ /** - * Set up the job for a single unmount. - * - * You must run this function before start() is called. -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kshare.cpp smb4k-1.0.2/core/smb4kshare.cpp ---- smb4k-1.0.1/core/smb4kshare.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kshare.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -475,7 +475,7 @@ QString Smb4KShare::totalDiskSpaceString - QString total, total_dim = QString(); - - int exponent = 0; -- qreal tmp_factor = 0; -+ double tmp_factor = 0; - qulonglong factor = 0; - - (void) frexp( m_total * 1024, &exponent ); -@@ -532,7 +532,7 @@ QString Smb4KShare::freeDiskSpaceString( - QString free, free_dim = QString(); - - int exponent = 0; -- qreal tmp_factor = 0; -+ double tmp_factor = 0; - qulonglong factor = 0; - - (void) frexp( m_free * 1024, &exponent ); -@@ -589,7 +589,7 @@ QString Smb4KShare::usedDiskSpaceString( - QString used, used_dim = QString(); - - int exponent = 0; -- qreal tmp_factor = 0; -+ double tmp_factor = 0; - qulonglong factor = 0; - - (void) frexp( m_used * 1024, &exponent ); -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/core/smb4kwalletmanager.cpp smb4k-1.0.2/core/smb4kwalletmanager.cpp ---- smb4k-1.0.1/core/smb4kwalletmanager.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/core/smb4kwalletmanager.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -914,8 +914,15 @@ bool Smb4KWalletManager::showPasswordDia - dlg.setUsername( share->login() ); - dlg.setPassword( share->password() ); - } -- -- dlg.setPrompt( i18n( "Please enter a username and a password for the share %1.", share->unc() ) ); -+ -+ if ( !share->isHomesShare() ) -+ { -+ dlg.setPrompt( i18n( "Please enter a username and a password for the share %1.", share->unc() ) ); -+ } -+ else -+ { -+ dlg.setPrompt( i18n( "Please enter a username and a password for the share %1.", share->homeUNC() ) ); -+ } - - // Execute the password dialog, retrieve the new authentication - // information and save it. -diff -Nurp -x doc-translations -x doc -x po smb4k-1.0.1/smb4k/smb4kmainwindow.cpp smb4k-1.0.2/smb4k/smb4kmainwindow.cpp ---- smb4k-1.0.1/smb4k/smb4kmainwindow.cpp 2012-03-11 15:33:45.000000000 +0000 -+++ smb4k-1.0.2/smb4k/smb4kmainwindow.cpp 2012-05-29 18:38:46.000000000 +0100 -@@ -831,7 +831,14 @@ void Smb4KMainWindow::slotMounterAboutTo - { - case Smb4KMounter::MountShare: - { -- statusBar()->showMessage( i18n( "Mounting share %1..." ).arg( share->unc() ), 0 ); -+ if ( !share->isHomesShare() ) -+ { -+ statusBar()->showMessage( i18n( "Mounting share %1..." ).arg( share->unc() ), 0 ); -+ } -+ else -+ { -+ statusBar()->showMessage( i18n( "Mounting share %1..." ).arg( share->homeUNC() ), 0 ); -+ } - break; - } - case Smb4KMounter::UnmountShare: