forked from qt-creator/qt-creator
Replace QFileInfo::fileName() with FileName::fileName()
Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <extensionsystem/pluginspec.h>
|
||||
#include <qtsingleapplication.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QDebug>
|
||||
@@ -172,7 +173,7 @@ static bool copyRecursively(const QString &srcFilePath,
|
||||
if (srcFileInfo.isDir()) {
|
||||
QDir targetDir(tgtFilePath);
|
||||
targetDir.cdUp();
|
||||
if (!targetDir.mkdir(QFileInfo(tgtFilePath).fileName()))
|
||||
if (!targetDir.mkdir(Utils::FileName::fromString(tgtFilePath).fileName()))
|
||||
return false;
|
||||
QDir sourceDir(srcFilePath);
|
||||
QStringList fileNames = sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System);
|
||||
|
@@ -29,7 +29,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "fileinprojectfinder.h"
|
||||
#include <utils/qtcassert.h>
|
||||
#include "fileutils.h"
|
||||
#include "qtcassert.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
@@ -215,9 +216,9 @@ QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
||||
if (debug)
|
||||
qDebug() << "FileInProjectFinder: checking project files ...";
|
||||
|
||||
const QString fileName = QFileInfo(originalPath).fileName();
|
||||
const QString fileName = FileName::fromString(originalPath).fileName();
|
||||
foreach (const QString &f, m_projectFiles) {
|
||||
if (QFileInfo(f).fileName() == fileName) {
|
||||
if (FileName::fromString(f).fileName() == fileName) {
|
||||
m_cache.insert(originalPath, f);
|
||||
if (success)
|
||||
*success = true;
|
||||
|
@@ -156,7 +156,7 @@ bool FileUtils::copyRecursively(const FileName &srcFilePath, const FileName &tgt
|
||||
if (!tgtFilePath.exists()) {
|
||||
QDir targetDir(tgtFilePath.toString());
|
||||
targetDir.cdUp();
|
||||
if (!targetDir.mkdir(tgtFilePath.toFileInfo().fileName())) {
|
||||
if (!targetDir.mkdir(tgtFilePath.fileName())) {
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("Utils::FileUtils", "Failed to create directory \"%1\".")
|
||||
.arg(tgtFilePath.toUserOutput());
|
||||
|
@@ -372,7 +372,7 @@ void MacroExpander::registerFileVariables(const QByteArray &prefix,
|
||||
|
||||
registerVariable(prefix + kFileNamePostfix,
|
||||
tr("%1: File name without path.").arg(heading),
|
||||
[base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : QFileInfo(tmp).fileName(); },
|
||||
[base]() -> QString { QString tmp = base(); return tmp.isEmpty() ? QString() : Utils::FileName::fromString(tmp).fileName(); },
|
||||
visibleInChooser);
|
||||
|
||||
registerVariable(prefix + kFileBaseNamePostfix,
|
||||
|
@@ -28,6 +28,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "fileutils.h"
|
||||
#include "reloadpromptutils.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -53,7 +54,7 @@ QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &fileName,
|
||||
msg = QCoreApplication::translate("Utils::reloadPrompt",
|
||||
"The file <i>%1</i> has changed outside Qt Creator. Do you want to reload it?");
|
||||
}
|
||||
msg = msg.arg(QFileInfo(fileName).fileName());
|
||||
msg = msg.arg(FileName::fromString(fileName).fileName());
|
||||
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
|
||||
}
|
||||
|
||||
|
@@ -28,8 +28,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "unixutils.h"
|
||||
#include "fileutils.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QFileInfo>
|
||||
#include <QCoreApplication>
|
||||
@@ -81,7 +82,7 @@ QString UnixUtils::substituteFileBrowserParameters(const QString &pre, const QSt
|
||||
} else if (c == QLatin1Char('f')) {
|
||||
s = QLatin1Char('"') + file + QLatin1Char('"');
|
||||
} else if (c == QLatin1Char('n')) {
|
||||
s = QLatin1Char('"') + QFileInfo(file).fileName() + QLatin1Char('"');
|
||||
s = QLatin1Char('"') + FileName::fromString(file).fileName() + QLatin1Char('"');
|
||||
} else if (c == QLatin1Char('%')) {
|
||||
s = c;
|
||||
} else {
|
||||
|
@@ -61,7 +61,7 @@ QString AndroidManifestDocument::defaultPath() const
|
||||
|
||||
QString AndroidManifestDocument::suggestedFileName() const
|
||||
{
|
||||
return filePath().toFileInfo().fileName();
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
bool AndroidManifestDocument::isModified() const
|
||||
|
@@ -301,7 +301,7 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact
|
||||
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
|
||||
QStringList() << QLatin1String("*"), QDir::Dirs);
|
||||
while (it.hasNext()) {
|
||||
const QString &fileName = QFileInfo(it.next()).fileName();
|
||||
const QString &fileName = FileName::fromString(it.next()).fileName();
|
||||
int idx = versionRegExp.indexIn(fileName);
|
||||
if (idx == -1)
|
||||
continue;
|
||||
@@ -376,7 +376,7 @@ QList<ToolChain *> AndroidToolChainFactory::createToolChainsForNdk(const Utils::
|
||||
QMap<Abi::Architecture, AndroidToolChain *> newestToolChainForArch;
|
||||
|
||||
while (it.hasNext()) {
|
||||
const QString &fileName = QFileInfo(it.next()).fileName();
|
||||
const QString &fileName = FileName::fromString(it.next()).fileName();
|
||||
int idx = versionRegExp.indexIn(fileName);
|
||||
if (idx == -1)
|
||||
continue;
|
||||
@@ -417,7 +417,7 @@ QList<int> AndroidToolChainFactory::newestToolChainVersionForArch(Abi::Architect
|
||||
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
|
||||
QStringList() << QLatin1String("*"), QDir::Dirs);
|
||||
while (it.hasNext()) {
|
||||
const QString &fileName = QFileInfo(it.next()).fileName();
|
||||
const QString &fileName = FileName::fromString(it.next()).fileName();
|
||||
int idx = versionRegExp.indexIn(fileName);
|
||||
if (idx == -1)
|
||||
continue;
|
||||
|
@@ -76,7 +76,7 @@ QString JavaDocument::defaultPath() const
|
||||
|
||||
QString JavaDocument::suggestedFileName() const
|
||||
{
|
||||
return filePath().toFileInfo().fileName();
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -388,7 +388,7 @@ QVariant BookmarkManager::data(const QModelIndex &index, int role) const
|
||||
|
||||
Bookmark *bookMark = m_bookmarksList.at(index.row());
|
||||
if (role == BookmarkManager::Filename)
|
||||
return QFileInfo(bookMark->fileName()).fileName();
|
||||
return FileName::fromString(bookMark->fileName()).fileName();
|
||||
if (role == BookmarkManager::LineNumber)
|
||||
return bookMark->lineNumber();
|
||||
if (role == BookmarkManager::Directory)
|
||||
|
@@ -63,7 +63,7 @@ static QString shadowBuildDirectory(const QString &projectFilePath, const Kit *k
|
||||
return QString();
|
||||
QFileInfo info(projectFilePath);
|
||||
|
||||
const QString projectName = QFileInfo(info.absolutePath()).fileName();
|
||||
const QString projectName = FileName::fromString(info.absolutePath()).fileName();
|
||||
ProjectMacroExpander expander(projectName, k, bcName);
|
||||
QDir projectDir = QDir(Project::projectDirectory(FileName::fromString(projectFilePath)).toString());
|
||||
QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());
|
||||
|
@@ -257,7 +257,7 @@ QString CMakeDocument::defaultPath() const
|
||||
|
||||
QString CMakeDocument::suggestedFileName() const
|
||||
{
|
||||
return filePath().toFileInfo().fileName();
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -1213,7 +1213,7 @@ void CMakeCbpParser::parseUnit()
|
||||
m_cmakeFileList.append( new ProjectExplorer::FileNode(fileName, ProjectExplorer::ProjectFileType, false));
|
||||
} else {
|
||||
bool generated = false;
|
||||
QString onlyFileName = QFileInfo(fileName).fileName();
|
||||
QString onlyFileName = Utils::FileName::fromString(fileName).fileName();
|
||||
if ( (onlyFileName.startsWith(QLatin1String("moc_")) && onlyFileName.endsWith(QLatin1String(".cxx")))
|
||||
|| (onlyFileName.startsWith(QLatin1String("ui_")) && onlyFileName.endsWith(QLatin1String(".h")))
|
||||
|| (onlyFileName.startsWith(QLatin1String("qrc_")) && onlyFileName.endsWith(QLatin1String(".cxx"))))
|
||||
|
@@ -30,8 +30,9 @@
|
||||
|
||||
#include "openwithdialog.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
@@ -41,7 +42,7 @@ OpenWithDialog::OpenWithDialog(const QString &fileName, QWidget *parent)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
label->setText(tr("Open file \"%1\" with:").arg(QFileInfo(fileName).fileName()));
|
||||
label->setText(tr("Open file \"%1\" with:").arg(Utils::FileName::fromString(fileName).fileName()));
|
||||
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
|
||||
|
||||
connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
|
||||
|
@@ -1612,7 +1612,7 @@ void EditorManagerPrivate::copyFileNameFromContextMenu()
|
||||
{
|
||||
if (!d->m_contextMenuEntry)
|
||||
return;
|
||||
QApplication::clipboard()->setText(QFileInfo(d->m_contextMenuEntry->fileName()).fileName());
|
||||
QApplication::clipboard()->setText(FileName::fromString(d->m_contextMenuEntry->fileName()).fileName());
|
||||
}
|
||||
|
||||
void EditorManagerPrivate::saveDocumentFromContextMenu()
|
||||
|
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "infobar.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFile>
|
||||
@@ -263,7 +264,7 @@ QString IDocument::displayName() const
|
||||
{
|
||||
if (!d->displayName.isEmpty())
|
||||
return d->displayName;
|
||||
return d->filePath.toFileInfo().fileName();
|
||||
return d->filePath.fileName();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@@ -119,7 +119,7 @@ QList<LocatorFilterEntry> FileSystemFilter::matchesFor(QFutureInterface<LocatorF
|
||||
// file names can match with +linenumber or :linenumber
|
||||
name = entry;
|
||||
const QString lineNoSuffix = EditorManager::splitLineNumber(&name);
|
||||
name = QFileInfo(name).fileName();
|
||||
name = Utils::FileName::fromString(name).fileName();
|
||||
foreach (const QString &file, files) {
|
||||
if (future.isCanceled())
|
||||
break;
|
||||
|
@@ -149,7 +149,7 @@ void ToolSettings::apply()
|
||||
if (tool->preset() && (*tool) != (*(tool->preset()))) {
|
||||
// check if we need to choose a new file name
|
||||
if (tool->preset()->fileName() == tool->fileName()) {
|
||||
const QString &fileName = QFileInfo(tool->preset()->fileName()).fileName();
|
||||
const QString &fileName = Utils::FileName::fromString(tool->preset()->fileName()).fileName();
|
||||
const QString &newFilePath = getUserFilePath(fileName);
|
||||
// TODO error handling if newFilePath.isEmpty() (i.e. failed to find a unused name)
|
||||
tool->setFileName(newFilePath);
|
||||
|
@@ -30,7 +30,8 @@
|
||||
|
||||
#include "argumentscollector.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
static QString pasteRequestString() { return QLatin1String("paste"); }
|
||||
@@ -72,7 +73,7 @@ bool ArgumentsCollector::collect(const QStringList &args)
|
||||
QString ArgumentsCollector::usageString() const
|
||||
{
|
||||
QString usage = QString::fromLatin1("Usage:\n\t%1 <request> [ <request options>]\n\t")
|
||||
.arg(QFileInfo(QCoreApplication::applicationFilePath()).fileName());
|
||||
.arg(Utils::FileName::fromString(QCoreApplication::applicationFilePath()).fileName());
|
||||
usage += QString::fromLatin1("Possible requests: \"%1\", \"%2\", \"%3\"\n\t")
|
||||
.arg(pasteRequestString(), listProtocolsRequestString(), helpRequestString());
|
||||
usage += QString::fromLatin1("Possible options for request \"%1\": \"%2 <file>\" (default: stdin), "
|
||||
|
@@ -38,7 +38,6 @@
|
||||
#include <cplusplus/TypeOfExpression.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QSet>
|
||||
#include <QQueue>
|
||||
|
||||
@@ -258,7 +257,7 @@ Unknown::Unknown(const QString &type) : type(type)
|
||||
|
||||
CppInclude::CppInclude(const Document::Include &includeFile) :
|
||||
path(QDir::toNativeSeparators(includeFile.resolvedFileName())),
|
||||
fileName(QFileInfo(includeFile.resolvedFileName()).fileName())
|
||||
fileName(Utils::FileName::fromString(includeFile.resolvedFileName()).fileName())
|
||||
{
|
||||
helpCategory = TextEditor::HelpItem::Brief;
|
||||
helpIdCandidates = QStringList(fileName);
|
||||
|
@@ -53,7 +53,7 @@ CppPreProcessorDialog::CppPreProcessorDialog(QWidget *parent, const QString &fil
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
m_ui->setupUi(this);
|
||||
m_ui->editorLabel->setText(m_ui->editorLabel->text().arg(QFileInfo(m_filePath).fileName()));
|
||||
m_ui->editorLabel->setText(m_ui->editorLabel->text().arg(Utils::FileName::fromString(m_filePath).fileName()));
|
||||
m_ui->editWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
|
||||
CppSnippetProvider().decorateEditor(m_ui->editWidget);
|
||||
|
@@ -1917,7 +1917,7 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
|
||||
header.toString(),
|
||||
headerPaths);
|
||||
if (include.size() > 2) {
|
||||
const QString headerFileName = QFileInfo(info->fileName()).fileName();
|
||||
const QString headerFileName = Utils::FileName::fromString(info->fileName()).fileName();
|
||||
QTC_ASSERT(!headerFileName.isEmpty(), break);
|
||||
|
||||
int priority = 0;
|
||||
|
@@ -40,11 +40,11 @@
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
#include <utils/environment.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QCoreApplication>
|
||||
#include <QDate>
|
||||
#include <QLocale>
|
||||
@@ -157,7 +157,7 @@ static bool keyWordReplacement(const QString &keyWord,
|
||||
return true;
|
||||
}
|
||||
if (keyWord == QLatin1String("%FILENAME%")) {
|
||||
*value = QFileInfo(file).fileName();
|
||||
*value = Utils::FileName::fromString(file).fileName();
|
||||
return true;
|
||||
}
|
||||
if (keyWord == QLatin1String("%DATE%")) {
|
||||
|
@@ -45,7 +45,6 @@
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QtTest>
|
||||
|
||||
using namespace CppTools;
|
||||
@@ -653,7 +652,7 @@ void CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles()
|
||||
QHashIterator<Utils::FileName, QPair<QByteArray, unsigned> > it = workingCopy.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
fileNamesInWorkinCopy << QFileInfo(it.key().toString()).fileName();
|
||||
fileNamesInWorkinCopy << Utils::FileName::fromString(it.key().toString()).fileName();
|
||||
}
|
||||
fileNamesInWorkinCopy.sort();
|
||||
const QString expectedUiHeaderFileName = _("ui_mainwindow.h");
|
||||
@@ -671,8 +670,8 @@ void CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles()
|
||||
QVERIFY(document);
|
||||
const QStringList includedFiles = document->includedFiles();
|
||||
QCOMPARE(includedFiles.size(), 2);
|
||||
QCOMPARE(QFileInfo(includedFiles.at(0)).fileName(), _("mainwindow.h"));
|
||||
QCOMPARE(QFileInfo(includedFiles.at(1)).fileName(), _("ui_mainwindow.h"));
|
||||
QCOMPARE(Utils::FileName::fromString(includedFiles.at(0)).fileName(), _("mainwindow.h"));
|
||||
QCOMPARE(Utils::FileName::fromString(includedFiles.at(1)).fileName(), _("ui_mainwindow.h"));
|
||||
}
|
||||
|
||||
/// QTCREATORBUG-9828: Locator shows symbols of closed files
|
||||
|
@@ -620,7 +620,7 @@ QVariant BreakpointItem::data(int column, int role) const
|
||||
if (str.isEmpty() && !m_params.fileName.isEmpty())
|
||||
str = m_params.fileName;
|
||||
if (str.isEmpty()) {
|
||||
QString s = QFileInfo(str).fileName();
|
||||
QString s = Utils::FileName::fromString(str).fileName();
|
||||
if (!s.isEmpty())
|
||||
str = s;
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include <debugger/shared/hostutils.h>
|
||||
#include <debugger/threaddata.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -87,7 +88,7 @@ static inline QString cdbBreakPointFileName(const BreakpointParameters &bp,
|
||||
if (bp.fileName.isEmpty())
|
||||
return bp.fileName;
|
||||
if (bp.pathUsage == BreakpointUseShortPath)
|
||||
return QFileInfo(bp.fileName).fileName();
|
||||
return Utils::FileName::fromString(bp.fileName).fileName();
|
||||
return cdbSourcePathMapping(QDir::toNativeSeparators(bp.fileName), sourcePathMapping, SourceToDebugger);
|
||||
}
|
||||
|
||||
|
@@ -181,7 +181,7 @@ QString StartApplicationParameters::displayName() const
|
||||
{
|
||||
const int maxLength = 60;
|
||||
|
||||
QString name = QFileInfo(localExecutable).fileName() + QLatin1Char(' ') + processArgs;
|
||||
QString name = FileName::fromString(localExecutable).fileName() + QLatin1Char(' ') + processArgs;
|
||||
if (name.size() > 60) {
|
||||
int index = name.lastIndexOf(QLatin1Char(' '), maxLength);
|
||||
if (index == -1)
|
||||
|
@@ -634,7 +634,7 @@ public:
|
||||
message = tr("0x%1 hit").arg(data.address, 0, 16);
|
||||
} else {
|
||||
//: Message tracepoint: %1 file, %2 line %3 function hit.
|
||||
message = tr("%1:%2 %3() hit").arg(QFileInfo(data.fileName).fileName()).
|
||||
message = tr("%1:%2 %3() hit").arg(FileName::fromString(data.fileName).fileName()).
|
||||
arg(data.lineNumber).
|
||||
arg(cppFunctionAt(data.fileName, data.lineNumber));
|
||||
}
|
||||
|
@@ -1860,7 +1860,7 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
|
||||
}
|
||||
|
||||
cleanFilePath.clear();
|
||||
const QString base = QFileInfo(fileName).fileName();
|
||||
const QString base = FileName::fromString(fileName).fileName();
|
||||
|
||||
QMap<QString, QString>::const_iterator jt = m_baseNameToFullName.find(base);
|
||||
while (jt != m_baseNameToFullName.end() && jt.key() == base) {
|
||||
@@ -2438,7 +2438,7 @@ QString GdbEngine::breakLocation(const QString &file) const
|
||||
{
|
||||
QString where = m_fullToShortName.value(file);
|
||||
if (where.isEmpty())
|
||||
return QFileInfo(file).fileName();
|
||||
return FileName::fromString(file).fileName();
|
||||
return where;
|
||||
}
|
||||
|
||||
|
@@ -37,11 +37,11 @@
|
||||
#include <debugger/watchhandler.h>
|
||||
|
||||
#include <qmldebug/qmldebugconstants.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QFileInfo>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
using namespace QmlDebug;
|
||||
@@ -583,7 +583,7 @@ void QmlInspectorAgent::fetchContextObjectsForLocation(const QString &file,
|
||||
|
||||
log(LogSend, QString::fromLatin1("FETCH_OBJECTS_FOR_LOCATION %1:%2:%3").arg(file)
|
||||
.arg(QString::number(lineNumber)).arg(QString::number(columnNumber)));
|
||||
quint32 queryId = m_engineClient->queryObjectsForLocation(QFileInfo(file).fileName(),
|
||||
quint32 queryId = m_engineClient->queryObjectsForLocation(Utils::FileName::fromString(file).fileName(),
|
||||
lineNumber, columnNumber);
|
||||
qCDebug(qmlInspectorLog) << __FUNCTION__ << '(' << file << ':' << lineNumber
|
||||
<< ':' << columnNumber << ')' << " - query id" << queryId;
|
||||
|
@@ -471,7 +471,7 @@ void QmlV8DebuggerClientPrivate::setBreakpoint(const QString type, const QString
|
||||
args.setProperty(_(TYPE), QScriptValue(type));
|
||||
if (type == _(SCRIPTREGEXP))
|
||||
args.setProperty(_(TARGET),
|
||||
QScriptValue(QFileInfo(target).fileName()));
|
||||
QScriptValue(Utils::FileName::fromString(target).fileName()));
|
||||
else
|
||||
args.setProperty(_(TARGET), QScriptValue(target));
|
||||
|
||||
|
@@ -40,10 +40,10 @@
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QTextBlock>
|
||||
|
||||
#include <limits.h>
|
||||
@@ -107,7 +107,7 @@ void SourceAgent::setContent(const QString &filePath, const QString &content)
|
||||
|
||||
if (!d->editor) {
|
||||
QString titlePattern = d->producer + QLatin1String(": ")
|
||||
+ QFileInfo(filePath).fileName();
|
||||
+ Utils::FileName::fromString(filePath).fileName();
|
||||
d->editor = qobject_cast<BaseTextEditor *>(
|
||||
EditorManager::openEditorWithContents(
|
||||
CppEditor::Constants::CPPEDITOR_ID,
|
||||
|
@@ -34,11 +34,11 @@
|
||||
#include "debuggercore.h"
|
||||
#include "simplifytype.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
@@ -111,7 +111,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
|
||||
case StackFunctionNameColumn:
|
||||
return simplifyType(frame.function);
|
||||
case StackFileNameColumn:
|
||||
return frame.file.isEmpty() ? frame.from : QFileInfo(frame.file).fileName();
|
||||
return frame.file.isEmpty() ? frame.from : Utils::FileName::fromString(frame.file).fileName();
|
||||
case StackLineNumberColumn:
|
||||
return frame.line > 0 ? QVariant(frame.line) : QVariant();
|
||||
case StackAddressColumn:
|
||||
|
@@ -44,6 +44,8 @@
|
||||
#include <texteditor/displaysettings.h>
|
||||
#include <texteditor/marginsettings.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QStackedWidget>
|
||||
#include <QToolButton>
|
||||
#include <QSpinBox>
|
||||
@@ -52,7 +54,6 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QToolBar>
|
||||
#include <QComboBox>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QTextCodec>
|
||||
#include <QTextBlock>
|
||||
@@ -421,8 +422,8 @@ void DiffEditor::slotDiffFilesChanged(const QList<FileData> &diffFileList,
|
||||
for (int i = 0; i < count; i++) {
|
||||
const DiffFileInfo leftEntry = diffFileList.at(i).leftFileInfo;
|
||||
const DiffFileInfo rightEntry = diffFileList.at(i).rightFileInfo;
|
||||
const QString leftShortFileName = QFileInfo(leftEntry.fileName).fileName();
|
||||
const QString rightShortFileName = QFileInfo(rightEntry.fileName).fileName();
|
||||
const QString leftShortFileName = Utils::FileName::fromString(leftEntry.fileName).fileName();
|
||||
const QString rightShortFileName = Utils::FileName::fromString(rightEntry.fileName).fileName();
|
||||
QString itemText;
|
||||
QString itemToolTip;
|
||||
if (leftEntry.fileName == rightEntry.fileName) {
|
||||
|
@@ -536,7 +536,7 @@ QString GerritPlugin::findLocalRepository(QString project, const QString &branch
|
||||
branchRegexp.reset(); // Oops.
|
||||
}
|
||||
foreach (const QString &repository, gitRepositories) {
|
||||
const QString fileName = QFileInfo(repository).fileName();
|
||||
const QString fileName = Utils::FileName::fromString(repository).fileName();
|
||||
if ((!branchRegexp.isNull() && branchRegexp->exactMatch(fileName))
|
||||
|| fileName == project) {
|
||||
// Perform a check on the branch.
|
||||
|
@@ -46,6 +46,8 @@
|
||||
#include <qtsupport/qtoutputformatter.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
@@ -301,7 +303,7 @@ QString IosRunConfiguration::disabledReason() const
|
||||
{
|
||||
if (m_parseInProgress)
|
||||
return tr("The .pro file \"%1\" is currently being parsed.")
|
||||
.arg(QFileInfo(m_profilePath).fileName());
|
||||
.arg(FileName::fromString(m_profilePath).fileName());
|
||||
if (!m_parseSuccess)
|
||||
return static_cast<QmakeProject *>(target()->project())
|
||||
->disabledReasonForRunConfiguration(m_profilePath);
|
||||
|
@@ -415,7 +415,7 @@ void AbstractProcessStep::taskAdded(const Task &task)
|
||||
// 3. give up.
|
||||
|
||||
QList<QFileInfo> possibleFiles;
|
||||
QString fileName = QFileInfo(filePath).fileName();
|
||||
QString fileName = Utils::FileName::fromString(filePath).fileName();
|
||||
foreach (const QString &file, project()->files(Project::AllFiles)) {
|
||||
QFileInfo candidate(file);
|
||||
if (candidate.fileName() == fileName)
|
||||
|
@@ -93,7 +93,7 @@ Utils::FileIterator *AllProjectsFind::filesForProjects(const QStringList &nameFi
|
||||
foreach (const QString &file, projectFiles) {
|
||||
if (Utils::anyOf(filterRegs,
|
||||
[&file](QRegExp reg) {
|
||||
return (reg.exactMatch(file) || reg.exactMatch(QFileInfo(file).fileName()));
|
||||
return (reg.exactMatch(file) || reg.exactMatch(Utils::FileName::fromString(file).fileName()));
|
||||
})) {
|
||||
filteredFiles.append(file);
|
||||
}
|
||||
|
@@ -30,7 +30,8 @@
|
||||
|
||||
#include "deployablefile.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QHash>
|
||||
|
||||
using namespace Utils;
|
||||
@@ -55,7 +56,7 @@ DeployableFile::DeployableFile(const FileName &localFilePath, const QString &rem
|
||||
QString DeployableFile::remoteFilePath() const
|
||||
{
|
||||
return m_remoteDir.isEmpty()
|
||||
? QString() : m_remoteDir + QLatin1Char('/') + m_localFilePath.toFileInfo().fileName();
|
||||
? QString() : m_remoteDir + QLatin1Char('/') + m_localFilePath.fileName();
|
||||
}
|
||||
|
||||
bool DeployableFile::isValid() const
|
||||
|
@@ -30,10 +30,10 @@
|
||||
|
||||
#include "processparameters.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
|
||||
/*!
|
||||
@@ -163,7 +163,7 @@ QString ProcessParameters::prettyCommand() const
|
||||
QString cmd = m_command;
|
||||
if (m_macroExpander)
|
||||
cmd = m_macroExpander->expand(cmd);
|
||||
return QFileInfo(cmd).fileName();
|
||||
return Utils::FileName::fromString(cmd).fileName();
|
||||
}
|
||||
|
||||
QString ProcessParameters::prettyArguments() const
|
||||
|
@@ -63,8 +63,8 @@ bool sortNodes(Node *n1, Node *n2)
|
||||
FileNode *file2 = dynamic_cast<FileNode*>(n2);
|
||||
if (file1 && file1->fileType() == ProjectFileType) {
|
||||
if (file2 && file2->fileType() == ProjectFileType) {
|
||||
const QString fileName1 = QFileInfo(file1->path()).fileName();
|
||||
const QString fileName2 = QFileInfo(file2->path()).fileName();
|
||||
const QString fileName1 = Utils::FileName::fromString(file1->path()).fileName();
|
||||
const QString fileName2 = Utils::FileName::fromString(file2->path()).fileName();
|
||||
|
||||
int result = caseFriendlyCompare(fileName1, fileName2);
|
||||
if (result != 0)
|
||||
@@ -149,8 +149,8 @@ bool sortNodes(Node *n1, Node *n2)
|
||||
const QString filePath1 = n1->path();
|
||||
const QString filePath2 = n2->path();
|
||||
|
||||
const QString fileName1 = QFileInfo(filePath1).fileName();
|
||||
const QString fileName2 = QFileInfo(filePath2).fileName();
|
||||
const QString fileName1 = Utils::FileName::fromString(filePath1).fileName();
|
||||
const QString fileName2 = Utils::FileName::fromString(filePath2).fileName();
|
||||
|
||||
result = caseFriendlyCompare(fileName1, fileName2);
|
||||
if (result != 0) {
|
||||
@@ -288,7 +288,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
|
||||
break;
|
||||
}
|
||||
case Qt::EditRole: {
|
||||
result = QFileInfo(node->path()).fileName();
|
||||
result = Utils::FileName::fromString(node->path()).fileName();
|
||||
break;
|
||||
}
|
||||
case Qt::ToolTipRole: {
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
@@ -168,7 +169,7 @@ int Node::line() const
|
||||
|
||||
QString Node::displayName() const
|
||||
{
|
||||
return QFileInfo(path()).fileName();
|
||||
return Utils::FileName::fromString(path()).fileName();
|
||||
}
|
||||
|
||||
QString Node::tooltip() const
|
||||
@@ -348,7 +349,7 @@ bool FolderNode::renameFile(const QString &filePath, const QString &newFilePath)
|
||||
FolderNode::AddNewInformation FolderNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
Q_UNUSED(files);
|
||||
return AddNewInformation(QFileInfo(path()).fileName(), context == this ? 120 : 100);
|
||||
return AddNewInformation(Utils::FileName::fromString(path()).fileName(), context == this ? 120 : 100);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -549,7 +550,7 @@ ProjectNode::ProjectNode(const QString &projectFilePath)
|
||||
setNodeType(ProjectNodeType);
|
||||
// project node "manages" itself
|
||||
setProjectNode(this);
|
||||
setDisplayName(QFileInfo(projectFilePath).fileName());
|
||||
setDisplayName(Utils::FileName::fromString(projectFilePath).fileName());
|
||||
}
|
||||
|
||||
QString ProjectNode::vcsTopic() const
|
||||
|
@@ -58,6 +58,8 @@
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QAction>
|
||||
@@ -286,7 +288,7 @@ void QbsProjectManagerPlugin::updateBuildActions()
|
||||
&& !BuildManager::isBuilding(m_editorProject)
|
||||
&& !m_editorProject->isParsing();
|
||||
|
||||
fileName = QFileInfo(m_editorNode->path()).fileName();
|
||||
fileName = Utils::FileName::fromString(m_editorNode->path()).fileName();
|
||||
fileVisible = m_editorProject && m_editorNode && dynamic_cast<QbsBaseProjectNode *>(m_editorNode->projectNode());
|
||||
|
||||
QbsProductNode *productNode
|
||||
|
@@ -37,8 +37,11 @@
|
||||
#include <qmakeprojectmanager/qmakeproject.h>
|
||||
#include <qmakeprojectmanager/qmakenodes.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace {
|
||||
QLatin1String PRO_FILE_KEY("QMakeProjectManager.QmakeAndroidRunConfiguration.ProFile");
|
||||
}
|
||||
@@ -120,7 +123,7 @@ QString QmakeAndroidRunConfiguration::disabledReason() const
|
||||
{
|
||||
if (m_parseInProgress)
|
||||
return tr("The .pro file \"%1\" is currently being parsed.")
|
||||
.arg(QFileInfo(m_proFilePath).fileName());
|
||||
.arg(Utils::FileName::fromString(m_proFilePath).fileName());
|
||||
|
||||
if (!m_parseSuccess)
|
||||
return static_cast<QmakeProject *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath);
|
||||
|
@@ -132,7 +132,7 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
|
||||
QString iconResource;
|
||||
if (!wo.iconFile.isEmpty()) {
|
||||
iconResource = QLatin1String("QLatin1String(\":/");
|
||||
iconResource += QFileInfo(wo.iconFile).fileName();
|
||||
iconResource += Utils::FileName::fromString(wo.iconFile).fileName();
|
||||
iconResource += QLatin1String("\")");
|
||||
}
|
||||
sm.insert(QLatin1String("WIDGET_ICON"),iconResource);
|
||||
|
@@ -41,7 +41,9 @@
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtoutputformatter.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <utils/detailswidget.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/persistentsettings.h>
|
||||
@@ -121,7 +123,7 @@ QString DesktopQmakeRunConfiguration::disabledReason() const
|
||||
{
|
||||
if (m_parseInProgress)
|
||||
return tr("The .pro file \"%1\" is currently being parsed.")
|
||||
.arg(QFileInfo(m_proFilePath).fileName());
|
||||
.arg(FileName::fromString(m_proFilePath).fileName());
|
||||
|
||||
if (!m_parseSuccess)
|
||||
return static_cast<QmakeProject *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath);
|
||||
|
@@ -190,7 +190,7 @@ QString ProFileDocument::defaultPath() const
|
||||
|
||||
QString ProFileDocument::suggestedFileName() const
|
||||
{
|
||||
return filePath().toFileInfo().fileName();
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -1121,7 +1121,7 @@ bool QmakePriFileNode::renameFile(const QString &filePath, const QString &newFil
|
||||
ProjectExplorer::FolderNode::AddNewInformation QmakePriFileNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
Q_UNUSED(files)
|
||||
return ProjectExplorer::FolderNode::AddNewInformation(QFileInfo(path()).fileName(), context && context->projectNode() == this ? 120 : 90);
|
||||
return ProjectExplorer::FolderNode::AddNewInformation(FileName::fromString(path()).fileName(), context && context->projectNode() == this ? 120 : 90);
|
||||
}
|
||||
|
||||
bool QmakePriFileNode::priFileWritable(const QString &path)
|
||||
@@ -1623,7 +1623,7 @@ bool QmakeProFileNode::showInSimpleTree() const
|
||||
ProjectExplorer::FolderNode::AddNewInformation QmakeProFileNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
Q_UNUSED(files)
|
||||
return AddNewInformation(QFileInfo(path()).fileName(), context && context->projectNode() == this ? 120 : 100);
|
||||
return AddNewInformation(FileName::fromString(path()).fileName(), context && context->projectNode() == this ? 120 : 100);
|
||||
}
|
||||
|
||||
bool QmakeProFileNode::showInSimpleTree(QmakeProjectType projectType) const
|
||||
|
@@ -1428,17 +1428,17 @@ QString QmakeProject::disabledReasonForRunConfiguration(const QString &proFilePa
|
||||
{
|
||||
if (!QFileInfo::exists(proFilePath))
|
||||
return tr("The .pro file \"%1\" does not exist.")
|
||||
.arg(QFileInfo(proFilePath).fileName());
|
||||
.arg(FileName::fromString(proFilePath).fileName());
|
||||
|
||||
if (!m_rootProjectNode) // Shutting down
|
||||
return QString();
|
||||
|
||||
if (!m_rootProjectNode->findProFileFor(proFilePath))
|
||||
return tr("The .pro file \"%1\" is not part of the project.")
|
||||
.arg(QFileInfo(proFilePath).fileName());
|
||||
.arg(FileName::fromString(proFilePath).fileName());
|
||||
|
||||
return tr("The .pro file \"%1\" could not be parsed.")
|
||||
.arg(QFileInfo(proFilePath).fileName());
|
||||
.arg(FileName::fromString(proFilePath).fileName());
|
||||
}
|
||||
|
||||
QString QmakeProject::buildNameFor(const Kit *k)
|
||||
|
@@ -345,7 +345,7 @@ void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node
|
||||
m_rebuildSubProjectAction->setParameter(subProjectName);
|
||||
m_cleanSubProjectAction->setParameter(subProjectName);
|
||||
m_buildSubProjectContextMenu->setParameter(subProjectName);
|
||||
m_buildFileAction->setParameter(buildFilePossible ? QFileInfo(fileNode->path()).fileName() : QString());
|
||||
m_buildFileAction->setParameter(buildFilePossible ? Utils::FileName::fromString(fileNode->path()).fileName() : QString());
|
||||
|
||||
QmakeBuildConfiguration *buildConfiguration = (qmakeProject && qmakeProject->activeTarget()) ?
|
||||
static_cast<QmakeBuildConfiguration *>(qmakeProject->activeTarget()->activeBuildConfiguration()) : 0;
|
||||
@@ -395,7 +395,7 @@ void QmakeProjectManagerPlugin::updateBuildFileAction()
|
||||
QString file = currentDocument->filePath().toString();
|
||||
Node *node = SessionManager::nodeForFile(file);
|
||||
Project *project = SessionManager::projectForFile(file);
|
||||
m_buildFileAction->setParameter(QFileInfo(file).fileName());
|
||||
m_buildFileAction->setParameter(Utils::FileName::fromString(file).fileName());
|
||||
visible = qobject_cast<QmakeProject *>(project)
|
||||
&& node
|
||||
&& dynamic_cast<QmakePriFileNode *>(node->projectNode());
|
||||
|
@@ -129,7 +129,7 @@ QString QMakeStep::allArguments(bool shorted)
|
||||
if (bc->subNodeBuild())
|
||||
arguments << QDir::toNativeSeparators(bc->subNodeBuild()->path());
|
||||
else if (shorted)
|
||||
arguments << project()->projectFilePath().toFileInfo().fileName();
|
||||
arguments << project()->projectFilePath().fileName();
|
||||
else
|
||||
arguments << project()->projectFilePath().toUserOutput();
|
||||
|
||||
@@ -645,7 +645,7 @@ void QMakeStepConfigWidget::updateSummaryLabel()
|
||||
// We don't want the full path to the .pro file
|
||||
QString args = m_step->allArguments(true);
|
||||
// And we only use the .pro filename not the full path
|
||||
QString program = qtVersion->qmakeCommand().toFileInfo().fileName();
|
||||
QString program = qtVersion->qmakeCommand().fileName();
|
||||
setSummaryText(tr("<b>qmake:</b> %1 %2").arg(program, args));
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
|
||||
QString program = tr("<No Qt version>");
|
||||
if (qtVersion)
|
||||
program = qtVersion->qmakeCommand().toFileInfo().fileName();
|
||||
program = qtVersion->qmakeCommand().fileName();
|
||||
m_ui->qmakeArgumentsEdit->setPlainText(program + QLatin1Char(' ') + m_step->allArguments());
|
||||
}
|
||||
|
||||
|
@@ -36,8 +36,9 @@
|
||||
#include <cpptools/abstracteditorsupport.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QTextStream>
|
||||
|
||||
static const char mainCppC[] =
|
||||
@@ -98,7 +99,7 @@ Core::GeneratedFiles
|
||||
QTextStream proStr(&contents);
|
||||
QtProjectParameters::writeProFileHeader(proStr);
|
||||
params.writeProFile(proStr);
|
||||
proStr << "\n\nSOURCES += " << QFileInfo(sourceFileName).fileName() << '\n';
|
||||
proStr << "\n\nSOURCES += " << Utils::FileName::fromString(sourceFileName).fileName() << '\n';
|
||||
}
|
||||
profile.setContents(contents);
|
||||
return Core::GeneratedFiles() << source << profile;
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QTextStream>
|
||||
#include <QFileInfo>
|
||||
#include <QSharedPointer>
|
||||
|
||||
static const char mainSourceFileC[] = "main";
|
||||
@@ -195,11 +194,11 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w,
|
||||
QTextStream proStr(&contents);
|
||||
QtProjectParameters::writeProFileHeader(proStr);
|
||||
projectParams.writeProFile(proStr);
|
||||
proStr << "\n\nSOURCES += " << QFileInfo(mainSourceFileName).fileName()
|
||||
<< "\\\n " << QFileInfo(formSource.path()).fileName()
|
||||
<< "\n\nHEADERS += " << QFileInfo(formHeader.path()).fileName();
|
||||
proStr << "\n\nSOURCES += " << Utils::FileName::fromString(mainSourceFileName).fileName()
|
||||
<< "\\\n " << Utils::FileName::fromString(formSource.path()).fileName()
|
||||
<< "\n\nHEADERS += " << Utils::FileName::fromString(formHeader.path()).fileName();
|
||||
if (params.designerForm)
|
||||
proStr << "\n\nFORMS += " << QFileInfo(form->path()).fileName();
|
||||
proStr << "\n\nFORMS += " << Utils::FileName::fromString(form->path()).fileName();
|
||||
if (params.isMobileApplication) {
|
||||
proStr << "\n\nCONFIG += mobility"
|
||||
<< "\nMOBILITY = "
|
||||
|
@@ -35,7 +35,8 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QTextStream>
|
||||
#include <QCoreApplication>
|
||||
|
||||
@@ -96,12 +97,12 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
|
||||
source.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||
|
||||
const QString headerFileFullName = buildFileName(projectPath, params.headerFileName, headerSuffix());
|
||||
const QString headerFileName = QFileInfo(headerFileFullName).fileName();
|
||||
const QString headerFileName = Utils::FileName::fromString(headerFileFullName).fileName();
|
||||
QString pluginJsonFileFullName;
|
||||
QString pluginJsonFileName;
|
||||
if (projectParams.type == QtProjectParameters::Qt4Plugin) {
|
||||
pluginJsonFileFullName = buildFileName(projectPath, projectParams.fileName, QLatin1String("json"));
|
||||
pluginJsonFileName = QFileInfo(pluginJsonFileFullName).fileName();
|
||||
pluginJsonFileName = Utils::FileName::fromString(pluginJsonFileFullName).fileName();
|
||||
}
|
||||
|
||||
Core::GeneratedFile header(headerFileFullName);
|
||||
@@ -111,7 +112,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
|
||||
if (projectParams.type == QtProjectParameters::SharedLibrary) {
|
||||
const QString globalHeaderName = buildFileName(projectPath, projectParams.fileName.toLower() + QLatin1String(sharedHeaderPostfixC), headerSuffix());
|
||||
Core::GeneratedFile globalHeader(globalHeaderName);
|
||||
globalHeaderFileName = QFileInfo(globalHeader.path()).fileName();
|
||||
globalHeaderFileName = Utils::FileName::fromString(globalHeader.path()).fileName();
|
||||
globalHeader.setContents(CppTools::AbstractEditorSupport::licenseTemplate(globalHeaderFileName)
|
||||
+ LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.fileName, sharedLibExportMacro));
|
||||
rc.push_back(globalHeader);
|
||||
@@ -138,7 +139,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
|
||||
QTextStream proStr(&profileContents);
|
||||
QtProjectParameters::writeProFileHeader(proStr);
|
||||
projectParams.writeProFile(proStr);
|
||||
proStr << "\nSOURCES += " << QFileInfo(source.path()).fileName()
|
||||
proStr << "\nSOURCES += " << Utils::FileName::fromString(source.path()).fileName()
|
||||
<< "\n\nHEADERS += " << headerFileName;
|
||||
if (!globalHeaderFileName.isEmpty())
|
||||
proStr << "\\\n " << globalHeaderFileName << '\n';
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -175,7 +176,7 @@ Core::GeneratedFiles TestWizard::generateFiles(const QWizard *w, QString *errorM
|
||||
QTextStream proStr(&contents);
|
||||
QtProjectParameters::writeProFileHeader(proStr);
|
||||
projectParams.writeProFile(proStr);
|
||||
proStr << "\n\nSOURCES += " << QFileInfo(sourceFilePath).fileName() << '\n'
|
||||
proStr << "\n\nSOURCES += " << Utils::FileName::fromString(sourceFilePath).fileName() << '\n'
|
||||
<< "DEFINES += SRCDIR=\\\\\\\"$$PWD/\\\\\\\"\n";
|
||||
}
|
||||
profile.setContents(contents);
|
||||
|
@@ -31,6 +31,8 @@
|
||||
#include "pluginpath.h"
|
||||
#include "pluginmanager.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <iplugin.h>
|
||||
#include <QLibrary>
|
||||
#include <QPluginLoader>
|
||||
@@ -173,7 +175,7 @@ QStandardItem *PluginPath::createModelItem()
|
||||
QStandardItem *failedCategory = 0;
|
||||
const auto end = m_plugins.end();
|
||||
for (auto it = m_plugins.begin(); it != end; ++it) {
|
||||
QStandardItem *pluginItem = new QStandardItem(QFileInfo(it->path).fileName());
|
||||
QStandardItem *pluginItem = new QStandardItem(Utils::FileName::fromString(it->path).fileName());
|
||||
if (instance(*it)) {
|
||||
pluginItem->appendRow(new QStandardItem(QString::fromUtf8(it->instanceGuard->metaObject()->className())));
|
||||
pathItem->appendRow(pluginItem);
|
||||
|
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "widgetpluginpath.h"
|
||||
#include <iwidgetplugin.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QLibrary>
|
||||
#include <QPluginLoader>
|
||||
#include <QFileInfo>
|
||||
@@ -192,7 +195,7 @@ QStandardItem *WidgetPluginPath::createModelItem()
|
||||
QStandardItem *failedCategory = 0;
|
||||
const auto end = m_plugins.end();
|
||||
for (auto it = m_plugins.begin(); it != end; ++it) {
|
||||
QStandardItem *pluginItem = new QStandardItem(QFileInfo(it->path).fileName());
|
||||
QStandardItem *pluginItem = new QStandardItem(Utils::FileName::fromString(it->path).fileName());
|
||||
if (instance(*it)) {
|
||||
pluginItem->appendRow(new QStandardItem(QString::fromUtf8(it->instanceGuard->metaObject()->className())));
|
||||
pathItem->appendRow(pluginItem);
|
||||
|
@@ -35,7 +35,6 @@
|
||||
//#include <qmljs/qmljsinterpreter.h>
|
||||
#include <qmljs/parser/qmljsast_p.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QMutexLocker>
|
||||
|
||||
using namespace QmlJSTools::Internal;
|
||||
@@ -75,7 +74,7 @@ public:
|
||||
if (!doc->componentName().isEmpty())
|
||||
m_documentContext = doc->componentName();
|
||||
else
|
||||
m_documentContext = QFileInfo(doc->fileName()).fileName();
|
||||
m_documentContext = Utils::FileName::fromString(doc->fileName()).fileName();
|
||||
accept(doc->ast(), m_documentContext);
|
||||
return m_entries;
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include "filefilteritems.h"
|
||||
|
||||
#include <utils/filesystemwatcher.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDebug>
|
||||
@@ -179,7 +180,7 @@ bool FileFilterBaseItem::matchesFile(const QString &filePath) const
|
||||
return true;
|
||||
}
|
||||
|
||||
const QString &fileName = QFileInfo(filePath).fileName();
|
||||
const QString &fileName = Utils::FileName::fromString(filePath).fileName();
|
||||
|
||||
if (!fileMatches(fileName))
|
||||
return false;
|
||||
|
@@ -99,7 +99,7 @@ QString BarDescriptorDocument::defaultPath() const
|
||||
|
||||
QString BarDescriptorDocument::suggestedFileName() const
|
||||
{
|
||||
return filePath().toFileInfo().fileName();
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
bool BarDescriptorDocument::shouldAutoSave() const
|
||||
|
@@ -101,7 +101,7 @@ void BarDescriptorEditorAssetsWidget::addAsset(const QString &fullPath)
|
||||
|
||||
BarDescriptorAsset asset;
|
||||
asset.source = fullPath;
|
||||
asset.destination = QFileInfo(fullPath).fileName();
|
||||
asset.destination = Utils::FileName::fromString(fullPath).fileName();
|
||||
asset.entry = false;
|
||||
addAsset(asset);
|
||||
}
|
||||
|
@@ -111,11 +111,11 @@ void BarDescriptorEditorEntryPointWidget::updateWidgetValue(BarDescriptorDocumen
|
||||
void BarDescriptorEditorEntryPointWidget::emitChanged(BarDescriptorDocument::Tag tag)
|
||||
{
|
||||
if (tag == BarDescriptorDocument::icon) {
|
||||
emit changed(tag, QFileInfo(m_ui->iconFilePath->path()).fileName());
|
||||
emit changed(tag, Utils::FileName::fromString(m_ui->iconFilePath->path()).fileName());
|
||||
} else if (tag == BarDescriptorDocument::splashScreens) {
|
||||
QStringList list;
|
||||
foreach (const QString &splashScreen, m_splashScreenModel->stringList())
|
||||
list << QFileInfo(splashScreen).fileName();
|
||||
list << Utils::FileName::fromString(splashScreen).fileName();
|
||||
|
||||
emit changed(tag, list);
|
||||
} else {
|
||||
|
@@ -43,8 +43,6 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
using namespace Qnx;
|
||||
@@ -72,7 +70,7 @@ QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig,
|
||||
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
|
||||
const QString applicationId = QFileInfo(runConfig->remoteExecutableFilePath()).fileName();
|
||||
const QString applicationId = Utils::FileName::fromString(runConfig->remoteExecutableFilePath()).fileName();
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(showMessage(QString,Utils::OutputFormat)));
|
||||
connect(runner, SIGNAL(remoteProcessStarted()), m_slog2Info, SLOT(start()));
|
||||
|
@@ -46,8 +46,6 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
@@ -73,7 +71,7 @@ QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::Debug
|
||||
connect(m_runControl, &Debugger::DebuggerRunControl::requestRemoteSetup,
|
||||
this, &QnxDebugSupport::handleAdapterSetupRequested);
|
||||
|
||||
const QString applicationId = QFileInfo(runConfig->remoteExecutableFilePath()).fileName();
|
||||
const QString applicationId = Utils::FileName::fromString(runConfig->remoteExecutableFilePath()).fileName();
|
||||
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
|
||||
|
@@ -39,8 +39,6 @@
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
using namespace RemoteLinux;
|
||||
@@ -55,7 +53,7 @@ QnxRunControl::QnxRunControl(ProjectExplorer::RunConfiguration *runConfig)
|
||||
QnxRunConfiguration *qnxRunConfig = qobject_cast<QnxRunConfiguration *>(runConfig);
|
||||
QTC_CHECK(qnxRunConfig);
|
||||
|
||||
const QString applicationId = QFileInfo(qnxRunConfig->remoteExecutableFilePath()).fileName();
|
||||
const QString applicationId = Utils::FileName::fromString(qnxRunConfig->remoteExecutableFilePath()).fileName();
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(appendMessage(QString,Utils::OutputFormat)));
|
||||
connect(this, SIGNAL(started()), m_slog2Info, SLOT(start()));
|
||||
|
@@ -30,12 +30,13 @@
|
||||
|
||||
#include "screenshotcropper.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace QtSupport {
|
||||
namespace Internal {
|
||||
@@ -57,7 +58,7 @@ Q_GLOBAL_STATIC(AreasOfInterest, welcomeScreenAreas)
|
||||
|
||||
static inline QString fileNameForPath(const QString &path)
|
||||
{
|
||||
return QFileInfo(path).fileName();
|
||||
return Utils::FileName::fromString(path).fileName();
|
||||
}
|
||||
|
||||
static QRect cropRectForAreaOfInterest(const QSize &imageSize, const QSize &cropSize, const QRect &areaOfInterest)
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <projectexplorer/deployablefile.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QString>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -115,7 +114,7 @@ void AbstractUploadAndInstallPackageService::doDeploy()
|
||||
QTC_ASSERT(d->state == Inactive, return);
|
||||
|
||||
d->state = Uploading;
|
||||
const QString fileName = QFileInfo(packageFilePath()).fileName();
|
||||
const QString fileName = Utils::FileName::fromString(packageFilePath()).fileName();
|
||||
const QString remoteFilePath = uploadDir() + QLatin1Char('/') + fileName;
|
||||
connect(d->uploader, SIGNAL(progress(QString)), SIGNAL(progressMessage(QString)));
|
||||
connect(d->uploader, SIGNAL(uploadFinished(QString)), SLOT(handleUploadFinished(QString)));
|
||||
@@ -151,7 +150,7 @@ void AbstractUploadAndInstallPackageService::handleUploadFinished(const QString
|
||||
|
||||
emit progressMessage(tr("Successfully uploaded package file."));
|
||||
const QString remoteFilePath = uploadDir() + QLatin1Char('/')
|
||||
+ QFileInfo(packageFilePath()).fileName();
|
||||
+ Utils::FileName::fromString(packageFilePath()).fileName();
|
||||
d->state = Installing;
|
||||
emit progressMessage(tr("Installing package to device..."));
|
||||
connect(packageInstaller(), SIGNAL(stdoutData(QString)), SIGNAL(stdOutData(QString)));
|
||||
|
@@ -256,7 +256,7 @@ bool ResourceTopLevelNode::removePrefix(const QString &prefix, const QString &la
|
||||
ProjectExplorer::FolderNode::AddNewInformation ResourceTopLevelNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
QString name = QCoreApplication::translate("ResourceTopLevelNode", "%1 Prefix: %2")
|
||||
.arg(QFileInfo(path()).fileName())
|
||||
.arg(Utils::FileName::fromString(path()).fileName())
|
||||
.arg(QLatin1Char('/'));
|
||||
|
||||
int p = -1;
|
||||
@@ -390,7 +390,7 @@ bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang
|
||||
ProjectExplorer::FolderNode::AddNewInformation ResourceFolderNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
QString name = QCoreApplication::translate("ResourceTopLevelNode", "%1 Prefix: %2")
|
||||
.arg(QFileInfo(m_topLevelNode->path()).fileName())
|
||||
.arg(Utils::FileName::fromString(m_topLevelNode->path()).fileName())
|
||||
.arg(displayName());
|
||||
|
||||
int p = -1; // never the default
|
||||
|
@@ -32,10 +32,10 @@
|
||||
#include "textdocument.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/itemviews.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QTextCodec>
|
||||
#include <QPushButton>
|
||||
#include <QScrollBar>
|
||||
@@ -79,7 +79,7 @@ CodecSelector::CodecSelector(QWidget *parent, TextDocument *doc)
|
||||
if (m_hasDecodingError)
|
||||
decodingErrorHint = QLatin1Char('\n') + tr("The following encodings are likely to fit:");
|
||||
m_label->setText(tr("Select encoding for \"%1\".%2")
|
||||
.arg(doc->filePath().toFileInfo().fileName())
|
||||
.arg(doc->filePath().fileName())
|
||||
.arg(decodingErrorHint));
|
||||
|
||||
m_listWidget = new CodecListWidget(this);
|
||||
|
@@ -32,12 +32,16 @@
|
||||
#include "icodestylepreferencesfactory.h"
|
||||
#include "icodestylepreferences.h"
|
||||
#include "tabsettings.h"
|
||||
#include <utils/persistentsettings.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/persistentsettings.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace TextEditor;
|
||||
|
||||
@@ -202,7 +206,7 @@ void CodeStylePool::removeCodeStyle(ICodeStylePreferences *codeStyle)
|
||||
d->m_idToCodeStyle.remove(codeStyle->id());
|
||||
|
||||
QDir dir(settingsDir());
|
||||
dir.remove(settingsPath(codeStyle->id()).toFileInfo().fileName());
|
||||
dir.remove(settingsPath(codeStyle->id()).fileName());
|
||||
|
||||
delete codeStyle;
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "texteditor.h"
|
||||
|
||||
#include <utils/filesearch.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
@@ -78,7 +79,7 @@ QVariant FindInCurrentFile::additionalParameters() const
|
||||
|
||||
QString FindInCurrentFile::label() const
|
||||
{
|
||||
return tr("File \"%1\":").arg(m_currentDocument->filePath().toFileInfo().fileName());
|
||||
return tr("File \"%1\":").arg(m_currentDocument->filePath().fileName());
|
||||
}
|
||||
|
||||
QString FindInCurrentFile::toolTip() const
|
||||
|
@@ -31,13 +31,13 @@
|
||||
#include "fontsettings.h"
|
||||
#include "fontsettingspage.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QFont>
|
||||
#include <QSettings>
|
||||
#include <QTextCharFormat>
|
||||
@@ -117,7 +117,7 @@ bool FontSettings::fromSettings(const QString &category,
|
||||
// Load the selected color scheme
|
||||
QString scheme = s->value(group + QLatin1String(schemeFileNameKey)).toString();
|
||||
if (scheme.isEmpty() || !QFile::exists(scheme))
|
||||
scheme = defaultSchemeFileName(QFileInfo(scheme).fileName());
|
||||
scheme = defaultSchemeFileName(Utils::FileName::fromString(scheme).fileName());
|
||||
loadColorScheme(scheme, descriptions);
|
||||
} else {
|
||||
// Load color scheme from ini file
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "ui_fontsettingspage.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -562,7 +563,7 @@ void FontSettingsPage::refreshColorSchemeList()
|
||||
int selected = 0;
|
||||
|
||||
QStringList schemeList = styleDir.entryList();
|
||||
QString defaultScheme = QFileInfo(FontSettings::defaultSchemeFileName()).fileName();
|
||||
QString defaultScheme = Utils::FileName::fromString(FontSettings::defaultSchemeFileName()).fileName();
|
||||
if (schemeList.removeAll(defaultScheme))
|
||||
schemeList.prepend(defaultScheme);
|
||||
foreach (const QString &file, schemeList) {
|
||||
|
@@ -462,12 +462,12 @@ void MemcheckTool::engineStarting(const AnalyzerRunControl *engine)
|
||||
|
||||
const MemcheckRunControl *mEngine = dynamic_cast<const MemcheckRunControl *>(engine);
|
||||
QTC_ASSERT(mEngine, return);
|
||||
const QString name = QFileInfo(mEngine->executable()).fileName();
|
||||
const QString name = Utils::FileName::fromString(mEngine->executable()).fileName();
|
||||
|
||||
m_errorView->setDefaultSuppressionFile(dir + name + QLatin1String(".supp"));
|
||||
|
||||
foreach (const QString &file, mEngine->suppressionFiles()) {
|
||||
QAction *action = m_filterMenu->addAction(QFileInfo(file).fileName());
|
||||
QAction *action = m_filterMenu->addAction(Utils::FileName::fromString(file).fileName());
|
||||
action->setToolTip(file);
|
||||
action->setData(file);
|
||||
connect(action, SIGNAL(triggered(bool)),
|
||||
|
@@ -31,13 +31,13 @@
|
||||
|
||||
#include "valgrindprocess.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QEventLoop>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QEventLoop>
|
||||
|
||||
namespace Valgrind {
|
||||
|
||||
ValgrindProcess::ValgrindProcess(bool isLocal, const QSsh::SshConnectionParameters &sshParams,
|
||||
@@ -282,7 +282,7 @@ void ValgrindProcess::remoteProcessStarted()
|
||||
" | tail -n 1" // limit to single process
|
||||
// we pick the last one, first would be "bash -c ..."
|
||||
" | awk '{print $1;}'" // get pid
|
||||
).arg(proc, QFileInfo(m_remote.m_debuggee).fileName());
|
||||
).arg(proc, Utils::FileName::fromString(m_remote.m_debuggee).fileName());
|
||||
|
||||
m_remote.m_findPID = m_remote.m_connection->createRemoteProcess(cmd.toUtf8());
|
||||
connect(m_remote.m_findPID.data(), SIGNAL(readyReadStandardError()),
|
||||
|
@@ -507,7 +507,7 @@ QString VcsBaseClient::vcsEditorTitle(const QString &vcsCmd, const QString &sour
|
||||
const Utils::FileName binary = settings()->binaryPath();
|
||||
return binary.toFileInfo().baseName() +
|
||||
QLatin1Char(' ') + vcsCmd + QLatin1Char(' ') +
|
||||
QFileInfo(sourceId).fileName();
|
||||
Utils::FileName::fromString(sourceId).fileName();
|
||||
}
|
||||
|
||||
VcsBaseEditorWidget *VcsBaseClient::createVcsEditor(Core::Id kind, QString title,
|
||||
|
@@ -851,7 +851,7 @@ void VcsBaseEditorWidget::slotPopulateDiffBrowser()
|
||||
lastFileName = file;
|
||||
// ignore any headers
|
||||
d->m_entrySections.push_back(d->m_entrySections.empty() ? 0 : lineNumber);
|
||||
entriesComboBox->addItem(QFileInfo(file).fileName());
|
||||
entriesComboBox->addItem(Utils::FileName::fromString(file).fileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user