Commit dc2aec5f authored by Laurent Montel's avatar Laurent Montel 😁

Clean up

parent d5a13453
......@@ -24,25 +24,25 @@ using namespace MessageCore;
class AttachmentFromUrlBaseJob::Private {
public:
Private( AttachmentFromUrlBaseJob *qq );
Private( const KUrl & url, AttachmentFromUrlBaseJob *qq );
AttachmentFromUrlBaseJob *const q;
qint64 mMaxSize;
KUrl mUrl;
};
AttachmentFromUrlBaseJob::Private::Private( AttachmentFromUrlBaseJob* qq ):
AttachmentFromUrlBaseJob::Private::Private( const KUrl & url, AttachmentFromUrlBaseJob* qq ):
q( qq ),
mMaxSize ( -1 )
mMaxSize ( -1 ),
mUrl(url)
{
}
AttachmentFromUrlBaseJob::AttachmentFromUrlBaseJob( const KUrl &url, QObject *parent ):
AttachmentLoadJob( parent ),
d( new Private( this ) )
d( new Private( url, this ) )
{
d->mUrl=url;
}
AttachmentFromUrlBaseJob::~AttachmentFromUrlBaseJob()
......
......@@ -22,6 +22,8 @@
#include <KGlobal>
#include <QDebug>
//TODO add test for static MailingList detect( const KMime::Message::Ptr &message ); and static QString name( ... );
MailingListTest::MailingListTest(QObject *parent)
: QObject(parent)
{
......
......@@ -46,9 +46,11 @@ EditorWatcher::EditorWatcher( const KUrl & url, const QString &mimeType, bool op
QObject( parent ),
mUrl( url ),
mMimeType( mimeType ),
mOpenWith( openWith ),
mInotifyFd(-1),
mInotifyWatch(-1),
mEditor( 0 ),
mParentWidget( parentWidget ),
mOpenWith( openWith ),
mHaveInotify( false ),
mFileOpen( false ),
mEditorRunning( false ),
......@@ -108,6 +110,16 @@ bool EditorWatcher::start()
return true;
}
bool EditorWatcher::fileChanged() const
{
return mFileModified;
}
KUrl EditorWatcher::url() const
{
return mUrl;
}
void EditorWatcher::inotifyEvent()
{
assert( mHaveInotify );
......
......@@ -52,8 +52,8 @@ public:
QObject *parent, QWidget *parentWidget );
bool start();
bool fileChanged() const { return mFileModified; }
KUrl url() const { return mUrl;}
bool fileChanged() const;
KUrl url() const;
signals:
void editDone( MessageViewer::EditorWatcher* watcher );
......@@ -65,22 +65,20 @@ private slots:
private:
KUrl mUrl;
QString mMimeType;
bool mOpenWith;
KProcess *mEditor;
QWidget *mParentWidget;
QTimer mTimer;
QTime mEditTime;
int mInotifyFd;
int mInotifyWatch;
bool mHaveInotify;
KProcess *mEditor;
QWidget *mParentWidget;
bool mOpenWith;
bool mHaveInotify;
bool mFileOpen;
bool mEditorRunning;
bool mFileModified;
QTimer mTimer;
QTime mEditTime;
bool mDone;
};
......
......@@ -198,7 +198,7 @@ const QString HTMLPrettyFormatter::reformat( const QString &src )
source.insert(pos, QLatin1Char('\n'));
pos += htmlTagRegExp.matchedLength() + 1;
source.insert(pos, QLatin1Char('\n'));
pos++;
++pos;
}
// Then split the source on newlines skiping empty parts.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment