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

List:       kde-commits
Subject:    branches/work/kdab-post-4.0/kdepim
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2007-12-31 9:09:58
Message-ID: 1199092198.242632.803.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 755032 by staniek:

(compilation fixed for msvc) moved variables inside the loops


 M  +3 -3      kleopatra/certmanager.cpp  
 M  +4 -1      libkleo/kleo/cryptobackendfactory.cpp  
 M  +16 -9     libkleo/ui/backendconfigwidget.cpp  


--- branches/work/kdab-post-4.0/kdepim/kleopatra/certmanager.cpp #755031:755032
@@ -106,17 +106,17 @@
     ~DisplayStrategy() {}
 
     virtual QFont keyFont( const GpgME::Key& key, const QFont& font ) const {
-      const Kleo::KeyFilter* filter = \
Kleo::KeyFilterManager::instance()->filterMatching( key ); +      const \
Kleo::KeyFilter* filter = 0;//todo \
Kleo::KeyFilterManager::instance()->filterMatching( key );  return filter ? \
filter->font( font ) : font;  }
     virtual QColor keyForeground( const GpgME::Key& key, const QColor& c ) const {
-      const Kleo::KeyFilter* filter = \
Kleo::KeyFilterManager::instance()->filterMatching( key ); +      const \
Kleo::KeyFilter* filter = 0;//todo \
Kleo::KeyFilterManager::instance()->filterMatching( key );  if ( filter && \
filter->fgColor().isValid() )  return filter->fgColor();
       return c;
     }
     virtual QColor keyBackground( const GpgME::Key& key, const QColor& c  ) const {
-      const Kleo::KeyFilter* filter = \
Kleo::KeyFilterManager::instance()->filterMatching( key ); +      const \
Kleo::KeyFilter* filter = 0;//todo \
Kleo::KeyFilterManager::instance()->filterMatching( key );  if ( filter && \
filter->bgColor().isValid() )  return filter->bgColor();
       return c;
--- branches/work/kdab-post-4.0/kdepim/libkleo/kleo/cryptobackendfactory.cpp \
#755031:755032 @@ -162,7 +162,10 @@
 void Kleo::CryptoBackendFactory::scanForBackends( QStringList * reasons ) {
   for ( std::vector<CryptoBackend*>::const_iterator it = mBackendList.begin() ; it \
!= mBackendList.end() ; ++it ) {  assert( *it );
-    for ( int i = 0 ; const char * protocol = (*it)->enumerateProtocols( i ) ; ++i ) \
{ +    for ( int i = 0 ;; ++i ) {
+      const char * protocol = (*it)->enumerateProtocols( i );
+      if ( !protocol )
+        break;
       QString reason;
       if ( (*it)->supportsProtocol( protocol ) && !(*it)->checkForProtocol( \
protocol, &reason ) ) {  if ( reasons ) {
--- branches/work/kdab-post-4.0/kdepim/libkleo/ui/backendconfigwidget.cpp \
#755031:755032 @@ -249,20 +249,23 @@
   unsigned int backendCount = 0;
 
   // populate the plugin list:
-  BackendListViewItem * top = 0;
-  for ( unsigned int i = 0 ; const CryptoBackend * b = d->backendFactory->backend( i \
) ; ++i ) { +  for ( unsigned int i = 0 ;; ++i ) {
+    const CryptoBackend * b = d->backendFactory->backend( i );
+    if ( !b )
+      break;
 
-    top = new Kleo::BackendListViewItem( d->listView, top, b );
+    BackendListViewItem * top = new Kleo::BackendListViewItem( d->listView, top, b \
); +    for ( int i = 0 ;; ++i ) {
+      const char * name = b->enumerateProtocols( i );
+      if ( !name )
+        break;
 
-    ProtocolCheckListItem * last = 0;
-    for ( int i = 0 ; const char * name = b->enumerateProtocols( i ) ; ++i ) {
       const CryptoBackend::Protocol * protocol = b->protocol( name );
-
       if ( protocol ) {
-        last = new ProtocolCheckListItem( top, last, name, protocol );
+        ProtocolCheckListItem *last = new ProtocolCheckListItem( top, last, name, \
protocol );  last->setOn( protocol == d->backendFactory->protocol( name ) );
       } else if ( b->supportsProtocol( name ) ) {
-        last = new ProtocolCheckListItem( top, last, name, 0 );
+        ProtocolCheckListItem *last = new ProtocolCheckListItem( top, last, name, 0 \
);  last->setOn( false );
         last->setEnabled( false );
       }
@@ -319,8 +322,12 @@
 }
 
 void Kleo::BackendConfigWidget::save() const {
-  for ( int i = 0 ; const char * name = d->backendFactory->enumerateProtocols( i ) ; \
++i ) +  for ( int i = 0 ;; ++i ) {
+    const char * name = d->backendFactory->enumerateProtocols( i );
+    if ( !name )
+      break;
     d->backendFactory->setProtocolBackend( name,  d->listView->chosenBackend( name ) \
); +  }
 }
 
 void Kleo::BackendConfigWidget::virtual_hook( int, void* ) {}


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

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