Commit 679d15f4 authored by Friedemann Kleint's avatar Friedemann Kleint

Fixes: Remove "Class" prefix from UI-classes generated by the gui app wizards;...

Fixes: Remove "Class" prefix from UI-classes generated by the gui app wizards; give new item dialog home path as default when creating files out of project contexts.
parent d5fb9e10
......@@ -2,7 +2,7 @@
#include "%UI_HDR%"
%CLASS%::%CLASS%(QWidget *parent)
: %BASECLASS%(parent), ui(new Ui::%CLASS%Class)
: %BASECLASS%(parent), ui(new Ui::%CLASS%)
{
ui->setupUi(this);
}
......
......@@ -5,7 +5,7 @@
namespace Ui
{
class %CLASS%Class;
class %CLASS%;
}
class %CLASS% : public %BASECLASS%
......@@ -17,7 +17,7 @@ public:
~%CLASS%();
private:
Ui::%CLASS%Class *ui;
Ui::%CLASS% *ui;
};
#endif // %PRE_DEF%
<ui version="4.0">
<class>%CLASS%Class</class>
<widget class="%BASECLASS%" name="%CLASS%Class" >
<widget class="%BASECLASS%" name="%CLASS%" >
<property name="geometry" >
<rect>
<x>0</x>
......
......@@ -65,6 +65,7 @@
#include "basefilewizard.h"
#include <coreplugin/findplaceholder.h>
#include <utils/pathchooser.h>
#include <extensionsystem/pluginmanager.h>
#include <QtCore/QDebug>
......@@ -836,10 +837,10 @@ QStringList MainWindow::showNewItemDialog(const QString &title,
const QString &defaultLocation)
{
QString defaultDir = defaultLocation;
if (defaultDir.isEmpty()) {
if (!m_coreImpl->fileManager()->currentFile().isEmpty())
defaultDir = QFileInfo(m_coreImpl->fileManager()->currentFile()).absolutePath();
}
if (defaultDir.isEmpty() && !m_coreImpl->fileManager()->currentFile().isEmpty())
defaultDir = QFileInfo(m_coreImpl->fileManager()->currentFile()).absolutePath();
if (defaultDir.isEmpty())
defaultDir = Core::Utils::PathChooser::homePath();
// Scan for wizards matching the filter and pick one. Don't show
// dialog if there is only one.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment