[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/libarchive-based-ark/ark/kerfuffle
From:       Henrique Pinto <tawhaki () gmail ! com>
Date:       2007-07-12 13:46:48
Message-ID: 1184248008.911292.25079.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 686954 by henrique:

 * Create an "error" signal
 * Remove column names from arch.h


 M  +1 -15     arch.h  
 M  +4 -0      archivebase.cpp  
 M  +1 -1      jobs.cpp  
 M  +2 -1      jobs_p.h  


--- branches/work/libarchive-based-ark/ark/kerfuffle/arch.h #686953:686954
@@ -96,6 +96,7 @@
 		void sigExtract( bool );
 		void sigAdd( bool );
 		void newEntry( const ArchiveEntry& entry );
+		void error( const QString& error, const QString& details );
 
 	protected:
 		void setReadOnly( bool readOnly ) { m_readOnly = readOnly; }
@@ -104,19 +105,4 @@
 		bool m_readOnly; // for readonly archives
 };
 
-// Columns
-#define FILENAME_COLUMN    qMakePair( i18n(" Filename "),    Qt::AlignLeft  )
-#define PERMISSION_COLUMN  qMakePair( i18n(" Permissions "), Qt::AlignLeft  )
-#define OWNER_GROUP_COLUMN qMakePair( i18n(" Owner/Group "), Qt::AlignLeft  )
-#define SIZE_COLUMN        qMakePair( i18n(" Size "),        Qt::AlignRight )
-#define TIMESTAMP_COLUMN   qMakePair( i18n(" Timestamp "),   Qt::AlignRight )
-#define LINK_COLUMN        qMakePair( i18n(" Link "),        Qt::AlignLeft  )
-#define PACKED_COLUMN      qMakePair( i18n(" Size Now "),    Qt::AlignRight )
-#define RATIO_COLUMN       qMakePair( i18n(" Ratio "),       Qt::AlignRight )
-#define CRC_COLUMN         qMakePair( i18nc("Cyclic Redundancy Check"," CRC "), Qt::AlignRight )
-#define METHOD_COLUMN      qMakePair( i18n(" Method "),  Qt::AlignLeft  )
-#define VERSION_COLUMN     qMakePair( i18n(" Version "), Qt::AlignLeft  )
-#define OWNER_COLUMN       qMakePair( i18n(" Owner "),   Qt::AlignLeft  )
-#define GROUP_COLUMN       qMakePair( i18n(" Group "),   Qt::AlignLeft  )
-
 #endif /* ARCH_H */
--- branches/work/libarchive-based-ark/ark/kerfuffle/archivebase.cpp #686953:686954
@@ -58,6 +58,8 @@
 	         this, SLOT( listingDone( ThreadWeaver::Job * ) ) );
 	connect( job, SIGNAL( entry( const ArchiveEntry & ) ),
 	         this, SIGNAL( newEntry( const ArchiveEntry & ) ) );
+	connect( job, SIGNAL( error( const QString&, const QString& ) ),
+	         this, SIGNAL( error( const QString&, const QString& ) ) );
 	ThreadWeaver::Weaver::instance()->enqueue( job );
 }
 
@@ -88,6 +90,8 @@
 	ExtractionJob *job = new ExtractionJob( m_iface, files, destinationDir, this );
 	connect( job, SIGNAL( done( ThreadWeaver::Job* ) ),
 	         this, SLOT( extractionDone( ThreadWeaver::Job * ) ) );
+	connect( job, SIGNAL( error( const QString&, const QString& ) ),
+	         this, SIGNAL( error( const QString&, const QString& ) ) );
 	ThreadWeaver::Weaver::instance()->enqueue( job );
 }
 
--- branches/work/libarchive-based-ark/ark/kerfuffle/jobs.cpp #686953:686954
@@ -90,7 +90,7 @@
 
 void ArchiveJobHelper::onError( const QString & message, const QString & details )
 {
-	// TODO: do something
+	emit error( message, details );
 }
 
 void ArchiveJobHelper::onEntry( const ArchiveEntry & archiveEntry )
--- branches/work/libarchive-based-ark/ark/kerfuffle/jobs_p.h #686953:686954
@@ -41,13 +41,14 @@
 
 		bool getTheListing();
 
-		void onError( const QString & message, const QString & details );
+		void onError( const QString & message, const QString & details = QString() );
 		void onEntry( const ArchiveEntry & archiveEntry );
 		void onProgress( double );
 
 	signals:
 		void entry( const ArchiveEntry & );
 		void progress( double );
+		void error( const QString & message, const QString & details );
 
 	private slots:
 		void entryslot( const ArchiveEntry & );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic