Remove unused, commented out stuff.

Part of a patch by Mischael Schill <me at mschill dot ch>

SVN_SILENT


svn path=/trunk/KDE/kdepim/; revision=772385
wilder-work
Thomas McGuire 18 years ago
parent 3e323c092f
commit 0b04f13be2
  1. 3
      folderstorage.cpp
  2. 5
      folderstorage.h
  3. 12
      kmailicalifaceimpl.cpp
  4. 21
      kmcomposewin.cpp
  5. 31
      textsource.cpp

@ -505,6 +505,7 @@ KMMessage* FolderStorage::getMsg(int idx)
}
//-----------------------------------------------------------------------------
/* mschill: This one is buggy. Somhow it starts a transfer and deleting the message will result in an error
KMMessage* FolderStorage::readTemporaryMsg(int idx)
{
if(!(idx >= 0 && idx <= count()))
@ -532,7 +533,7 @@ KMMessage* FolderStorage::readTemporaryMsg(int idx)
msg->setEnableUndo(undo);
return msg;
}
*/
//-----------------------------------------------------------------------------
KMMsgInfo* FolderStorage::unGetMsg(int idx)

@ -142,12 +142,13 @@ public:
/** Checks if the message is already "gotten" with getMsg */
virtual bool isMessage(int idx);
/** Load message from file and do NOT store it, only return it.
/* Load message from file and do NOT store it, only return it.
This is equivalent to, but faster than, getMsg+unGetMsg
WARNING: the caller has to delete the returned value!
*/
/* mschill: This one is buggy
virtual KMMessage* readTemporaryMsg(int idx);
*/
/** Read a message and returns a DwString */
virtual DwString getDwString(int idx) = 0;

@ -564,12 +564,8 @@ QMap<quint32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mimet
<< resource << ") from" << startIndex << "to" << stopIndex;
for(int i = startIndex; i < stopIndex; ++i) {
#if 0
bool unget = !f->isMessage(i);
bool unget = !f->isMessage( i );
KMMessage* msg = f->getMsg( i );
#else // faster
KMMessage* msg = f->storage()->readTemporaryMsg(i);
#endif
if ( msg ) {
const int iSlash = mimetype.indexOf('/');
const QByteArray sType = mimetype.left( iSlash ).toLatin1();
@ -595,11 +591,7 @@ QMap<quint32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mimet
// have a message part that is matching the wanted MIME type
}
}
#if 0
if( unget ) f->unGetMsg(i);
#else
delete msg;
#endif
if( unget ) f->unGetMsg( i );
}
}
f->close( "incidences" );

@ -1475,27 +1475,6 @@ void KMComposeWin::setupEditor( void )
// Font setup
slotUpdateFont();
/* installRBPopup() is broken in kdelibs, we should wait for
the new klibtextedit (dnaber, 2002-01-01)
menu = new QPopupMenu(this);
//#ifdef BROKEN
menu->insertItem(i18n("Undo"),mEditor,
SLOT(undo()), KStandardShortcut::shortcut(KStandardShortcut::Undo));
menu->insertItem(i18n("Redo"),mEditor,
SLOT(redo()), KStandardShortcut::shortcut(KStandardShortcut::Redo));
menu->addSeparator();
//#endif //BROKEN
menu->insertItem(i18n("Cut"), this, SLOT(slotCut()));
menu->insertItem(i18n("Copy"), this, SLOT(slotCopy()));
menu->insertItem(i18n("Paste"), this, SLOT(slotPaste()));
menu->insertItem(i18n("Mark All"),this, SLOT(slotMarkAll()));
menu->addSeparator();
menu->insertItem(i18n("Find..."), this, SLOT(slotFind()));
menu->insertItem(i18n("Replace..."), this, SLOT(slotReplace()));
menu->addSeparator();
menu->insertItem(i18n("Fixed Font Widths"), this, SLOT(slotUpdateFont()));
mEditor->installRBPopup(menu);
*/
updateCursorPosition();
connect( mEditor, SIGNAL(cursorPositionChanged()), SLOT(updateCursorPosition()) );
connect( mEditor, SIGNAL( currentFontChanged( const QFont & ) ),

@ -47,22 +47,25 @@ KMTextSource::~KMTextSource() {
}
QByteArray KMTextSource::text(quint32 serialNumber) const {
QByteArray rc;
KMFolder *folder = 0;
int idx;
KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx);
if (folder) {
KMMsgBase *msgBase = folder->getMsgBase(idx);
if (msgBase) {
KMMessage *msg = msgBase->storage()->readTemporaryMsg(idx);
if (msg) {
rc = msg->asString();
delete msg;
}
QByteArray KMTextSource::text( quint32 serialNumber ) const {
QByteArray rc;
KMFolder *folder = 0;
int idx;
KMMsgDict::instance()->getLocation( serialNumber, &folder, &idx );
if ( folder ) {
KMMsgBase *msgBase = folder->getMsgBase( idx );
if (msgBase) {
KMFolderIndex* storage = msgBase->storage();
if( storage ) {
KMMessage *msg = storage->getMsg( idx );
if ( msg ) {
rc = msg->asString();
storage->unGetMsg( idx );
}
}
}
}
return rc;
return rc;
}

Loading…
Cancel
Save