diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-16 01:50:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-16 01:50:36 +0000 |
commit | d4b702756e673463c9fc008bc6e5931aac6a9011 (patch) | |
tree | 56d925d93b2b1468fdcf6b55fbdd5bad008f74c6 | |
parent | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (diff) | |
download | tdepim-d4b702756e673463c9fc008bc6e5931aac6a9011.tar.gz tdepim-d4b702756e673463c9fc008bc6e5931aac6a9011.zip |
* gcc4.4 compilation fixes
* kmail crash issues resolved
* automake updates
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1062791 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | indexlib/memvector.tcc | 8 | ||||
-rw-r--r-- | kalarm/kalarm.desktop | 1 | ||||
-rw-r--r-- | kmail/Makefile.am | 1 | ||||
-rw-r--r-- | kmail/accountmanager.cpp | 29 | ||||
-rwxr-xr-x | kmail/avscripts/kmail_clamav.sh | 2 | ||||
-rw-r--r-- | kmail/configuredialog.cpp | 10 | ||||
-rw-r--r-- | kmail/editorwatcher.cpp | 18 | ||||
-rw-r--r-- | kmail/kmail-3.5-filter-icons.pl | 22 | ||||
-rw-r--r-- | kmail/kmail.upd | 4 | ||||
-rw-r--r-- | kmail/kmstartup.cpp | 1 | ||||
-rw-r--r-- | ktnef/gui/ktnef.desktop | 2 | ||||
-rw-r--r-- | libemailfunctions/email.cpp | 52 | ||||
-rw-r--r-- | libkdepim/Makefile.am | 2 | ||||
-rw-r--r-- | mimelib/Makefile.am | 2 | ||||
-rw-r--r-- | mimelib/mimelib/config.h | 3 | ||||
-rw-r--r-- | networkstatus/Makefile.am | 8 | ||||
-rw-r--r-- | wizards/groupwarewizard.desktop | 2 |
17 files changed, 114 insertions, 53 deletions
diff --git a/indexlib/memvector.tcc b/indexlib/memvector.tcc index ef45c2b5f..792c389c3 100644 --- a/indexlib/memvector.tcc +++ b/indexlib/memvector.tcc @@ -30,13 +30,13 @@ template <typename T> void memvector<T>::resize( size_type n_s ) { if ( size() >= n_s ) return; - data_->resize( n_s * byte_io::byte_lenght<value_type>() + byte_io::byte_lenght<unsigned>() ); + using namespace byte_io; + data_->resize( n_s * byte_lenght<value_type>() + byte_lenght<unsigned>() ); iterator p_end = end(); - byte_io::write<unsigned>( data_->rw_base( 0 ), n_s ); - while ( operator !=<unsigned, unsigned>(p_end, end()) ) { + write<unsigned>( data_->rw_base( 0 ), n_s ); + while ( p_end != end() ) { *p_end = value_type(); ++p_end; - } } diff --git a/kalarm/kalarm.desktop b/kalarm/kalarm.desktop index 970847004..da42c9113 100644 --- a/kalarm/kalarm.desktop +++ b/kalarm/kalarm.desktop @@ -73,3 +73,4 @@ Terminal=false X-DCOP-ServiceType=Unique X-KDE-StartupNotify=true Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM;Office;Calendar; +OnlyShowIn=KDE; diff --git a/kmail/Makefile.am b/kmail/Makefile.am index ea566c457..5938c3dfc 100644 --- a/kmail/Makefile.am +++ b/kmail/Makefile.am @@ -209,6 +209,7 @@ update_SCRIPTS = upgrade-transport.pl kmail-pgpidentity.pl \ kmail-3.3b1-misc.pl \ kmail-3.4-misc.pl \ kmail-3.4.1-update-status-filters.pl \ + kmail-3.5-filter-icons.pl \ kmail-3.5-trigger-flag-migration.pl confdir = $(kde_confdir) diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index c27432ae4..54a1b4166 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -18,6 +18,7 @@ #include "kmfiltermgr.h" #include "globalsettings.h" +#include <dcopclient.h> #include <klocale.h> #include <kmessagebox.h> #include <kdebug.h> @@ -190,6 +191,34 @@ void AccountManager::processNextCheck( bool _newMail ) return; } + if ( curAccount->type() == "imap" || curAccount->type() == "cachedimap" || curAccount->type() == "pop" ) + { + // Check with the network status daemon whether the network is available + const int NetWorkStatusUnknown = 1; + const int NetWorkStatusOnline = 8; + QCString replyType; + QByteArray params; + QByteArray reply; + + QDataStream stream( params, IO_WriteOnly ); + stream << static_cast<NetworkAccount*>( curAccount )->host(); + + if ( kapp->dcopClient()->call( "kded", "networkstatus", "status(QString)", + params, replyType, reply ) && ( replyType == "int" ) ) + { + int result; + QDataStream stream2( reply, IO_ReadOnly ); + stream2 >> result; + kdDebug() << k_funcinfo << "networkstatus status = " << result << endl; + // if it's not unknown (no networks announced by network control apps), and not offline, give up now + if ( ( result != NetWorkStatusUnknown ) && ( result != NetWorkStatusOnline ) ) + { + emit checkedMail( false, mInteractive, mTotalNewInFolder ); + return; + } + } + } + connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ), this, SLOT( processNextCheck( bool ) ) ); diff --git a/kmail/avscripts/kmail_clamav.sh b/kmail/avscripts/kmail_clamav.sh index b6227b39f..f8492621d 100755 --- a/kmail/avscripts/kmail_clamav.sh +++ b/kmail/avscripts/kmail_clamav.sh @@ -35,7 +35,7 @@ export TEMPFILE cat > $TEMPFILE # check for a running daemon -if [ "`ps -eo comm|grep clamd`" = "clamd" ]; then +if ps -eo comm | grep -q clamd ; then chmod a+r $TEMPFILE CLAMCOMANDO="clamdscan --stdout --no-summary " else diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index 321a374c5..032d1f9fc 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -1222,6 +1222,16 @@ void AccountsPage::ReceivingTab::slotAddAccount() { return; } + if ( accountType == "cachedimap" ) + { + KMessageBox::information(this, " WARNING:\n\n It is possible to lose your e-mail with a Disconnected IMAP account if you do not use it correctly. The purposes of Disconnected IMAP are to minimize bandwidth usage, to allow the user to decide when the client communicates with the server, and to keep a local copy of all e-mails.\n\n When using Disconnected IMAP, all changes (such as writing new e-mails, deleting e-mails, and moving e-mails between folders or accounts) are only made on the client until the user synchronizes the client with the server by using the Check Mail command when there is a network connection available.\n\n These are the commands that affect client-server syncronization:\n F5 synchronizes the current folder.\n Ctrl+L (Check Mail) synchronizes all folders in all accounts.\n Refresh Local IMAP Cache discards all local changes in the current folder.\n\n If you make changes that affect more than one folder or account, you should usually use Ctrl+L to make sure all of your changes are committed to the mail server. ", + NULL, "dimap-warning", 0 + + + ); + + } + KMAccount *account = kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) ); if ( !account ) { diff --git a/kmail/editorwatcher.cpp b/kmail/editorwatcher.cpp index 9e1bb150f..e9fec6608 100644 --- a/kmail/editorwatcher.cpp +++ b/kmail/editorwatcher.cpp @@ -39,27 +39,11 @@ #elif HAVE_INOTIFY #include <sys/ioctl.h> #include <unistd.h> -#include <fcntl.h> +#include <sys/inotify.h> #include <sys/syscall.h> #include <linux/types.h> // Linux kernel headers are documented to not compile #define _S390_BITOPS_H -#include <linux/inotify.h> - -static inline int inotify_init (void) -{ - return syscall (__NR_inotify_init); -} - -static inline int inotify_add_watch (int fd, const char *name, __u32 mask) -{ - return syscall (__NR_inotify_add_watch, fd, name, mask); -} - -static inline int inotify_rm_watch (int fd, __u32 wd) -{ - return syscall (__NR_inotify_rm_watch, fd, wd); -} #endif using namespace KMail; diff --git a/kmail/kmail-3.5-filter-icons.pl b/kmail/kmail-3.5-filter-icons.pl new file mode 100644 index 000000000..cc0ff11c9 --- /dev/null +++ b/kmail/kmail-3.5-filter-icons.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +use strict; + +# This script updates some configuration keys + +# read the whole config file +my $currentGroup = ""; +my %configFile; +while ( <> ) { + chomp; # eat the trailing '\n' + next if ( /^$/ ); # skip empty lines + next if ( /^\#/ ); # skip comments + if ( /^\[/ ) { # group begin + $currentGroup = $_; + next; + } elsif ( $currentGroup =~ /^\[Filter #[0-9]+\]$/ && /^Icon=/ ) { + my ($key,$value) = split /=/; + print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_spam\n" if $value eq "mark_as_spam"; + print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_ham\n" if $value eq "mark_as_ham"; + } +} diff --git a/kmail/kmail.upd b/kmail/kmail.upd index 698cf87bd..150393ba6 100644 --- a/kmail/kmail.upd +++ b/kmail/kmail.upd @@ -158,6 +158,10 @@ Key=list-font,list-unread-font Id=3.4.1 File=kmailrc Script=kmail-3.4.1-update-status-filters.pl,perl +# Update icon names for spam/ham filters +Id=3.5-filter-icons +File=kmailrc +Script=kmail-3.5-filter-icons.pl,perl # Remove the stored size so that we get a reasonable default now that we have 2 columns in the folder selection dialog Id=3.5.4 File=kmailrc diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index d1967a3e4..5daf4ed02 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -116,6 +116,7 @@ void checkConfigUpdates() { "3.4a", "3.4b", "3.4.1", + "3.5-filter-icons", "3.5.4", "3.5.7-imap-flag-migration" }; diff --git a/ktnef/gui/ktnef.desktop b/ktnef/gui/ktnef.desktop index b2d75f8de..58145acbe 100644 --- a/ktnef/gui/ktnef.desktop +++ b/ktnef/gui/ktnef.desktop @@ -106,4 +106,4 @@ Comment[zh_CN]=TNEF 文件的查看/提取器 Comment[zh_TW]=TNEF 檔案檢視器 Terminal=false MimeType=application/ms-tnef; -Categories=Qt;KDE;X-KDE-Utilities-PIM;Office;Network;Email; +Categories=Qt;KDE;X-KDE-Utilities-PIM;Utilities; diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp index acbfa2679..ec14800aa 100644 --- a/libemailfunctions/email.cpp +++ b/libemailfunctions/email.cpp @@ -112,7 +112,14 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address, displayName = ""; addrSpec = ""; comment = ""; - + + // these strings are later copied to displayName resp. addrSpec resp. comment + // we don't operate directly on those variables, since as ByteArray deriverates + // they have a miserable performance on operator+ + QString dName; + QString aSpec; + QString cmmt; + if ( address.isEmpty() ) return KPIM::AddressEmpty; @@ -130,26 +137,26 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address, case TopLevel : { switch ( *p ) { case '"' : inQuotedString = !inQuotedString; - displayName += *p; + dName += *p; break; case '(' : if ( !inQuotedString ) { context = InComment; commentLevel = 1; } else - displayName += *p; + dName += *p; break; case '<' : if ( !inQuotedString ) { context = InAngleAddress; } else - displayName += *p; + dName += *p; break; case '\\' : // quoted character - displayName += *p; + dName += *p; ++p; // skip the '\' if ( *p ) - displayName += *p; + dName += *p; else return KPIM::UnexpectedEnd; break; @@ -161,57 +168,57 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address, return KPIM::UnexpectedComma; } else - displayName += *p; + dName += *p; break; - default : displayName += *p; + default : dName += *p; } break; } case InComment : { switch ( *p ) { case '(' : ++commentLevel; - comment += *p; + cmmt += *p; break; case ')' : --commentLevel; if ( commentLevel == 0 ) { context = TopLevel; - comment += ' '; // separate the text of several comments + cmmt += ' '; // separate the text of several comments } else - comment += *p; + cmmt += *p; break; case '\\' : // quoted character - comment += *p; + cmmt += *p; ++p; // skip the '\' if ( *p ) - comment += *p; + cmmt += *p; else return KPIM::UnexpectedEnd; break; - default : comment += *p; + default : cmmt += *p; } break; } case InAngleAddress : { switch ( *p ) { case '"' : inQuotedString = !inQuotedString; - addrSpec += *p; + aSpec += *p; break; case '>' : if ( !inQuotedString ) { context = TopLevel; } else - addrSpec += *p; + aSpec += *p; break; case '\\' : // quoted character - addrSpec += *p; + aSpec += *p; ++p; // skip the '\' if ( *p ) - addrSpec += *p; + aSpec += *p; else return KPIM::UnexpectedEnd; break; - default : addrSpec += *p; + default : aSpec += *p; } break; } @@ -225,9 +232,10 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address, if ( context == InAngleAddress ) return KPIM::UnclosedAngleAddr; - displayName = displayName.stripWhiteSpace(); - comment = comment.stripWhiteSpace(); - addrSpec = addrSpec.stripWhiteSpace(); + + displayName = dName.stripWhiteSpace().latin1(); + comment = cmmt.stripWhiteSpace().latin1(); + addrSpec = aSpec.stripWhiteSpace().latin1(); if ( addrSpec.isEmpty() ) { if ( displayName.isEmpty() ) diff --git a/libkdepim/Makefile.am b/libkdepim/Makefile.am index 98d910445..925cad8a9 100644 --- a/libkdepim/Makefile.am +++ b/libkdepim/Makefile.am @@ -48,7 +48,7 @@ libkdepim_la_LIBADD = $(top_builddir)/libkcal/libkcal.la \ $(LIB_KIO) $(LIB_KABC) $(LIB_KPARTS) $(LIB_KIMPROXY) $(LIB_POLL) -lqui # $top_builddir)/libkdepim/resources/libkpimresources.la -include_HEADERS = kdepimmacros.h +include_HEADERS = kdepimmacros.h kpimprefs.h AM_CXXFLAGS = -DQT_PLUGIN kde_widget_LTLIBRARIES = kdepimwidgets.la diff --git a/mimelib/Makefile.am b/mimelib/Makefile.am index f977a6815..3f2b5b97f 100644 --- a/mimelib/Makefile.am +++ b/mimelib/Makefile.am @@ -57,7 +57,7 @@ libmimelib_la_SOURCES = \ uuencode.cpp \ binhex.cpp -libmimelib_la_LDFLAGS = -L$(kde_libraries) -lkdefakes -version-info 1:1 -no-undefined +libmimelib_la_LDFLAGS = -L$(kde_libraries) -lkdefakes_pic -version-info 1:1 -no-undefined check_PROGRAMS = test_boyermor diff --git a/mimelib/mimelib/config.h b/mimelib/mimelib/config.h index 529f3ff21..9467d30d1 100644 --- a/mimelib/mimelib/config.h +++ b/mimelib/mimelib/config.h @@ -123,8 +123,7 @@ typedef bool DwBool; # define DW_EXPORT __declspec(dllimport) # endif #else -# include <kdepimmacros.h> -# define DW_EXPORT KDE_EXPORT +# define DW_EXPORT /* empty */ #endif //----------------------------------------------------------------------------- diff --git a/networkstatus/Makefile.am b/networkstatus/Makefile.am index 5b17f8dde..c59aa55c6 100644 --- a/networkstatus/Makefile.am +++ b/networkstatus/Makefile.am @@ -3,7 +3,7 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = kded_networkstatus.la -noinst_LTLIBRARIES = libnetworkstatus.la libconnectionmanager.la +lib_LTLIBRARIES = libnetworkstatus.la libconnectionmanager.la libnetworkstatus_la_LIBADD = $(LIB_KDECORE) libnetworkstatus_la_LDFLAGS = $(all_libraries) @@ -24,8 +24,10 @@ kded_networkstatus_la_LDFLAGS = $(all_libraries) -module -avoid-version servicesdir = $(kde_servicesdir)/kded services_DATA = networkstatus.desktop -noinst_HEADERS = serviceiface.h networkstatuscommon.h serviceifaceimpl.h \ - network.h clientifaceimpl.h provideriface.h testservice.h connectionmanager.h +noinst_HEADERS = serviceifaceimpl.h \ + network.h clientifaceimpl.h testservice.h connectionmanager.h + +include_HEADERS = serviceiface.h provideriface.h networkstatuscommon.h bin_PROGRAMS = networkstatustestservice diff --git a/wizards/groupwarewizard.desktop b/wizards/groupwarewizard.desktop index b5b38b874..ae84eb980 100644 --- a/wizards/groupwarewizard.desktop +++ b/wizards/groupwarewizard.desktop @@ -50,4 +50,4 @@ Type=Application Icon=kontact Terminal=false X-KDE-StartupNotify=true -Categories=Qt;KDE;X-KDE-Utilities-PIM;Office;Network;Email; +Categories=Qt;KDE;X-KDE-Utilities-PIM;Utilities; |