Changed: #1193 code cleanup.

This commit is contained in:
dnk-88 2011-02-16 20:12:33 +02:00
parent daf2fe51b3
commit 6192d39d50
4 changed files with 71 additions and 72 deletions

View file

@ -33,11 +33,19 @@
namespace ExtensionSystem namespace ExtensionSystem
{ {
CPluginSpec::CPluginSpec(): CPluginSpec::CPluginSpec()
: _location(""),
_filePath(""),
_fileName(""),
_name(""),
_version(""),
_vendor(""),
_description(""),
_state(State::Invalid), _state(State::Invalid),
_hasError(false), _hasError(false),
_plugin(NULL), _errorString(""),
_pluginManager(NULL) _plugin(0),
_pluginManager(0)
{ {
} }
@ -98,16 +106,6 @@ QString CPluginSpec::errorString() const
bool CPluginSpec::setFileName(const QString &fileName) bool CPluginSpec::setFileName(const QString &fileName)
{ {
_name = _version
= _vendor
= _description
= _location
= _filePath
= _fileName
= "";
_state = State::Invalid;
_hasError = false;
_errorString = "";
QFile file(fileName); QFile file(fileName);
if (!file.exists()) if (!file.exists())
return reportError(QCoreApplication::translate("CPluginSpec", "File does not exist: %1").arg(file.fileName())); return reportError(QCoreApplication::translate("CPluginSpec", "File does not exist: %1").arg(file.fileName()));
@ -209,7 +207,7 @@ void CPluginSpec::kill()
if (!_plugin) if (!_plugin)
return; return;
delete _plugin; delete _plugin;
_plugin = NULL; _plugin = 0;
_state = State::Deleted; _state = State::Deleted;
} }

View file

@ -96,6 +96,7 @@ public:
break; break;
} }
} }
return result;
} }
protected: protected: