* 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
v3.5.13-sru
tpearson 15 years ago
parent 460c52653a
commit d4b702756e

@ -30,13 +30,13 @@ template <typename T>
void memvector<T>::resize( size_type n_s ) { void memvector<T>::resize( size_type n_s ) {
if ( size() >= n_s ) return; 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(); iterator p_end = end();
byte_io::write<unsigned>( data_->rw_base( 0 ), n_s ); write<unsigned>( data_->rw_base( 0 ), n_s );
while ( operator !=<unsigned, unsigned>(p_end, end()) ) { while ( p_end != end() ) {
*p_end = value_type(); *p_end = value_type();
++p_end; ++p_end;
} }
} }

@ -73,3 +73,4 @@ Terminal=false
X-DCOP-ServiceType=Unique X-DCOP-ServiceType=Unique
X-KDE-StartupNotify=true X-KDE-StartupNotify=true
Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM;Office;Calendar; Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM;Office;Calendar;
OnlyShowIn=KDE;

@ -209,6 +209,7 @@ update_SCRIPTS = upgrade-transport.pl kmail-pgpidentity.pl \
kmail-3.3b1-misc.pl \ kmail-3.3b1-misc.pl \
kmail-3.4-misc.pl \ kmail-3.4-misc.pl \
kmail-3.4.1-update-status-filters.pl \ kmail-3.4.1-update-status-filters.pl \
kmail-3.5-filter-icons.pl \
kmail-3.5-trigger-flag-migration.pl kmail-3.5-trigger-flag-migration.pl
confdir = $(kde_confdir) confdir = $(kde_confdir)

@ -18,6 +18,7 @@
#include "kmfiltermgr.h" #include "kmfiltermgr.h"
#include "globalsettings.h" #include "globalsettings.h"
#include <dcopclient.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kdebug.h> #include <kdebug.h>
@ -190,6 +191,34 @@ void AccountManager::processNextCheck( bool _newMail )
return; 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 ) ), connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ),
this, SLOT( processNextCheck( bool ) ) ); this, SLOT( processNextCheck( bool ) ) );

@ -35,7 +35,7 @@ export TEMPFILE
cat > $TEMPFILE cat > $TEMPFILE
# check for a running daemon # 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 chmod a+r $TEMPFILE
CLAMCOMANDO="clamdscan --stdout --no-summary " CLAMCOMANDO="clamdscan --stdout --no-summary "
else else

@ -1222,6 +1222,16 @@ void AccountsPage::ReceivingTab::slotAddAccount() {
return; 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 KMAccount *account
= kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) ); = kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) );
if ( !account ) { if ( !account ) {

@ -39,27 +39,11 @@
#elif HAVE_INOTIFY #elif HAVE_INOTIFY
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <sys/inotify.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <linux/types.h> #include <linux/types.h>
// Linux kernel headers are documented to not compile // Linux kernel headers are documented to not compile
#define _S390_BITOPS_H #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 #endif
using namespace KMail; using namespace KMail;

@ -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";
}
}

@ -158,6 +158,10 @@ Key=list-font,list-unread-font
Id=3.4.1 Id=3.4.1
File=kmailrc File=kmailrc
Script=kmail-3.4.1-update-status-filters.pl,perl 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 # 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 Id=3.5.4
File=kmailrc File=kmailrc

@ -116,6 +116,7 @@ void checkConfigUpdates() {
"3.4a", "3.4a",
"3.4b", "3.4b",
"3.4.1", "3.4.1",
"3.5-filter-icons",
"3.5.4", "3.5.4",
"3.5.7-imap-flag-migration" "3.5.7-imap-flag-migration"
}; };

@ -106,4 +106,4 @@ Comment[zh_CN]=TNEF 文件的查看/提取器
Comment[zh_TW]=TNEF 檔案檢視器 Comment[zh_TW]=TNEF 檔案檢視器
Terminal=false Terminal=false
MimeType=application/ms-tnef; MimeType=application/ms-tnef;
Categories=Qt;KDE;X-KDE-Utilities-PIM;Office;Network;Email; Categories=Qt;KDE;X-KDE-Utilities-PIM;Utilities;

@ -113,6 +113,13 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
addrSpec = ""; addrSpec = "";
comment = ""; 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() ) if ( address.isEmpty() )
return KPIM::AddressEmpty; return KPIM::AddressEmpty;
@ -130,26 +137,26 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
case TopLevel : { case TopLevel : {
switch ( *p ) { switch ( *p ) {
case '"' : inQuotedString = !inQuotedString; case '"' : inQuotedString = !inQuotedString;
displayName += *p; dName += *p;
break; break;
case '(' : if ( !inQuotedString ) { case '(' : if ( !inQuotedString ) {
context = InComment; context = InComment;
commentLevel = 1; commentLevel = 1;
} }
else else
displayName += *p; dName += *p;
break; break;
case '<' : if ( !inQuotedString ) { case '<' : if ( !inQuotedString ) {
context = InAngleAddress; context = InAngleAddress;
} }
else else
displayName += *p; dName += *p;
break; break;
case '\\' : // quoted character case '\\' : // quoted character
displayName += *p; dName += *p;
++p; // skip the '\' ++p; // skip the '\'
if ( *p ) if ( *p )
displayName += *p; dName += *p;
else else
return KPIM::UnexpectedEnd; return KPIM::UnexpectedEnd;
break; break;
@ -161,57 +168,57 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
return KPIM::UnexpectedComma; return KPIM::UnexpectedComma;
} }
else else
displayName += *p; dName += *p;
break; break;
default : displayName += *p; default : dName += *p;
} }
break; break;
} }
case InComment : { case InComment : {
switch ( *p ) { switch ( *p ) {
case '(' : ++commentLevel; case '(' : ++commentLevel;
comment += *p; cmmt += *p;
break; break;
case ')' : --commentLevel; case ')' : --commentLevel;
if ( commentLevel == 0 ) { if ( commentLevel == 0 ) {
context = TopLevel; context = TopLevel;
comment += ' '; // separate the text of several comments cmmt += ' '; // separate the text of several comments
} }
else else
comment += *p; cmmt += *p;
break; break;
case '\\' : // quoted character case '\\' : // quoted character
comment += *p; cmmt += *p;
++p; // skip the '\' ++p; // skip the '\'
if ( *p ) if ( *p )
comment += *p; cmmt += *p;
else else
return KPIM::UnexpectedEnd; return KPIM::UnexpectedEnd;
break; break;
default : comment += *p; default : cmmt += *p;
} }
break; break;
} }
case InAngleAddress : { case InAngleAddress : {
switch ( *p ) { switch ( *p ) {
case '"' : inQuotedString = !inQuotedString; case '"' : inQuotedString = !inQuotedString;
addrSpec += *p; aSpec += *p;
break; break;
case '>' : if ( !inQuotedString ) { case '>' : if ( !inQuotedString ) {
context = TopLevel; context = TopLevel;
} }
else else
addrSpec += *p; aSpec += *p;
break; break;
case '\\' : // quoted character case '\\' : // quoted character
addrSpec += *p; aSpec += *p;
++p; // skip the '\' ++p; // skip the '\'
if ( *p ) if ( *p )
addrSpec += *p; aSpec += *p;
else else
return KPIM::UnexpectedEnd; return KPIM::UnexpectedEnd;
break; break;
default : addrSpec += *p; default : aSpec += *p;
} }
break; break;
} }
@ -225,9 +232,10 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
if ( context == InAngleAddress ) if ( context == InAngleAddress )
return KPIM::UnclosedAngleAddr; return KPIM::UnclosedAngleAddr;
displayName = displayName.stripWhiteSpace();
comment = comment.stripWhiteSpace(); displayName = dName.stripWhiteSpace().latin1();
addrSpec = addrSpec.stripWhiteSpace(); comment = cmmt.stripWhiteSpace().latin1();
addrSpec = aSpec.stripWhiteSpace().latin1();
if ( addrSpec.isEmpty() ) { if ( addrSpec.isEmpty() ) {
if ( displayName.isEmpty() ) if ( displayName.isEmpty() )

@ -48,7 +48,7 @@ libkdepim_la_LIBADD = $(top_builddir)/libkcal/libkcal.la \
$(LIB_KIO) $(LIB_KABC) $(LIB_KPARTS) $(LIB_KIMPROXY) $(LIB_POLL) -lqui $(LIB_KIO) $(LIB_KABC) $(LIB_KPARTS) $(LIB_KIMPROXY) $(LIB_POLL) -lqui
# $top_builddir)/libkdepim/resources/libkpimresources.la # $top_builddir)/libkdepim/resources/libkpimresources.la
include_HEADERS = kdepimmacros.h include_HEADERS = kdepimmacros.h kpimprefs.h
AM_CXXFLAGS = -DQT_PLUGIN AM_CXXFLAGS = -DQT_PLUGIN
kde_widget_LTLIBRARIES = kdepimwidgets.la kde_widget_LTLIBRARIES = kdepimwidgets.la

@ -57,7 +57,7 @@ libmimelib_la_SOURCES = \
uuencode.cpp \ uuencode.cpp \
binhex.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 check_PROGRAMS = test_boyermor

@ -123,8 +123,7 @@ typedef bool DwBool;
# define DW_EXPORT __declspec(dllimport) # define DW_EXPORT __declspec(dllimport)
# endif # endif
#else #else
# include <kdepimmacros.h> # define DW_EXPORT /* empty */
# define DW_EXPORT KDE_EXPORT
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

@ -3,7 +3,7 @@
METASOURCES = AUTO METASOURCES = AUTO
kde_module_LTLIBRARIES = kded_networkstatus.la 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_LIBADD = $(LIB_KDECORE)
libnetworkstatus_la_LDFLAGS = $(all_libraries) libnetworkstatus_la_LDFLAGS = $(all_libraries)
@ -24,8 +24,10 @@ kded_networkstatus_la_LDFLAGS = $(all_libraries) -module -avoid-version
servicesdir = $(kde_servicesdir)/kded servicesdir = $(kde_servicesdir)/kded
services_DATA = networkstatus.desktop services_DATA = networkstatus.desktop
noinst_HEADERS = serviceiface.h networkstatuscommon.h serviceifaceimpl.h \ noinst_HEADERS = serviceifaceimpl.h \
network.h clientifaceimpl.h provideriface.h testservice.h connectionmanager.h network.h clientifaceimpl.h testservice.h connectionmanager.h
include_HEADERS = serviceiface.h provideriface.h networkstatuscommon.h
bin_PROGRAMS = networkstatustestservice bin_PROGRAMS = networkstatustestservice

@ -50,4 +50,4 @@ Type=Application
Icon=kontact Icon=kontact
Terminal=false Terminal=false
X-KDE-StartupNotify=true X-KDE-StartupNotify=true
Categories=Qt;KDE;X-KDE-Utilities-PIM;Office;Network;Email; Categories=Qt;KDE;X-KDE-Utilities-PIM;Utilities;

Loading…
Cancel
Save