Changed: #1193 code cleanup.

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

View file

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

View file

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