From e24bdd29345747288b1899bf4cf72af91d0d8adf Mon Sep 17 00:00:00 2001 From: uwolfer Date: Sat, 28 Apr 2007 16:44:27 +0000 Subject: [PATCH] krazy and doc fixes git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork@658851 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kget/core/job.h | 37 ++++++++++++++++++------------------- kget/core/kget.cpp | 6 +++--- kget/core/kget.h | 4 ++-- kget/core/scheduler.h | 4 ++-- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/kget/core/job.h b/kget/core/job.h index b7f1265de..3d1596fba 100644 --- a/kget/core/job.h +++ b/kget/core/job.h @@ -8,8 +8,8 @@ of the License. */ -#ifndef _JOB_H -#define _JOB_H +#ifndef JOB_H +#define JOB_H /** * @brief Job class @@ -34,28 +34,27 @@ class KGET_EXPORT Job public: /** * The status property describes the current job status - * - * @param Running The job is being executed - * @param Delayed The job is delayed. This means that the scheduler should - * not start it until it exits from the delayed state - * @param Stopped The job is stopped - * @param Aborted The job is stopped, but this also indicates that it - * stopped because an error occurred - * @param Finished The job exited from its Running state successfully */ - enum Status {Running, Delayed, Stopped, Aborted, Finished}; + enum Status { + Running, ///< The job is being executed + Delayed, ///< The job is delayed. This means that the scheduler should + /// not start it until it exits from the delayed state + Stopped, ///< The job is stopped + Aborted, ///< The job is stopped, but this also indicates that it + /// stopped because an error occurred + Finished ///< The job exited from its Running state successfully + }; /** * The policy property describes how the scheduler should manage this job. - * - * @param Start The scheduler should start this job even if its queue - * isn't in a Running status - * @param Stop The scheduler shouldn't never start this job, even if - * if its queue is in a Running status - * @param None The scheduler should start this job depending on its - * queue status */ - enum Policy {Start, Stop, None}; + enum Policy {Start, ///< The scheduler should start this job even if its queue + /// isn't in a Running status + Stop, ///< The scheduler shouldn't never start this job, even if + /// if its queue is in a Running status + None ///< The scheduler should start this job depending on its + /// queue status + }; Job(JobQueue * parent, Scheduler * scheduler); virtual ~Job(); diff --git a/kget/core/kget.cpp b/kget/core/kget.cpp index b55bccdce..747391029 100644 --- a/kget/core/kget.cpp +++ b/kget/core/kget.cpp @@ -592,7 +592,7 @@ QString KGet::getSaveDirectoryFromDefault(const KUrl &filename) return destDir.remove("file://"); } -bool KGet::isValidSource(KUrl source) +bool KGet::isValidSource(const KUrl &source) { if (!source.isValid()) { @@ -638,7 +638,7 @@ bool KGet::isValidDestDirectory(const QString & destDir) return (!destDir.isEmpty() && QFileInfo( destDir ).isDir()); } -bool KGet::isValidDestUrl(KUrl destUrl) +bool KGet::isValidDestUrl(const KUrl &destUrl) { if(KIO::NetAccess::exists(destUrl, false, 0)) { @@ -673,7 +673,7 @@ KUrl KGet::getValidDestUrl(const QString& destDir, const KUrl &srcUrl) if ( filename.isEmpty() ) { // simply use the full url as filename - filename = QUrl::toPercentEncoding( srcUrl.prettyUrl(), "/" ); + filename = KUrl::toPercentEncoding( srcUrl.prettyUrl(), "/" ); kDebug(5001) << " Filename is empty. Setting to " << filename << endl; kDebug(5001) << " srcUrl = " << srcUrl.url() << endl; kDebug(5001) << " prettyUrl = " << srcUrl.prettyUrl() << endl; diff --git a/kget/core/kget.h b/kget/core/kget.h index 5c1abbbe0..c522a4133 100644 --- a/kget/core/kget.h +++ b/kget/core/kget.h @@ -228,7 +228,7 @@ class KGET_EXPORT KGet static QString destInputDialog(); static QString getSaveDirectoryFromDefault(const KUrl &filename); - static bool isValidSource(KUrl source); + static bool isValidSource(const KUrl &source); static bool isValidDestDirectory(const QString& destDir); /** @@ -238,7 +238,7 @@ class KGET_EXPORT KGet * @param destFile the url of the destination file * @return true if the destination file is ok, otherwise returns false */ - static bool isValidDestUrl(KUrl destUrl); + static bool isValidDestUrl(const KUrl &destUrl); static KUrl getValidDestUrl(const QString& destDir, const KUrl &srcUrl); diff --git a/kget/core/scheduler.h b/kget/core/scheduler.h index 22a23495d..1566c00fa 100644 --- a/kget/core/scheduler.h +++ b/kget/core/scheduler.h @@ -35,8 +35,8 @@ class Scheduler : public QObject Scheduler(); ~Scheduler(); - /* - * Starts globally the execution of the jobs + /** + * Starts globally the execution of the jobs * * @see stop() */ -- 2.11.4.GIT