diff options
author | Mateusz Loskot <mateusz@loskot.net> | 2015-05-06 00:16:58 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-07-01 10:43:09 +0000 |
commit | 7389250fcd1ada74514f90e8670d7af087e6a7c7 (patch) | |
tree | 11cacc00d934db20de04737058ebda99b17828fb /src/plugins/boostbuildprojectmanager/b2utility.h | |
parent | 188d4bfdb24c938a0c60042418852f2a8bcb2a73 (diff) | |
download | qt-creator-7389250fcd1ada74514f90e8670d7af087e6a7c7.tar.gz |
Add Boost.Build Project Manager plug-in
Preparing to contribute the plug-in, see the announcement at
http://lists.qt-project.org/pipermail/qt-creator/2015-February/004436.html
Change-Id: Ic3920c9b888af5bea1b7742b8ff49984c29a2909
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/boostbuildprojectmanager/b2utility.h')
-rw-r--r-- | src/plugins/boostbuildprojectmanager/b2utility.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/plugins/boostbuildprojectmanager/b2utility.h b/src/plugins/boostbuildprojectmanager/b2utility.h new file mode 100644 index 0000000000..2f810cf35c --- /dev/null +++ b/src/plugins/boostbuildprojectmanager/b2utility.h @@ -0,0 +1,60 @@ +// +// Copyright (C) 2013 Mateusz Ĺoskot <mateusz@loskot.net> +// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +// +// This file is part of Qt Creator Boost.Build plugin project. +// +// This is free software; you can redistribute and/or modify it under +// the terms of the GNU Lesser General Public License, Version 2.1 +// as published by the Free Software Foundation. +// See accompanying file LICENSE.txt or copy at +// http://www.gnu.org/licenses/lgpl-2.1-standalone.html. +// +#ifndef BBUTILITY_HPP +#define BBUTILITY_HPP + +#include "b2projectmanagerconstants.h" +// Qt +#include <QDebug> +#include <QHash> +#include <QSet> +#include <QString> +#include <QStringList> + +////////////////////////////////////////////////////////////////////////////////////////// +#ifdef _DEBUG + +#define BBPM_QDEBUG(msg) \ + qDebug() \ + << "[" << BoostBuildProjectManager::Constants::BOOSTBUILD << "] " \ + << "(" << __PRETTY_FUNCTION__ << ")"; \ + qDebug().nospace() << "\t" << msg + +#else +#define BBPM_QDEBUG(msg) + +#endif // _DEBUG + +#define BBPM_C(CONSTANT) QLatin1String(BoostBuildProjectManager::Constants::CONSTANT) + +////////////////////////////////////////////////////////////////////////////////////////// +namespace BoostBuildProjectManager { +namespace Utility { + +// Read all lines from a file. +QStringList readLines(QString const& absoluteFileName); + +// Converts the path from relative to the project to an absolute path. +QStringList makeAbsolutePaths(QString const& basePath, QStringList const& paths); + +QStringList& makeRelativePaths(QString const& basePath, QStringList& paths); + +QHash<QString, QStringList> sortFilesIntoPaths(QString const& basePath + , QSet<QString> const& files); + +QString parseJamfileProjectName(QString const& fileName); + +} // namespace Utility +} // namespace BoostBuildProjectManager + +#endif // BBUTILITY_HPP |