Browse Source

fixes #429 : For the next release

master
Ulrich Van Den Hekke 11 years ago
parent
commit
a079b50094
  1. 4
      framework/application/mainformimpl.cpp
  2. 4
      framework/editors/abstracteditor.cpp
  3. 8
      scripts/changeFileName.js
  4. 8
      xinx/main.cpp

4
framework/application/mainformimpl.cpp

@ -852,9 +852,9 @@ void MainformImpl::updateTitle()
{
QString title = "XINX";
if (EditorManager::self()->currentEditor() && !EditorManager::self()->currentEditor()->lastFileName().isEmpty())
if (EditorManager::self()->currentEditor() && !EditorManager::self()->currentEditor()->getLongTitle().isEmpty())
{
title = "[" + EditorManager::self()->currentEditor()->lastFileName() + "] - " + title;
title = "[" + EditorManager::self()->currentEditor()->getLongTitle() + "] - " + title;
}
XinxProject::ProjectPtr selectedProject = XinxProject::Manager::self()->selectedProject().toStrongRef();

4
framework/editors/abstracteditor.cpp

@ -401,7 +401,7 @@ AbstractEditor::~AbstractEditor()
QString AbstractEditor::getTitle() const
{
if (! m_lastFileName.isEmpty())
return QFileInfo(m_lastFileName).fileName();
return QDir::toNativeSeparators(QFileInfo(m_lastFileName).fileName());
else
return defaultFileName();
}
@ -418,7 +418,7 @@ QString AbstractEditor::getTitle() const
QString AbstractEditor::getLongTitle() const
{
if (! m_lastFileName.isEmpty())
return m_lastFileName;
return QDir::toNativeSeparators(m_lastFileName);
else
return defaultFileName();
}

8
scripts/changeFileName.js

@ -13,7 +13,13 @@ obj.run = function()
{
var search = new DocumentSearch( textEdit );
var filename;
filename = editor.filename.substring( editor.filename.lastIndexOf('/') + 1 );
var index = editor.filename.lastIndexOf('/');
if (index == -1)
{
index = editor.filename.lastIndexOf('\\');
}
filename = editor.filename.substring( index + 1 );
search.options.regExp = true;
search.searchText = "(\\$RCSfile:\\s+).*(,v\\s+\\$)";

8
xinx/main.cpp

@ -93,8 +93,9 @@ void processFilesArguments(const QStringList & args)
it++;
while (it != args.constEnd())
{
if (QFile(*it).exists())
EditorManager::self()->openFile(*it);
const QString filename = QDir::fromNativeSeparators(*it);
if (QFile(filename).exists())
EditorManager::self()->openFile(filename);
it++;
}
}
@ -266,7 +267,8 @@ int main(int argc, char *argv[])
it++;
while (it != args.end())
{
if (QFile(*it).exists()) app.sendMessage(*it);
const QString filename = QDir::fromNativeSeparators(*it);
if (QFile(filename).exists()) app.sendMessage(filename);
it++;
}
}

Loading…
Cancel
Save