Commit 017e213b authored by con's avatar con
Browse files

Merge branch '0.9.2-rc1'

parents 7d63307b ba8513a0
......@@ -116,8 +116,6 @@ QWidget *ShortcutSettings::createPage(QWidget *parent)
commandChanged(0);
delete m_page;
return w;
}
......@@ -131,6 +129,8 @@ void ShortcutSettings::finish()
{
qDeleteAll(m_scitems);
m_scitems.clear();
delete m_page;
}
bool ShortcutSettings::eventFilter(QObject *o, QEvent *e)
......
......@@ -77,7 +77,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
this, SLOT(resetExternalEditor()));
connect(m_page->helpExternalEditorButton, SIGNAL(clicked()),
this, SLOT(showHelpForExternalEditor()));
delete m_page;
return w;
}
......@@ -88,6 +88,11 @@ void GeneralSettings::apply()
EditorManager::instance()->setExternalEditor(m_page->externalEditorEdit->text());
}
void GeneralSettings::finish()
{
delete m_page;
}
void GeneralSettings::resetInterfaceColor()
{
m_page->colorButton->setColor(0x666666);
......
......@@ -56,7 +56,7 @@ public:
QString trCategory() const;
QWidget* createPage(QWidget *parent);
void apply();
void finish() { }
void finish();
private slots:
void resetInterfaceColor();
......
......@@ -598,7 +598,9 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
if (ReferenceType *refTy = ty->asReferenceType())
ty = refTy->elementType();
if (NamedType *namedTy = ty->asNamedType()) {
if (Class *classTy = ty->asClass()) {
classObjectCandidates.append(classTy);
} else if (NamedType *namedTy = ty->asNamedType()) {
// ### This code is pretty slow.
const QList<Symbol *> candidates = context.resolve(namedTy->name());
foreach (Symbol *candidate, candidates) {
......@@ -689,12 +691,16 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
}
if (PointerType *ptrTy = ty->asPointerType()) {
// Replace . with ->
int length = m_editor->position() - m_startPosition + 1;
m_editor->setCurPos(m_startPosition - 1);
m_editor->replace(length, QLatin1String("->"));
++m_startPosition;
namedTy = ptrTy->elementType()->asNamedType();
if (ptrTy->elementType()->isNamedType()) {
// Replace . with ->
int length = m_editor->position() - m_startPosition + 1;
m_editor->setCurPos(m_startPosition - 1);
m_editor->replace(length, QLatin1String("->"));
++m_startPosition;
namedTy = ptrTy->elementType()->asNamedType();
}
} else if (Class *classTy = ty->asClass()) {
classObjectCandidates.append(classTy);
} else {
namedTy = ty->asNamedType();
if (! namedTy) {
......
......@@ -108,7 +108,11 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
addObject(m_factory);
// Make sure settings pages and action shortcuts are registered
FormEditorW::ensureInitStage(FormEditorW::RegisterPlugins);
// TODO we don't want to do a full initialization here,
// we actually want to call ensureInitStage(FormEditorW::RegisterPlugins)
// But due to a bug in kde 4.2.0 this crashes then when opening the file dialog
// This should be removed after 4.2.1 is out
FormEditorW::ensureInitStage(FormEditorW::FullyInitialized);
error->clear();
return true;
......
......@@ -76,6 +76,9 @@ void SearchResultTreeView::appendResultLine(int index, const QString &fileName,
void SearchResultTreeView::emitJumpToSearchResult(const QModelIndex &index)
{
if (model()->data(index, ItemDataRoles::TypeRole).toString().compare("row") != 0)
return;
QString fileName = model()->data(index, ItemDataRoles::FileNameRole).toString();
int position = model()->data(index, ItemDataRoles::ResultIndexRole).toInt();
int lineNumber = model()->data(index, ItemDataRoles::ResultLineNumberRole).toInt();
......
......@@ -527,6 +527,9 @@ void SessionManager::setStartupProject(Project *startupProject)
Q_ASSERT(m_file->m_projects.contains(startupProject));
}
if (m_file->m_startupProject == startupProject)
return;
m_file->m_startupProject = startupProject;
emit startupProjectChanged(startupProject);
}
......
......@@ -38,9 +38,11 @@
#include <QtCore/QStringList>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class QWidget;
class QLabel;
class QLineEdit;
QT_END_NAMESPACE
namespace Qt4ProjectManager {
......
......@@ -413,7 +413,7 @@ QStringList ResourceView::fileNamesToAdd()
{
return QFileDialog::getOpenFileNames(this, tr("Open file"),
m_qrcModel->absolutePath(QString()),
tr("All files (*.*)"));
tr("All files (*)"));
}
void ResourceView::onAddFiles()
......
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