diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2011-09-15 09:10:10 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-09-15 10:33:56 +0200 |
commit | 8801c76a8e223b6f41a8369e75c71b67237d8d25 (patch) | |
tree | 813d0922e56bb1dbf13a4bb14a3be19dbf295619 /src/plugins/remotelinux/deployablefilesperprofile.cpp | |
parent | 63e8b9075b3a1d502cdcbb63cb2b19e0e6208263 (diff) | |
download | qt-creator-8801c76a8e223b6f41a8369e75c71b67237d8d25.tar.gz |
Coding style: Pure virtual functions, private implementation pointers.
Change-Id: I293f8dbd4e467e866bab381841659a07e32b9d90
Reviewed-on: http://codereview.qt-project.org/4948
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/remotelinux/deployablefilesperprofile.cpp')
-rw-r--r-- | src/plugins/remotelinux/deployablefilesperprofile.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/plugins/remotelinux/deployablefilesperprofile.cpp b/src/plugins/remotelinux/deployablefilesperprofile.cpp index 06a1c2ec0b..174b00aef1 100644 --- a/src/plugins/remotelinux/deployablefilesperprofile.cpp +++ b/src/plugins/remotelinux/deployablefilesperprofile.cpp @@ -75,37 +75,37 @@ using namespace Internal; DeployableFilesPerProFile::DeployableFilesPerProFile(const Qt4ProFileNode *proFileNode, QObject *parent) - : QAbstractTableModel(parent), m_d(new DeployableFilesPerProFilePrivate(proFileNode)) + : QAbstractTableModel(parent), d(new DeployableFilesPerProFilePrivate(proFileNode)) { - if (m_d->projectType == ApplicationTemplate) { - m_d->deployables.prepend(DeployableFile(localExecutableFilePath(), - m_d->installsList.targetPath)); - } else if (m_d->projectType == LibraryTemplate) { + if (d->projectType == ApplicationTemplate) { + d->deployables.prepend(DeployableFile(localExecutableFilePath(), + d->installsList.targetPath)); + } else if (d->projectType == LibraryTemplate) { foreach (const QString &filePath, localLibraryFilePaths()) { - m_d->deployables.prepend(DeployableFile(filePath, - m_d->installsList.targetPath)); + d->deployables.prepend(DeployableFile(filePath, + d->installsList.targetPath)); } } - foreach (const InstallsItem &elem, m_d->installsList.items) { + foreach (const InstallsItem &elem, d->installsList.items) { foreach (const QString &file, elem.files) - m_d->deployables << DeployableFile(file, elem.path); + d->deployables << DeployableFile(file, elem.path); } } DeployableFilesPerProFile::~DeployableFilesPerProFile() { - delete m_d; + delete d; } DeployableFile DeployableFilesPerProFile::deployableAt(int row) const { Q_ASSERT(row >= 0 && row < rowCount()); - return m_d->deployables.at(row); + return d->deployables.at(row); } int DeployableFilesPerProFile::rowCount(const QModelIndex &parent) const { - return parent.isValid() ? 0 : m_d->deployables.count(); + return parent.isValid() ? 0 : d->deployables.count(); } int DeployableFilesPerProFile::columnCount(const QModelIndex &parent) const @@ -118,7 +118,7 @@ QVariant DeployableFilesPerProFile::data(const QModelIndex &index, int role) con if (!index.isValid() || index.row() >= rowCount()) return QVariant(); - if (m_d->projectType != AuxTemplate && !hasTargetPath() && index.row() == 0 + if (d->projectType != AuxTemplate && !hasTargetPath() && index.row() == 0 && index.column() == 1) { if (role == Qt::DisplayRole) return tr("<no target path set>"); @@ -147,34 +147,34 @@ QVariant DeployableFilesPerProFile::headerData(int section, QString DeployableFilesPerProFile::localExecutableFilePath() const { - if (!m_d->targetInfo.valid || m_d->projectType != ApplicationTemplate) + if (!d->targetInfo.valid || d->projectType != ApplicationTemplate) return QString(); - return QDir::cleanPath(m_d->targetInfo.workingDir + '/' + m_d->targetInfo.target); + return QDir::cleanPath(d->targetInfo.workingDir + '/' + d->targetInfo.target); } QStringList DeployableFilesPerProFile::localLibraryFilePaths() const { - if (!m_d->targetInfo.valid || m_d->projectType != LibraryTemplate) + if (!d->targetInfo.valid || d->projectType != LibraryTemplate) return QStringList(); - QString basePath = m_d->targetInfo.workingDir + QLatin1String("/lib"); - const bool isStatic = m_d->config.contains(QLatin1String("static")) - || m_d->config.contains(QLatin1String("staticlib")); - basePath += m_d->targetInfo.target + QLatin1String(isStatic ? ".a" : ".so"); + QString basePath = d->targetInfo.workingDir + QLatin1String("/lib"); + const bool isStatic = d->config.contains(QLatin1String("static")) + || d->config.contains(QLatin1String("staticlib")); + basePath += d->targetInfo.target + QLatin1String(isStatic ? ".a" : ".so"); basePath = QDir::cleanPath(basePath); const QChar dot(QLatin1Char('.')); const QString filePathMajor = basePath + dot - + QString::number(m_d->projectVersion.major); + + QString::number(d->projectVersion.major); const QString filePathMinor = filePathMajor + dot - + QString::number(m_d->projectVersion.minor); + + QString::number(d->projectVersion.minor); const QString filePathPatch = filePathMinor + dot - + QString::number(m_d->projectVersion.patch); + + QString::number(d->projectVersion.patch); return QStringList() << filePathPatch << filePathMinor << filePathMajor << basePath; } QString DeployableFilesPerProFile::remoteExecutableFilePath() const { - return hasTargetPath() && m_d->projectType == ApplicationTemplate + return hasTargetPath() && d->projectType == ApplicationTemplate ? deployableAt(0).remoteDir + QLatin1Char('/') + QFileInfo(localExecutableFilePath()).fileName() : QString(); @@ -182,18 +182,18 @@ QString DeployableFilesPerProFile::remoteExecutableFilePath() const QString DeployableFilesPerProFile::projectDir() const { - return QFileInfo(m_d->proFilePath).dir().path(); + return QFileInfo(d->proFilePath).dir().path(); } bool DeployableFilesPerProFile::hasTargetPath() const { - return !m_d->installsList.targetPath.isEmpty(); + return !d->installsList.targetPath.isEmpty(); } -bool DeployableFilesPerProFile::isModified() const { return m_d->modified; } -void DeployableFilesPerProFile::setUnModified() { m_d->modified = false; } -QString DeployableFilesPerProFile::projectName() const { return m_d->projectName; } -QString DeployableFilesPerProFile::proFilePath() const { return m_d->proFilePath; } -Qt4ProjectType DeployableFilesPerProFile::projectType() const { return m_d->projectType; } -QString DeployableFilesPerProFile::applicationName() const { return m_d->targetInfo.target; } +bool DeployableFilesPerProFile::isModified() const { return d->modified; } +void DeployableFilesPerProFile::setUnModified() { d->modified = false; } +QString DeployableFilesPerProFile::projectName() const { return d->projectName; } +QString DeployableFilesPerProFile::proFilePath() const { return d->proFilePath; } +Qt4ProjectType DeployableFilesPerProFile::projectType() const { return d->projectType; } +QString DeployableFilesPerProFile::applicationName() const { return d->targetInfo.target; } } // namespace RemoteLinux |