[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] ebn fixes: pass-by-value function args
From: Bernhard Breinbauer <infopipe () gmx ! net>
Date: 2007-06-11 18:34:09
Message-ID: 200706112034.15120.infopipe () gmx ! net
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Sunday 10 June 2007 wrote Ingo Klöcker:
> On Tuesday 05 June 2007 20:42, Bernhard Breinbauer wrote:
> > Attached is a patch that (hopefully) fixes the pass-by-value issues
> > found by krazy.
> > Please review and commit, if it's ok.
>
> Thanks a bunch for this huge patch. In principal the patch looks good,
> but there are a few caveats:
> a) The signature changes must not break method-overloading, i.e. the
> signature changes must be applied to all occurrences of the methods in
> the whole class hierarchy. Otherwise those changes will break
> polymorphism.
>
> b) If the signature of a slot is changed the signature of the signal
> this slot is connected to must also be changed.
OK. Second try on my first patch :-)
I went through all my changes and checked the points mentioned above. Hope I
got it right, please review. Especially the signal/slots part, as I'm still
relatively new to the Qt stuff.
best regards,
bernhard
["pass-by-value2.patch" (text/x-diff)]
Index: kmail/kmfoldersearch.h
===================================================================
--- kmail/kmfoldersearch.h (Revision 673905)
+++ kmail/kmfoldersearch.h (Arbeitskopie)
@@ -58,8 +58,8 @@
KMSearch(QObject * parent = 0, const char * name = 0);
~KMSearch();
- bool write(QString location) const;
- bool read(QString location);
+ bool write(const QString &location) const;
+ bool read(const QString &location);
bool recursive() const { return mRecursive; }
void setRecursive(bool recursive) { if (running()) stop(); mRecursive = recursive; }
KMFolder* root() const { return mRoot; }
@@ -188,7 +188,7 @@
protected:
virtual FolderJob* doCreateJob(KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, const QString &partSpecifier,
const AttachmentStrategy *as ) const;
virtual FolderJob* doCreateJob(QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt, KMFolder *folder) const;
Index: kmail/kmfilterdlg.cpp
===================================================================
--- kmail/kmfilterdlg.cpp (Revision 673905)
+++ kmail/kmfilterdlg.cpp (Arbeitskopie)
@@ -319,8 +319,8 @@
connect( mConfigureToolbar, SIGNAL(toggled(bool)),
this, SLOT(slotConfigureToolbarButtonToggled(bool)) );
- connect( mFilterActionIconButton, SIGNAL( iconChanged( QString ) ),
- this, SLOT( slotFilterActionIconChanged( QString ) ) );
+ connect( mFilterActionIconButton, SIGNAL( iconChanged( const QString& ) ),
+ this, SLOT( slotFilterActionIconChanged( const QString& ) ) );
}
// reset all widgets here
@@ -547,7 +547,7 @@
mFilter->setConfigureToolbar( aChecked );
}
-void KMFilterDlg::slotFilterActionIconChanged( QString icon )
+void KMFilterDlg::slotFilterActionIconChanged( const QString &icon )
{
if ( mFilter )
mFilter->setIcon( icon );
Index: kmail/folderstorage.h
===================================================================
--- kmail/folderstorage.h (Revision 673905)
+++ kmail/folderstorage.h (Arbeitskopie)
@@ -161,7 +161,7 @@
* for each derived KMFolder).
*/
virtual FolderJob* createJob( KMMessage *msg, FolderJob::JobType jt = \
FolderJob::tGetMessage,
- KMFolder *folder = 0, QString partSpecifier = QString(),
+ KMFolder *folder = 0, const QString &partSpecifier = \
QString(), const AttachmentStrategy *as = 0 ) const;
virtual FolderJob* createJob( QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt = FolderJob::tGetMessage,
@@ -447,7 +447,7 @@
void msgRemoved(KMFolder*, quint32 sernum);
/** Emitted after a message is removed from the folder. */
- void msgRemoved( int idx, QString msgIdMD5 );
+ void msgRemoved( int idx, const QString &msgIdMD5 );
void msgRemoved( KMFolder* );
/** Emitted when a message is added from the folder. */
@@ -513,7 +513,7 @@
* @see createJob
*/
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const \
= 0; + const QString &partSpecifier, const AttachmentStrategy \
*as ) const = 0; virtual FolderJob* doCreateJob( QList<KMMessage*>& msgList, const QString& \
sets,
FolderJob::JobType jt, KMFolder *folder ) const = 0;
Index: kmail/kmheaders.h
===================================================================
--- kmail/kmheaders.h (Revision 673905)
+++ kmail/kmheaders.h (Arbeitskopie)
@@ -229,7 +229,7 @@
/** For when the message with the given message id has been added to a folder */
void msgAdded(int);
/** For when the message with the given id has been removed for a folder */
- void msgRemoved( int, QString );
+ void msgRemoved( int, const QString& );
/** Make the next header visible scrolling if necessary */
void nextMessage();
/** Same as nextMessage() but don't clear the current selection */
Index: kmail/folderjob.h
===================================================================
--- kmail/folderjob.h (Revision 673905)
+++ kmail/folderjob.h (Arbeitskopie)
@@ -54,7 +54,7 @@
* @p jt and with a parent folder @p folder.
*/
FolderJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0,
- QString partSpecifier = QString() );
+ const QString &partSpecifier = QString() );
/**
* Constructs a new job, operating on a message list @p msgList,
@@ -116,7 +116,7 @@
/**
* Emitted whenever a KMMessage was updated
*/
- void messageUpdated( KMMessage *, QString );
+ void messageUpdated( KMMessage *, const QString& );
/**
* Emitted whenever a message has been stored in
Index: kmail/accountdialog.cpp
===================================================================
--- kmail/accountdialog.cpp (Revision 673905)
+++ kmail/accountdialog.cpp (Arbeitskopie)
@@ -90,7 +90,7 @@
class ProcmailRCParser
{
public:
- ProcmailRCParser(QString fileName = QString());
+ ProcmailRCParser(const QString &fileName = QString());
~ProcmailRCParser();
QStringList getLockFilesList() const { return mLockFiles; }
@@ -109,16 +109,15 @@
QHash<QByteArray, QString> mVars;
};
-ProcmailRCParser::ProcmailRCParser(QString fname)
- : mProcmailrc(fname),
+ProcmailRCParser::ProcmailRCParser(const QString &filename)
+ : mProcmailrc(filename),
mStream(new QTextStream(&mProcmailrc))
{
// predefined
mVars.insert( "HOME", QDir::homePath() );
- if( fname.isEmpty() ) {
- fname = QDir::homePath() + "/.procmailrc";
- mProcmailrc.setFileName(fname);
+ if( filename.isEmpty() ) {
+ mProcmailrc.setFileName(QDir::homePath() + "/.procmailrc");
}
QRegExp lockFileGlobal("^LOCKFILE=", Qt::CaseSensitive);
Index: kmail/templateparser.cpp
===================================================================
--- kmail/templateparser.cpp (Revision 673905)
+++ kmail/templateparser.cpp (Arbeitskopie)
@@ -50,7 +50,7 @@
static const int PipeTimeout = 15;
TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode,
- const QString aselection,
+ const QString &aselection,
bool asmartQuote, bool anoQuote,
bool aallowDecryption, bool aselectionIsBody ) :
mMode( amode ), mFolder( 0 ), mIdentity( 0 ), mSelection( aselection ),
Index: kmail/customtemplates.h
===================================================================
--- kmail/customtemplates.h (Revision 673905)
+++ kmail/customtemplates.h (Arbeitskopie)
@@ -54,7 +54,7 @@
public slots:
- void slotInsertCommand( QString cmd, int adjustCursor = 0 );
+ void slotInsertCommand( const QString &cmd, int adjustCursor = 0 );
void slotTextChanged();
Index: kmail/kmailicalifaceimpl.cpp
===================================================================
--- kmail/kmailicalifaceimpl.cpp (Revision 673905)
+++ kmail/kmailicalifaceimpl.cpp (Arbeitskopie)
@@ -355,7 +355,7 @@
}
}
-static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody )
+static void setXMLContentTypeHeader( KMMessage *msg, const QString &plainTextBody )
{
// add a first body part to be displayed by all mailer
// than can NOT display Kolab data: no matter if these
Index: kmail/kmheaders.cpp
===================================================================
--- kmail/kmheaders.cpp (Revision 673905)
+++ kmail/kmheaders.cpp (Arbeitskopie)
@@ -688,8 +688,8 @@
this, SLOT(msgHeaderChanged(KMFolder*,int)));
disconnect(mFolder, SIGNAL(msgAdded(int)),
this, SLOT(msgAdded(int)));
- disconnect(mFolder, SIGNAL( msgRemoved( int, QString ) ),
- this, SLOT( msgRemoved( int, QString ) ) );
+ disconnect(mFolder, SIGNAL( msgRemoved( int, const QString& ) ),
+ this, SLOT( msgRemoved( int, const QString& ) ) );
disconnect(mFolder, SIGNAL(changed()),
this, SLOT(msgChanged()));
disconnect(mFolder, SIGNAL(cleared()),
@@ -724,8 +724,8 @@
this, SLOT(msgHeaderChanged(KMFolder*,int)));
connect(mFolder, SIGNAL(msgAdded(int)),
this, SLOT(msgAdded(int)));
- connect(mFolder, SIGNAL(msgRemoved(int,QString)),
- this, SLOT(msgRemoved(int,QString)));
+ connect(mFolder, SIGNAL(msgRemoved(int,const QString&)),
+ this, SLOT(msgRemoved(int,const QString&)));
connect(mFolder, SIGNAL(changed()),
this, SLOT(msgChanged()));
connect(mFolder, SIGNAL(cleared()),
@@ -1051,7 +1051,7 @@
//-----------------------------------------------------------------------------
-void KMHeaders::msgRemoved(int id, QString msgId )
+void KMHeaders::msgRemoved(int id, const QString &msgId )
{
if (!updatesEnabled()) return;
Index: kmail/subscriptiondialog.h
===================================================================
--- kmail/subscriptiondialog.h (Revision 673905)
+++ kmail/subscriptiondialog.h (Arbeitskopie)
@@ -50,7 +50,7 @@
SubscriptionDialogBase( QWidget *parent,
const QString &caption,
KAccount* acct,
- QString startPath = QString() );
+ const QString &startPath = QString() );
virtual ~SubscriptionDialogBase() {}
void show();
Index: kmail/localsubscriptiondialog.h
===================================================================
--- kmail/localsubscriptiondialog.h (Revision 673905)
+++ kmail/localsubscriptiondialog.h (Arbeitskopie)
@@ -44,7 +44,7 @@
public:
LocalSubscriptionDialog( QWidget *parent, const QString &caption,
ImapAccountBase* acct,
- QString startPath = QString() );
+ const QString &startPath = QString() );
virtual ~LocalSubscriptionDialog();
protected:
Index: kmail/antispamwizard.h
===================================================================
--- kmail/antispamwizard.h (Revision 673905)
+++ kmail/antispamwizard.h (Arbeitskopie)
@@ -137,11 +137,13 @@
{
public:
SpamToolConfig() {}
- SpamToolConfig( QString toolId, int configVersion, int prio,
- QString name, QString exec, QString url, QString filter,
- QString detection, QString spam, QString ham,
- QString noSpam, QString header, QString pattern,
- QString pattern2, QString serverPattern,
+ SpamToolConfig( const QString &toolId, int configVersion, int prio,
+ const QString &name, const QString &exec,
+ const QString &url, const QString &filter,
+ const QString &detection, const QString &spam,
+ const QString &ham,const QString &noSpam,
+ const QString &header, const QString &pattern,
+ const QString &pattern2, const QString &serverPattern,
bool detectionOnly, bool regExp, bool bayesFilter,
bool tristateDetection, WizardMode type );
Index: kmail/kmmessage.h
===================================================================
--- kmail/kmmessage.h (Revision 673905)
+++ kmail/kmmessage.h (Arbeitskopie)
@@ -155,7 +155,7 @@
required header fields with the proper values. The returned message
is not stored in any folder. Marks this message as replied. */
KMMessage* createReply( KMail::ReplyStrategy replyStrategy = KMail::ReplySmart,
- QString selection=QString(), bool noQuote=false,
+ const QString &selection=QString(), bool noQuote=false,
bool allowDecryption=true, bool selectionIsBody=false,
const QString &tmpl = QString() );
Index: kmail/partNode.h
===================================================================
--- kmail/partNode.h (Revision 673905)
+++ kmail/partNode.h (Arbeitskopie)
@@ -165,9 +165,9 @@
void fillMimePartTree( KMMimePartTreeItem* parentItem,
KMMimePartTree* mimePartTree,
- QString labelDescr = QString(),
- QString labelCntType = QString(),
- QString labelEncoding = QString(),
+ const QString &labelDescr = QString(),
+ const QString &labelCntType = QString(),
+ const QString &labelEncoding = QString(),
KIO::filesize_t size=0,
bool revertOrder = false );
Index: kmail/templatesconfiguration.cpp
===================================================================
--- kmail/templatesconfiguration.cpp (Revision 673905)
+++ kmail/templatesconfiguration.cpp (Arbeitskopie)
@@ -62,7 +62,7 @@
connect( lineEdit_quote, SIGNAL( textChanged( const QString & ) ),
this, SLOT( slotTextChanged( void ) ) );
- connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ),
+ connect( mInsertCommand, SIGNAL( insertCommand(const QString&, int) ),
this, SLOT( slotInsertCommand(const QString &, int) ) );
QString help;
@@ -229,7 +229,7 @@
t.writeConfig();
}
-void TemplatesConfiguration::loadFromFolder( QString id, uint identity )
+void TemplatesConfiguration::loadFromFolder( const QString &id, uint identity )
{
Templates t( id );
Templates* tid = 0;
@@ -303,7 +303,7 @@
delete(tid);
}
-void TemplatesConfiguration::saveToFolder( QString id )
+void TemplatesConfiguration::saveToFolder( const QString &id )
{
Templates t( id );
@@ -555,7 +555,7 @@
return "> ";
}
-QString TemplatesConfiguration::strOrBlank( QString str ) {
+QString TemplatesConfiguration::strOrBlank( const QString &str ) {
if ( str.trimmed().isEmpty() ) {
return QString( "%BLANK" );
}
Index: kmail/kmfoldermaildir.cpp
===================================================================
--- kmail/kmfoldermaildir.cpp (Revision 673905)
+++ kmail/kmfoldermaildir.cpp (Arbeitskopie)
@@ -346,7 +346,7 @@
//-------------------------------------------------------------
FolderJob*
KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString, const AttachmentStrategy* ) const
+ KMFolder *folder, const QString&, const AttachmentStrategy* ) \
const {
MaildirJob *job = new MaildirJob( msg, jt, folder );
job->setParentFolder( this );
Index: kmail/kmaccount.h
===================================================================
--- kmail/kmaccount.h (Revision 673905)
+++ kmail/kmaccount.h (Arbeitskopie)
@@ -286,7 +286,7 @@
* @param folderId the id of the folder
* @param num the number of new message in this folder
*/
- void addToNewInFolder( QString folderId, int num );
+ void addToNewInFolder( const QString &folderId, int num );
protected:
QString mPrecommand;
Index: kmail/subscriptiondialog.cpp
===================================================================
--- kmail/subscriptiondialog.cpp (Revision 673905)
+++ kmail/subscriptiondialog.cpp (Arbeitskopie)
@@ -45,7 +45,7 @@
namespace KMail {
SubscriptionDialogBase::SubscriptionDialogBase( QWidget *parent, const QString &caption,
- KAccount *acct, QString startPath )
+ KAccount *acct, const QString &startPath )
: KSubscription( parent, caption, acct, User1, QString(), false ),
mStartPath( startPath ), mSubscribed( false ), mForceSubscriptionEnable( false)
{
Index: kmail/headeritem.cpp
===================================================================
--- kmail/headeritem.cpp (Revision 673905)
+++ kmail/headeritem.cpp (Arbeitskopie)
@@ -555,7 +555,7 @@
return mKey;
}
-void HeaderItem::setTempKey( QString key ) {
+void HeaderItem::setTempKey( const QString &key ) {
mKey = key;
}
Index: kmail/partNode.cpp
===================================================================
--- kmail/partNode.cpp (Revision 673905)
+++ kmail/partNode.cpp (Arbeitskopie)
@@ -441,9 +441,9 @@
void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem,
KMMimePartTree* mimePartTree,
- QString labelDescr,
- QString labelCntType,
- QString labelEncoding,
+ const QString &labelDescr,
+ const QString &labelCntType,
+ const QString &labelEncoding,
KIO::filesize_t size,
bool revertOrder )
{
Index: kmail/kmmessage.cpp
===================================================================
--- kmail/kmmessage.cpp (Revision 673905)
+++ kmail/kmmessage.cpp (Arbeitskopie)
@@ -823,7 +823,7 @@
//-----------------------------------------------------------------------------
KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
- QString selection /*.clear() */,
+ const QString &selection /*.clear() */,
bool noQuote /* = false */,
bool allowDecryption /* = true */,
bool selectionIsBody /* = false */,
Index: kmail/filterlog.cpp
===================================================================
--- kmail/filterlog.cpp (Revision 673905)
+++ kmail/filterlog.cpp (Arbeitskopie)
@@ -143,7 +143,7 @@
}
-bool FilterLog::saveToFile( QString fileName )
+bool FilterLog::saveToFile( const QString &fileName )
{
QFile file( fileName );
if( file.open( QIODevice::WriteOnly ) ) {
Index: kmail/composer.h
===================================================================
--- kmail/composer.h (Revision 673905)
+++ kmail/composer.h (Arbeitskopie)
@@ -137,7 +137,7 @@
virtual void autoSaveMessage() = 0;
public: // kmkernel, attachmentlistview
- virtual bool addAttach( const KUrl url ) = 0;
+ virtual bool addAttach( const KUrl &url ) = 0;
public: // kmcommand
/**
Index: kmail/templateparser.h
===================================================================
--- kmail/templateparser.h (Revision 673905)
+++ kmail/templateparser.h (Arbeitskopie)
@@ -44,7 +44,7 @@
};
public:
- TemplateParser( KMMessage *amsg, const Mode amode, const QString aselection,
+ TemplateParser( KMMessage *amsg, const Mode amode, const QString &aselection,
bool aSmartQuote, bool anoQuote, bool aallowDecryption,
bool aselectionIsBody );
Index: kmail/kmaccount.cpp
===================================================================
--- kmail/kmaccount.cpp (Revision 673905)
+++ kmail/kmaccount.cpp (Arbeitskopie)
@@ -453,7 +453,7 @@
}
//-----------------------------------------------------------------------------
-void KMAccount::addToNewInFolder( QString folderId, int num )
+void KMAccount::addToNewInFolder( const QString &folderId, int num )
{
if ( mNewInFolder.find( folderId ) == mNewInFolder.end() )
mNewInFolder[folderId] = num;
Index: kmail/kmcommands.cpp
===================================================================
--- kmail/kmcommands.cpp (Revision 673905)
+++ kmail/kmcommands.cpp (Arbeitskopie)
@@ -2646,8 +2646,8 @@
curFolder->createJob( it.value(), FolderJob::tGetMessage,
0, it.key()->msgPart().partSpecifier() );
job->setCancellable( false );
- connect( job, SIGNAL(messageUpdated(KMMessage*, QString)),
- this, SLOT(slotPartRetrieved(KMMessage*, QString)) );
+ connect( job, SIGNAL(messageUpdated(KMMessage*, const QString&)),
+ this, SLOT(slotPartRetrieved(KMMessage*, const QString&)) );
job->start();
} else
kWarning(5006) << "KMLoadPartsCommand - msg has no parent" << endl;
@@ -2658,7 +2658,7 @@
}
void KMLoadPartsCommand::slotPartRetrieved( KMMessage *msg,
- QString partSpecifier )
+ const QString &partSpecifier )
{
DwBodyPart *part =
msg->findDwBodyPart( msg->getFirstDwBodyPart(), partSpecifier );
Index: kmail/antispamwizard.cpp
===================================================================
--- kmail/antispamwizard.cpp (Revision 673905)
+++ kmail/antispamwizard.cpp (Arbeitskopie)
@@ -662,12 +662,13 @@
//---------------------------------------------------------------------------
-AntiSpamWizard::SpamToolConfig::SpamToolConfig( QString toolId,
- int configVersion, int prio, QString name, QString exec,
- QString url, QString filter, QString detection, QString spam, QString ham,
- QString noSpam, QString header, QString pattern, QString pattern2,
- QString serverPattern, bool detectionOnly, bool regExp, bool bayesFilter,
- bool tristateDetection, WizardMode type )
+AntiSpamWizard::SpamToolConfig::SpamToolConfig( const QString &toolId,
+ int configVersion, int prio, const QString &name, const QString &exec,
+ const QString &url, const QString &filter, const QString &detection,
+ const QString &spam, const QString &ham, const QString &noSpam,
+ const QString &header, const QString &pattern, const QString &pattern2,
+ const QString &serverPattern, bool detectionOnly, bool regExp,
+ bool bayesFilter, bool tristateDetection, WizardMode type )
: mId( toolId ), mVersion( configVersion ), mPrio( prio ),
mVisibleName( name ), mExecutable( exec ), mWhatsThisText( url ),
mFilterName( filter ), mDetectCmd( detection ), mSpamCmd( spam ),
Index: kmail/folderjob.cpp
===================================================================
--- kmail/folderjob.cpp (Revision 673905)
+++ kmail/folderjob.cpp (Arbeitskopie)
@@ -44,7 +44,7 @@
//----------------------------------------------------------------------------
FolderJob::FolderJob( KMMessage *msg, JobType jt, KMFolder* folder,
- QString partSpecifier )
+ const QString &partSpecifier )
: mType( jt ), mSrcFolder( 0 ), mDestFolder( folder ), mPartSpecifier( partSpecifier ),
mErrorCode( 0 ),
mPassiveDestructor( false ), mStarted( false )
Index: kmail/kmkernel.cpp
===================================================================
--- kmail/kmkernel.cpp (Revision 673905)
+++ kmail/kmkernel.cpp (Arbeitskopie)
@@ -1039,7 +1039,7 @@
}
-bool KMKernel::showMail( quint32 serialNumber, QString /* messageId */ )
+bool KMKernel::showMail( quint32 serialNumber, const QString& /* messageId */ )
{
KMMainWidget *mainWidget = 0;
QObjectList l;
@@ -2091,7 +2091,7 @@
return *mICalIface;
}
-void KMKernel::selectFolder( QString folderPath )
+void KMKernel::selectFolder( const QString &folderPath )
{
kDebug(5006)<<"Selecting a folder "<<folderPath<<endl;
const QString localPrefix = "/Local";
Index: kmail/renamejob.h
===================================================================
--- kmail/renamejob.h (Revision 673905)
+++ kmail/renamejob.h (Arbeitskopie)
@@ -74,7 +74,7 @@
signals:
/** Emitted when the job is done, check the success bool */
- void renameDone( QString newName, bool success );
+ void renameDone( const QString& newName, bool success );
protected:
FolderStorage* mStorage;
Index: kmail/kmmsgbase.cpp
===================================================================
--- kmail/kmmsgbase.cpp (Revision 673905)
+++ kmail/kmmsgbase.cpp (Arbeitskopie)
@@ -382,7 +382,7 @@
//-----------------------------------------------------------------------------
QString KMMsgBase::decodeRFC2047String( const QByteArray& aStr,
- QByteArray prefCharset )
+ const QByteArray& prefCharset )
{
if ( aStr.isEmpty() ) {
return QString();
Index: kmail/kmmainwidget.cpp
===================================================================
--- kmail/kmmainwidget.cpp (Revision 673905)
+++ kmail/kmmainwidget.cpp (Arbeitskopie)
@@ -714,7 +714,7 @@
mAccel->connectItem( mAccel->insertItem( Qt::ALT+Qt::Key_Space ),
mHeaders, SLOT( selectCurrentMessage() ) );
- connect( kmkernel->outboxFolder(), SIGNAL( msgRemoved(int, QString) ),
+ connect( kmkernel->outboxFolder(), SIGNAL( msgRemoved(int, const QString&) ),
SLOT( startUpdateMessageActionsTimer() ) );
connect( kmkernel->outboxFolder(), SIGNAL( msgAdded(int) ),
SLOT( startUpdateMessageActionsTimer() ) );
Index: kmail/imapjob.cpp
===================================================================
--- kmail/imapjob.cpp (Revision 673905)
+++ kmail/imapjob.cpp (Arbeitskopie)
@@ -57,21 +57,21 @@
//-----------------------------------------------------------------------------
ImapJob::ImapJob( KMMessage *msg, JobType jt, KMFolderImap* folder,
- QString partSpecifier, const AttachmentStrategy *as )
+ const QString &partSpecifier, const AttachmentStrategy *as )
: FolderJob( msg, jt, folder? folder->folder() : 0, partSpecifier ),
mAttachmentStrategy( as ), mParentProgressItem(0)
{
}
//-----------------------------------------------------------------------------
-ImapJob::ImapJob( QList<KMMessage*>& msgList, QString sets, JobType jt,
+ImapJob::ImapJob( QList<KMMessage*>& msgList, const QString &sets, JobType jt,
KMFolderImap* folder )
: FolderJob( msgList, sets, jt, folder? folder->folder() : 0 ),
mAttachmentStrategy ( 0 ), mParentProgressItem(0)
{
}
-void ImapJob::init( JobType jt, QString sets, KMFolderImap *folder,
+void ImapJob::init( JobType jt, const QString &sets, KMFolderImap *folder,
QList<KMMessage*> &msgList )
{
mJob = 0;
Index: kmail/kmfolderdialog.h
===================================================================
--- kmail/kmfolderdialog.h (Revision 673905)
+++ kmail/kmfolderdialog.h (Arbeitskopie)
@@ -118,7 +118,7 @@
virtual bool save();
private slots:
- void slotChangeIcon( QString icon );
+ void slotChangeIcon( const QString &icon );
/*
* is called if the folder dropdown changes
* then we update the other items to reflect the capabilities
Index: kmail/kmcomposewin.h
===================================================================
--- kmail/kmcomposewin.h (Revision 673905)
+++ kmail/kmcomposewin.h (Arbeitskopie)
@@ -461,7 +461,7 @@
void alignmentChanged( int );
public: // kmkernel, attachmentlistview
- bool addAttach( const KUrl url );
+ bool addAttach( const KUrl &url );
public: // kmcommand
/**
Index: kmail/kmfilteraction.h
===================================================================
--- kmail/kmfilteraction.h (Revision 673905)
+++ kmail/kmfilteraction.h (Arbeitskopie)
@@ -72,7 +72,7 @@
CriticalError = 0x8 };
/** Initialize filter action with (english) name @p aName and
(internationalized) label @p aLabel. */
- KMFilterAction(const char* aName, const QString aLabel);
+ KMFilterAction(const char* aName, const QString &aLabel);
virtual ~KMFilterAction();
/** Returns nationalized label, ie. the one which is presented in
@@ -125,7 +125,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr) = 0;
+ virtual void argsFromString(const QString &argsStr) = 0;
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const = 0;
@@ -181,11 +181,11 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithNone(const char* aName, const QString aLabel);
+ KMFilterActionWithNone(const char* aName, const QString &aLabel);
/** Read extra arguments from given string. This type of filter
action has no parameters, so this is a no-op. */
- virtual void argsFromString(const QString) {};
+ virtual void argsFromString(const QString &argStr) {};
/** Return extra arguments as string. Must not contain newlines. We
return QString(), because we have no parameter. */
@@ -222,7 +222,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithString(const char* aName, const QString aLabel);
+ KMFilterActionWithString(const char* aName, const QString &aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -248,7 +248,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const;
@@ -286,7 +286,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithUOID(const char* aName, const QString aLabel);
+ KMFilterActionWithUOID(const char* aName, const QString &aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -295,7 +295,7 @@
virtual bool isEmpty() const { return mParameter == 0; }
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const;
@@ -339,7 +339,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithStringList(const char* aName, const QString aLabel);
+ KMFilterActionWithStringList(const char* aName, const QString &aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
@@ -359,7 +359,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
protected:
QStringList mParameterList;
@@ -392,7 +392,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithFolder(const char* aName, const QString aLabel);
+ KMFilterActionWithFolder(const char* aName, const QString &aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -418,7 +418,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const;
@@ -463,7 +463,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithAddress(const char* aName, const QString aLabel);
+ KMFilterActionWithAddress(const char* aName, const QString &aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
@@ -514,7 +514,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithUrl(const char* aName, const QString aLabel);
+ KMFilterActionWithUrl(const char* aName, const QString &aLabel);
~KMFilterActionWithUrl();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -540,7 +540,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const;
@@ -559,7 +559,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithCommand(const char* aName, const QString aLabel);
+ KMFilterActionWithCommand(const char* aName, const QString &aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
@@ -595,7 +595,7 @@
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithTest(const char* aName, const QString aLabel);
+ KMFilterActionWithTest(const char* aName, const QString &aLabel);
~KMFilterActionWithTest();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -621,7 +621,7 @@
virtual void clearParamWidget(QWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const QString &argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const QString argsAsString() const;
Index: kmail/kmfolderdialog.cpp
===================================================================
--- kmail/kmfolderdialog.cpp (Revision 673905)
+++ kmail/kmfolderdialog.cpp (Arbeitskopie)
@@ -374,8 +374,8 @@
connect( mIconsCheckBox, SIGNAL(toggled(bool)),
mUnreadIconLabel, SLOT(setEnabled(bool)) );
- connect( mNormalIconButton, SIGNAL(iconChanged(QString)),
- this, SLOT(slotChangeIcon(QString)) );
+ connect( mNormalIconButton, SIGNAL(iconChanged(const QString&)),
+ this, SLOT(slotChangeIcon(const QString&)) );
//end icons group
addLine( this, topLayout);
@@ -738,7 +738,7 @@
return true;
}
-void FolderDialogGeneralTab::slotChangeIcon( QString icon ) // can't use a const-ref here, due \
to KIconButton's signal +void FolderDialogGeneralTab::slotChangeIcon( const QString &icon )
{
mUnreadIconButton->setIcon( icon );
}
@@ -832,4 +832,4 @@
}
}
-#include "kmfolderdialog.moc"
\ Kein Zeilenvorschub am Ende der Datei
+#include "kmfolderdialog.moc"
Index: kmail/kmcommands.h
===================================================================
--- kmail/kmcommands.h (Revision 673905)
+++ kmail/kmcommands.h (Arbeitskopie)
@@ -796,7 +796,7 @@
KMLoadPartsCommand( PartNodeMessageMap& partMap );
public slots:
- void slotPartRetrieved( KMMessage* msg, QString partSpecifier );
+ void slotPartRetrieved( KMMessage* msg, const QString &partSpecifier );
signals:
void partsRetrieved();
Index: kmail/vacation.cpp
===================================================================
--- kmail/vacation.cpp (Revision 673905)
+++ kmail/vacation.cpp (Arbeitskopie)
@@ -184,7 +184,7 @@
kDebug(5006) << "~Vacation()" << endl;
}
- static inline QString dotstuff( QString s ) {
+ static inline QString dotstuff( QString s ) { // krazy:exclude=passbyvalue
if ( s.startsWith( "." ) )
return '.' + s.replace( "\n.", "\n.." );
else
Index: kmail/kmfilteraction.cpp
===================================================================
--- kmail/kmfilteraction.cpp (Revision 673905)
+++ kmail/kmfilteraction.cpp (Arbeitskopie)
@@ -55,7 +55,7 @@
//
//=============================================================================
-KMFilterAction::KMFilterAction( const char* aName, const QString aLabel )
+KMFilterAction::KMFilterAction( const char* aName, const QString &aLabel )
{
mName = aName;
mLabel = aLabel;
@@ -145,7 +145,7 @@
//
//=============================================================================
-KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const QString aLabel )
+KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -162,12 +162,12 @@
//
//=============================================================================
-KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const QString aLabel )
+KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel ), mParameter( 0 )
{
}
-void KMFilterActionWithUOID::argsFromString( const QString argsStr )
+void KMFilterActionWithUOID::argsFromString( const QString &argsStr )
{
mParameter = argsStr.trimmed().toUInt();
}
@@ -191,7 +191,7 @@
//
//=============================================================================
-KMFilterActionWithString::KMFilterActionWithString( const char* aName, const QString aLabel )
+KMFilterActionWithString::KMFilterActionWithString( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -218,7 +218,7 @@
((QLineEdit*)paramWidget)->clear();
}
-void KMFilterActionWithString::argsFromString( const QString argsStr )
+void KMFilterActionWithString::argsFromString( const QString &argsStr )
{
mParameter = argsStr;
}
@@ -241,7 +241,7 @@
//
//=============================================================================
-KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const QString \
aLabel ) +KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const \
QString &aLabel ) : KMFilterActionWithString( aName, aLabel )
{
}
@@ -271,7 +271,7 @@
((QComboBox*)paramWidget)->setCurrentIndex(0);
}
-void KMFilterActionWithStringList::argsFromString( const QString argsStr )
+void KMFilterActionWithStringList::argsFromString( const QString &argsStr )
{
int idx = mParameterList.indexOf( argsStr );
if ( idx < 0 ) {
@@ -288,7 +288,7 @@
//
//=============================================================================
-KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const QString aLabel )
+KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel )
{
mFolder = 0;
@@ -321,7 +321,7 @@
((FolderRequester *)paramWidget)->setFolder( kmkernel->draftsFolder() );
}
-void KMFilterActionWithFolder::argsFromString( const QString argsStr )
+void KMFilterActionWithFolder::argsFromString( const QString &argsStr )
{
mFolder = kmkernel->folderMgr()->findIdString( argsStr );
if (!mFolder)
@@ -371,7 +371,7 @@
//
//=============================================================================
-KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const QString aLabel \
) +KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const QString \
&aLabel ) : KMFilterActionWithString( aName, aLabel )
{
}
@@ -404,7 +404,7 @@
//
//=============================================================================
-KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const QString aLabel \
) +KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const QString \
&aLabel ) : KMFilterActionWithUrl( aName, aLabel )
{
}
@@ -759,7 +759,7 @@
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
+ virtual void argsFromString( const QString &argsStr );
virtual const QString argsAsString() const;
virtual const QString displayString() const;
};
@@ -821,7 +821,7 @@
return false;
}
-void KMFilterActionSetStatus::argsFromString( const QString argsStr )
+void KMFilterActionSetStatus::argsFromString( const QString &argsStr )
{
if ( argsStr.length() == 1 ) {
MessageStatus status;
@@ -868,7 +868,7 @@
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
+ virtual void argsFromString( const QString &argsStr );
virtual const QString argsAsString() const;
virtual const QString displayString() const;
};
@@ -917,7 +917,7 @@
return GoOn;
}
-void KMFilterActionFakeDisposition::argsFromString( const QString argsStr )
+void KMFilterActionFakeDisposition::argsFromString( const QString &argsStr )
{
if ( argsStr.length() == 1 ) {
if ( argsStr[0] == 'I' ) { // ignore
@@ -1030,7 +1030,7 @@
virtual void clearParamWidget( QWidget* paramWidget ) const;
virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual void argsFromString( const QString &argsStr );
virtual const QString displayString() const;
@@ -1138,7 +1138,7 @@
return label() + " \"" + Qt::escape( argsAsString() ) + "\"";
}
-void KMFilterActionAddHeader::argsFromString( const QString argsStr )
+void KMFilterActionAddHeader::argsFromString( const QString &argsStr )
{
QStringList l = argsStr.split( '\t' );
QString s;
@@ -1174,7 +1174,7 @@
virtual void clearParamWidget( QWidget* paramWidget ) const;
virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual void argsFromString( const QString &argsStr );
virtual const QString displayString() const;
@@ -1315,7 +1315,7 @@
return label() + " \"" + Qt::escape( argsAsString() ) + "\"";
}
-void KMFilterActionRewriteHeader::argsFromString( const QString argsStr )
+void KMFilterActionRewriteHeader::argsFromString( const QString &argsStr )
{
QStringList l = argsStr.split( '\t' );
QString s;
@@ -1776,7 +1776,7 @@
Phonon::AudioPlayer* mPlayer;
};
-KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const QString aLabel )
+KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1808,7 +1808,7 @@
((KMSoundTestWidget*)paramWidget)->clear();
}
-void KMFilterActionWithTest::argsFromString( const QString argsStr )
+void KMFilterActionWithTest::argsFromString( const QString &argsStr )
{
mParameter = argsStr;
}
@@ -1855,7 +1855,7 @@
return false;
}
-KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const QString aLabel )
+KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const QString &aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1887,7 +1887,7 @@
((KUrlRequester*)paramWidget)->clear();
}
-void KMFilterActionWithUrl::argsFromString( const QString argsStr )
+void KMFilterActionWithUrl::argsFromString( const QString &argsStr )
{
mParameter = argsStr;
}
Index: kmail/kmcomposewin.cpp
===================================================================
--- kmail/kmcomposewin.cpp (Revision 673905)
+++ kmail/kmcomposewin.cpp (Arbeitskopie)
@@ -2320,7 +2320,7 @@
}
//-----------------------------------------------------------------------------
-bool KMComposeWin::addAttach( const KUrl aUrl )
+bool KMComposeWin::addAttach( const KUrl &aUrl )
{
if ( !aUrl.isValid() ) {
KMessageBox::sorry( this, i18n( "<qt><p>KMail could not recognize the location of the \
attachment (%1);</p>"
Index: kmail/localsubscriptiondialog.cpp
===================================================================
--- kmail/localsubscriptiondialog.cpp (Revision 673905)
+++ kmail/localsubscriptiondialog.cpp (Arbeitskopie)
@@ -47,7 +47,7 @@
namespace KMail {
LocalSubscriptionDialog::LocalSubscriptionDialog( QWidget *parent, const QString &caption,
- ImapAccountBase *acct, QString startPath )
+ ImapAccountBase *acct, const QString &startPath )
: SubscriptionDialog( parent, caption, acct, startPath ),
mAccount( acct )
{
Index: kmail/keditcl.h
===================================================================
--- kmail/keditcl.h (Revision 673905)
+++ kmail/keditcl.h (Arbeitskopie)
@@ -105,7 +105,7 @@
QString getText();
QString getReplaceText();
- void setText(QString);
+ void setText(const QString&);
/**
* @returns the combobox containing the history of searches. Can be used
Index: kmail/folderstorage.cpp
===================================================================
--- kmail/folderstorage.cpp (Revision 673905)
+++ kmail/folderstorage.cpp (Arbeitskopie)
@@ -567,7 +567,7 @@
//-----------------------------------------------------------------------------
FolderJob* FolderStorage::createJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, const QString &partSpecifier,
const AttachmentStrategy *as ) const
{
FolderJob * job = doCreateJob( msg, jt, folder, partSpecifier, as );
Index: kmail/kmfolder.h
===================================================================
--- kmail/kmfolder.h (Revision 673905)
+++ kmail/kmfolder.h (Arbeitskopie)
@@ -199,7 +199,7 @@
* for each derived KMFolder).
*/
FolderJob* createJob( KMMessage *msg, FolderJob::JobType jt = FolderJob::tGetMessage,
- KMFolder *folder = 0, QString partSpecifier = QString(),
+ KMFolder *folder = 0, const QString &partSpecifier = QString(),
const AttachmentStrategy *as = 0 ) const;
FolderJob* createJob( QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt = FolderJob::tGetMessage,
@@ -565,7 +565,7 @@
void msgRemoved(KMFolder*, quint32 sernum);
/** Emitted after a message is removed from the folder. */
- void msgRemoved( int idx, QString msgIdMD5 );
+ void msgRemoved( int idx, const QString& msgIdMD5 );
void msgRemoved(KMFolder*);
/** Emitted when a message is added from the folder. */
Index: kmail/kmfoldermgr.cpp
===================================================================
--- kmail/kmfoldermgr.cpp (Revision 673905)
+++ kmail/kmfoldermgr.cpp (Arbeitskopie)
@@ -533,8 +533,8 @@
KMFolderDir *newParent )
{
RenameJob* job = new RenameJob( folder->storage(), newName, newParent );
- connect( job, SIGNAL( renameDone( QString, bool ) ),
- this, SLOT( slotRenameDone( QString, bool ) ) );
+ connect( job, SIGNAL( renameDone( const QString&, bool ) ),
+ this, SLOT( slotRenameDone( const QString&, bool ) ) );
job->start();
}
@@ -547,7 +547,7 @@
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::slotRenameDone( QString, bool success )
+void KMFolderMgr::slotRenameDone( const QString&, bool success )
{
kDebug(5006) << k_funcinfo << success << endl;
}
Index: kmail/kmfolderimap.cpp
===================================================================
--- kmail/kmfolderimap.cpp (Revision 673905)
+++ kmail/kmfolderimap.cpp (Arbeitskopie)
@@ -1007,8 +1007,8 @@
}
//-----------------------------------------------------------------------------
-void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath,
- QString mimeType )
+void KMFolderImap::initializeFrom( KMFolderImap* parent, const QString &folderPath,
+ const QString &mimeType )
{
setAccount( parent->account() );
setImapPath( folderPath );
@@ -1017,7 +1017,7 @@
}
//-----------------------------------------------------------------------------
-void KMFolderImap::setChildrenState( QString attributes )
+void KMFolderImap::setChildrenState( const QString &attributes )
{
// update children state
if ( attributes.contains( "haschildren", Qt::CaseSensitive ) )
@@ -1624,7 +1624,7 @@
//-------------------------------------------------------------
FolderJob*
KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, const QString &partSpecifier,
const AttachmentStrategy *as ) const
{
KMFolderImap* kmfi = folder? dynamic_cast<KMFolderImap*>(folder->storage()) : 0;
@@ -1646,10 +1646,11 @@
return job;
} else {
// download complete message or part (attachment)
+ ImapJob *job;
if ( partSpecifier == "STRUCTURE" ) // hide from outside
- partSpecifier.clear();
-
- ImapJob *job = new ImapJob( msg, jt, kmfi, partSpecifier );
+ job = new ImapJob( msg, jt, kmfi, QString() );
+ else
+ job = new ImapJob( msg, jt, kmfi, partSpecifier );
job->setParentFolder( this );
return job;
}
@@ -2130,7 +2131,7 @@
return KMFolderMbox::create();
}
-QList<ulong> KMFolderImap::splitSets(const QString uids)
+QList<ulong> KMFolderImap::splitSets(const QString &uids)
{
QList<ulong> uidlist;
Index: kmail/headeritem.h
===================================================================
--- kmail/headeritem.h (Revision 673905)
+++ kmail/headeritem.h (Arbeitskopie)
@@ -210,7 +210,7 @@
virtual QString key( int column, bool /*ascending*/ ) const;
- void setTempKey( QString key );
+ void setTempKey( const QString &key );
int compare( Q3ListViewItem *i, int col, bool ascending ) const;
Index: kmail/kmmsgbase.h
===================================================================
--- kmail/kmmsgbase.h (Revision 673905)
+++ kmail/kmmsgbase.h (Arbeitskopie)
@@ -243,7 +243,7 @@
/** This function handles both encodings described in RFC2047:
Base64 ("=?iso-8859-1?b?...?=") and quoted-printable */
static QString decodeRFC2047String( const QByteArray &aStr,
- QByteArray prefCharset = "" );
+ const QByteArray &prefCharset = "" );
/** Encode given string as described in RFC2047:
using quoted-printable. */
Index: kmail/imapjob.h
===================================================================
--- kmail/imapjob.h (Revision 673905)
+++ kmail/imapjob.h (Arbeitskopie)
@@ -58,8 +58,8 @@
public:
ImapJob( KMMessage *msg, JobType jt = tGetMessage, KMFolderImap *folder = 0,
- QString partSpecifier = QString(), const AttachmentStrategy *as = 0 );
- ImapJob( QList<KMMessage*>& msgList, QString sets,
+ const QString &partSpecifier = QString(), const AttachmentStrategy *as = 0 );
+ ImapJob( QList<KMMessage*>& msgList, const QString &sets,
JobType jt = tGetMessage, KMFolderImap *folder = 0 );
virtual ~ImapJob();
@@ -82,7 +82,7 @@
private:
void execute();
- void init( JobType jt, QString sets, KMFolderImap *folder,
+ void init( JobType jt, const QString &sets, KMFolderImap *folder,
QList<KMMessage*>& msgList );
KIO::Job *mJob;
QByteArray mData;
Index: kmail/templatesinsertcommand.h
===================================================================
--- kmail/templatesinsertcommand.h (Revision 673905)
+++ kmail/templatesinsertcommand.h (Arbeitskopie)
@@ -48,7 +48,7 @@
signals:
void insertCommand( TemplatesInsertCommand::Command cmd );
- void insertCommand( QString cmd, int adjustCursor = 0 );
+ void insertCommand( const QString& cmd, int adjustCursor = 0 );
public slots:
void slotClicked();
Index: kmail/kmfoldermbox.cpp
===================================================================
--- kmail/kmfoldermbox.cpp (Revision 673905)
+++ kmail/kmfoldermbox.cpp (Arbeitskopie)
@@ -477,7 +477,7 @@
//-------------------------------------------------------------
FolderJob*
KMFolderMbox::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString, const AttachmentStrategy* ) const
+ KMFolder *folder, const QString&, const AttachmentStrategy* ) const
{
MboxJob *job = new MboxJob( msg, jt, folder );
job->setParent( this );
Index: kmail/templatesconfiguration.h
===================================================================
--- kmail/templatesconfiguration.h (Revision 673905)
+++ kmail/templatesconfiguration.h (Arbeitskopie)
@@ -38,8 +38,8 @@
void saveToGlobal();
void loadFromIdentity( uint id );
void saveToIdentity( uint id );
- void loadFromFolder( QString id, uint identity = 0 );
- void saveToFolder( QString id );
+ void loadFromFolder( const QString &id, uint identity = 0 );
+ void saveToFolder( const QString &id );
/** Do import settings from 'Phrases' configuration. */
void loadFromPhrases();
@@ -68,7 +68,7 @@
protected:
- QString strOrBlank( QString str );
+ QString strOrBlank( const QString &str );
};
Index: kmail/kmfolder.cpp
===================================================================
--- kmail/kmfolder.cpp (Revision 673905)
+++ kmail/kmfolder.cpp (Arbeitskopie)
@@ -107,8 +107,8 @@
connect( mStorage, SIGNAL( nameChanged() ), SIGNAL( nameChanged() ) );
connect( mStorage, SIGNAL( msgRemoved( KMFolder*, quint32 ) ),
SIGNAL( msgRemoved( KMFolder*, quint32 ) ) );
- connect( mStorage, SIGNAL( msgRemoved( int, QString ) ),
- SIGNAL( msgRemoved( int, QString ) ) );
+ connect( mStorage, SIGNAL( msgRemoved( int, const QString& ) ),
+ SIGNAL( msgRemoved( int, const QString& ) ) );
connect( mStorage, SIGNAL( msgRemoved( KMFolder* ) ),
SIGNAL( msgRemoved( KMFolder* ) ) );
connect( mStorage, SIGNAL( msgAdded( int ) ), SIGNAL( msgAdded( int ) ) );
@@ -336,7 +336,7 @@
}
FolderJob* KMFolder::createJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, const QString &partSpecifier,
const AttachmentStrategy *as ) const
{
return mStorage->createJob( msg, jt, folder, partSpecifier, as );
Index: kmail/kmkernel.h
===================================================================
--- kmail/kmkernel.h (Revision 673905)
+++ kmail/kmkernel.h (Arbeitskopie)
@@ -147,9 +147,9 @@
QStringList folderList() const;
QDBusObjectPath getFolder( const QString& vpath );
- void selectFolder( QString folder );
+ void selectFolder( const QString &folder );
int timeOfLastMessageCountChange() const;
- virtual bool showMail( quint32 serialNumber, QString messageId );
+ virtual bool showMail( quint32 serialNumber, const QString &messageId );
virtual QString getFrom( quint32 serialNumber );
virtual QString debugScheduler();
virtual QString debugSernum( quint32 serialNumber );
Index: kmail/kmfolderimap.h
===================================================================
--- kmail/kmfolderimap.h (Revision 673905)
+++ kmail/kmfolderimap.h (Arbeitskopie)
@@ -269,7 +269,7 @@
/**
* Splits a uid-set into single uids
*/
-static QList<ulong> splitSets(const QString);
+static QList<ulong> splitSets(const QString&);
virtual void ignoreJobsForMessage( KMMessage* );
@@ -321,7 +321,7 @@
virtual bool isMoveable() const;
/** Initialize this storage from another one. Used when creating a child folder */
-void initializeFrom( KMFolderImap* parent, QString path, QString mimeType );
+void initializeFrom( KMFolderImap* parent, const QString &path, const QString &mimeType );
signals:
void folderComplete(KMFolderImap *folder, bool success);
@@ -410,7 +410,7 @@
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, const QString &partSpecifier,
const AttachmentStrategy *as ) const;
virtual FolderJob* doCreateJob( QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
@@ -422,7 +422,7 @@
the various index files deleted. Returns 0 on success. */
virtual int expungeContents();
- void setChildrenState( QString attributes );
+ void setChildrenState( const QString &attributes );
/** Create or find the INBOX and initialize it */
void initInbox();
Index: kmail/kmfoldersearch.cpp
===================================================================
--- kmail/kmfoldersearch.cpp (Revision 673905)
+++ kmail/kmfoldersearch.cpp (Arbeitskopie)
@@ -94,7 +94,7 @@
delete mSearchPattern;
}
-bool KMSearch::write(QString location) const
+bool KMSearch::write(const QString &location) const
{
KConfig config(location);
KConfigGroup group( &config, "Search Folder" );
@@ -108,7 +108,7 @@
return true;
}
-bool KMSearch::read(QString location)
+bool KMSearch::read(const QString &location)
{
KConfig config( location );
KConfigGroup group( &config, "Search Folder" );
@@ -654,7 +654,7 @@
}
FolderJob* KMFolderSearch::doCreateJob(KMMessage*, FolderJob::JobType,
- KMFolder*, QString, const AttachmentStrategy* ) const
+ KMFolder*, const QString&, const AttachmentStrategy* ) \
const {
// Should never be called
assert(0);
Index: kmail/filterlog.h
===================================================================
--- kmail/filterlog.h (Revision 673905)
+++ kmail/filterlog.h (Arbeitskopie)
@@ -120,7 +120,7 @@
/** dump the log - for testing purposes */
void dump();
/** save the log to a file - returns true if okay */
- bool saveToFile( QString fileName );
+ bool saveToFile( const QString &fileName );
/** destructor */
virtual ~FilterLog();
Index: kmail/keditcl2.cpp
===================================================================
--- kmail/keditcl2.cpp (Revision 673905)
+++ kmail/keditcl2.cpp (Arbeitskopie)
@@ -967,8 +967,7 @@
}
-/* antlarr: KDE 4: make it const QString & */
-void KEdReplace::setText(QString string)
+void KEdReplace::setText(const QString &string)
{
d->searchCombo->setEditText(string);
d->searchCombo->lineEdit()->selectAll();
Index: kmail/kmfilterdlg.h
===================================================================
--- kmail/kmfilterdlg.h (Revision 673905)
+++ kmail/kmfilterdlg.h (Arbeitskopie)
@@ -366,7 +366,7 @@
void slotConfigureShortcutButtonToggled( bool aChecked );
void slotCapturedShortcutChanged( const QKeySequence& );
void slotConfigureToolbarButtonToggled( bool aChecked );
- void slotFilterActionIconChanged( QString icon );
+ void slotFilterActionIconChanged( const QString &icon );
void slotReset();
void slotUpdateFilter();
void slotSaveSize();
Index: kmail/customtemplates.cpp
===================================================================
--- kmail/customtemplates.cpp (Revision 673905)
+++ kmail/customtemplates.cpp (Arbeitskopie)
@@ -65,8 +65,8 @@
connect( mEdit, SIGNAL( textChanged() ),
this, SLOT( slotTextChanged( void ) ) );
- connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ),
- this, SLOT( slotInsertCommand(QString, int) ) );
+ connect( mInsertCommand, SIGNAL( insertCommand(const QString&, int) ),
+ this, SLOT( slotInsertCommand(const QString&, int) ) );
connect( mAdd, SIGNAL( clicked() ),
this, SLOT( slotAddClicked() ) );
@@ -212,7 +212,7 @@
kmkernel->getKMMainWidget()->updateCustomTemplateMenus();
}
-void CustomTemplates::slotInsertCommand( QString cmd, int adjustCursor )
+void CustomTemplates::slotInsertCommand( const QString &cmd, int adjustCursor )
{
int para, index;
mEdit->getCursorPosition( ¶, &index );
Index: kmail/kmfoldermaildir.h
===================================================================
--- kmail/kmfoldermaildir.h (Revision 673905)
+++ kmail/kmfoldermaildir.h (Arbeitskopie)
@@ -102,7 +102,7 @@
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const;
+ const QString &partSpecifier, const AttachmentStrategy *as ) \
const; virtual FolderJob* doCreateJob( QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
/** Load message from file and store it at given index. Returns 0
Index: kmail/kmfoldermgr.h
===================================================================
--- kmail/kmfoldermgr.h (Revision 673905)
+++ kmail/kmfoldermgr.h (Arbeitskopie)
@@ -132,7 +132,7 @@
void removeFolderAux(KMFolder* obsoleteFolder, bool success);
/** Called when the renaming of a folder is done */
- void slotRenameDone( QString newName, bool success );
+ void slotRenameDone( const QString &newName, bool success );
signals:
/** Emitted when the list of folders has changed. This signal is a hook
Index: kmail/kmfoldermbox.h
===================================================================
--- kmail/kmfoldermbox.h (Revision 673905)
+++ kmail/kmfoldermbox.h (Arbeitskopie)
@@ -116,7 +116,7 @@
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const;
+ const QString &partSpecifier, const AttachmentStrategy *as ) \
const; virtual FolderJob* doCreateJob( QList<KMMessage*>& msgList, const QString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
/** Load message from file and store it at given index. Returns 0
["signature.asc" (application/pgp-signature)]
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic