Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5b8cff20
Commit
5b8cff20
authored
Dec 12, 2008
by
mae
Browse files
Merge branch '0.9.1-beta' of git@scm.dev.nokia.troll.no:creator/mainline into 0.9.1-beta
parents
ac36fac1
7d24f921
Changes
20
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/inavigationwidgetfactory.cpp
View file @
5b8cff20
...
...
@@ -48,3 +48,13 @@ QKeySequence INavigationWidgetFactory::activationSequence()
return
QKeySequence
();
}
void
INavigationWidgetFactory
::
saveSettings
(
int
position
,
QWidget
*
widget
)
{
}
void
INavigationWidgetFactory
::
restoreSettings
(
int
position
,
QWidget
*
widget
)
{
}
src/plugins/coreplugin/inavigationwidgetfactory.h
View file @
5b8cff20
...
...
@@ -65,6 +65,12 @@ public:
// and the docktoolbar widgets
// Similar to how IView
virtual
NavigationView
createWidget
()
=
0
;
// Read and store settings for the widget, created by this factory
// and beeing at position position. (The position is important since
// a certain type of widget could exist multiple times.)
virtual
void
saveSettings
(
int
position
,
QWidget
*
widget
);
virtual
void
restoreSettings
(
int
position
,
QWidget
*
widget
);
};
}
// namespace Core
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
5b8cff20
...
...
@@ -997,7 +997,7 @@ void MainWindow::readSettings()
m_settings
->
endGroup
();
m_editorManager
->
readSettings
(
m_settings
);
m_navigationWidget
->
re
ad
Settings
(
m_settings
);
m_navigationWidget
->
re
store
Settings
(
m_settings
);
m_rightPaneWidget
->
readSettings
(
m_settings
);
}
...
...
src/plugins/coreplugin/navigationwidget.cpp
View file @
5b8cff20
...
...
@@ -220,6 +220,8 @@ void NavigationWidget::close()
}
}
void
NavigationWidget
::
saveSettings
(
QSettings
*
settings
)
{
QStringList
views
;
...
...
@@ -230,9 +232,12 @@ void NavigationWidget::saveSettings(QSettings *settings)
settings
->
setValue
(
"Navigation/Visible"
,
isShown
());
settings
->
setValue
(
"Navigation/VerticalPosition"
,
saveState
());
settings
->
setValue
(
"Navigation/Width"
,
m_width
);
for
(
int
i
=
0
;
i
<
m_subWidgets
.
count
();
++
i
)
m_subWidgets
.
at
(
i
)
->
saveSettings
(
i
);
}
void
NavigationWidget
::
re
ad
Settings
(
QSettings
*
settings
)
void
NavigationWidget
::
re
store
Settings
(
QSettings
*
settings
)
{
if
(
settings
->
contains
(
"Navigation/Views"
))
{
QStringList
views
=
settings
->
value
(
"Navigation/Views"
).
toStringList
();
...
...
@@ -266,6 +271,9 @@ void NavigationWidget::readSettings(QSettings *settings)
if
(
NavigationWidgetPlaceHolder
::
m_current
)
{
NavigationWidgetPlaceHolder
::
m_current
->
applyStoredSize
(
m_width
);
}
for
(
int
i
=
0
;
i
<
m_subWidgets
.
count
();
++
i
)
m_subWidgets
.
at
(
i
)
->
restoreSettings
(
i
);
}
void
NavigationWidget
::
setShown
(
bool
b
)
...
...
@@ -469,6 +477,16 @@ INavigationWidgetFactory *NavigationSubWidget::factory()
return
m_navigationComboBox
->
itemData
(
index
).
value
<
INavigationWidgetFactory
*>
();
}
void
NavigationSubWidget
::
saveSettings
(
int
position
)
{
factory
()
->
saveSettings
(
position
,
m_navigationWidget
);
}
void
NavigationSubWidget
::
restoreSettings
(
int
position
)
{
factory
()
->
restoreSettings
(
position
,
m_navigationWidget
);
}
Core
::
ICommand
*
NavigationSubWidget
::
command
(
const
QString
&
title
)
const
{
const
QHash
<
QString
,
Core
::
ICommand
*>
commandMap
=
m_parentWidget
->
commandMap
();
...
...
src/plugins/coreplugin/navigationwidget.h
View file @
5b8cff20
...
...
@@ -84,7 +84,7 @@ public:
~
NavigationWidget
();
void
saveSettings
(
QSettings
*
settings
);
void
re
ad
Settings
(
QSettings
*
settings
);
void
re
store
Settings
(
QSettings
*
settings
);
bool
isShown
()
const
;
void
setShown
(
bool
b
);
...
...
@@ -133,6 +133,9 @@ public:
void
setFactory
(
const
QString
&
name
);
void
setFocusWidget
();
void
saveSettings
(
int
position
);
void
restoreSettings
(
int
position
);
Core
::
ICommand
*
command
(
const
QString
&
title
)
const
;
signals:
...
...
src/plugins/cpptools/cppcodecompletion.cpp
View file @
5b8cff20
...
...
@@ -966,8 +966,10 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
if
(
Function
*
function
=
symbol
->
type
()
->
asFunction
())
{
// If the member is a function, automatically place the opening parenthesis,
// except when it might take template parameters.
if
(
!
function
->
returnType
().
isValid
()
&&
(
function
->
identity
()
&&
!
function
->
identity
()
->
isDestructorNameId
()))
{
const
bool
hasReturnType
=
function
->
returnType
().
isValid
()
||
function
->
returnType
().
isSigned
()
||
function
->
returnType
().
isUnsigned
();
if
(
!
hasReturnType
&&
(
function
->
identity
()
&&
!
function
->
identity
()
->
isDestructorNameId
()))
{
// Don't insert any magic, since the user might have just wanted to select the class
}
else
if
(
function
->
templateParameterCount
()
!=
0
)
{
...
...
src/plugins/projectexplorer/allprojectsfilter.h
View file @
5b8cff20
...
...
@@ -55,8 +55,8 @@ class AllProjectsFilter : public QuickOpen::BaseFileFilter
public:
AllProjectsFilter
(
ProjectExplorerPlugin
*
pe
,
Core
::
ICore
*
core
);
QString
trName
()
const
{
return
tr
(
"File in any project"
);
}
QString
name
()
const
{
return
"File in any project"
;
}
QString
trName
()
const
{
return
tr
(
"File
s
in any project"
);
}
QString
name
()
const
{
return
"File
s
in any project"
;
}
QuickOpen
::
IQuickOpenFilter
::
Priority
priority
()
const
{
return
QuickOpen
::
IQuickOpenFilter
::
Low
;
}
void
refresh
(
QFutureInterface
<
void
>
&
future
);
...
...
src/plugins/projectexplorer/currentprojectfilter.h
View file @
5b8cff20
...
...
@@ -55,8 +55,8 @@ class CurrentProjectFilter : public QuickOpen::BaseFileFilter
public:
CurrentProjectFilter
(
ProjectExplorerPlugin
*
pe
,
Core
::
ICore
*
core
);
QString
trName
()
const
{
return
tr
(
"File in current project"
);
}
QString
name
()
const
{
return
"File in current project"
;
}
QString
trName
()
const
{
return
tr
(
"File
s
in current project"
);
}
QString
name
()
const
{
return
"File
s
in current project"
;
}
QuickOpen
::
IQuickOpenFilter
::
Priority
priority
()
const
{
return
QuickOpen
::
IQuickOpenFilter
::
Low
;
}
void
refresh
(
QFutureInterface
<
void
>
&
future
);
...
...
src/plugins/projectexplorer/projectmodels.cpp
View file @
5b8cff20
...
...
@@ -926,6 +926,16 @@ void FlatModel::setGeneratedFilesFilterEnabled(bool filter)
reset
();
}
bool
FlatModel
::
projectFilterEnabled
()
{
return
m_filterProjects
;
}
bool
FlatModel
::
generatedFilesFilterEnabled
()
{
return
m_filterGeneratedFiles
;
}
Node
*
FlatModel
::
nodeForIndex
(
const
QModelIndex
&
index
)
const
{
if
(
index
.
isValid
())
...
...
src/plugins/projectexplorer/projectmodels.h
View file @
5b8cff20
...
...
@@ -136,6 +136,9 @@ public:
ProjectExplorer
::
Node
*
nodeForIndex
(
const
QModelIndex
&
index
)
const
;
QModelIndex
indexForNode
(
const
Node
*
node
);
bool
projectFilterEnabled
();
bool
generatedFilesFilterEnabled
();
public
slots
:
void
setProjectFilterEnabled
(
bool
filter
);
void
setGeneratedFilesFilterEnabled
(
bool
filter
);
...
...
src/plugins/projectexplorer/projecttreewidget.cpp
View file @
5b8cff20
...
...
@@ -42,6 +42,7 @@
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QSettings>
#include <QtGui/QHeaderView>
#include <QtGui/QVBoxLayout>
...
...
@@ -156,7 +157,20 @@ ProjectTreeWidget::ProjectTreeWidget(Core::ICore *core, QWidget *parent)
connect
(
m_explorer
->
session
(),
SIGNAL
(
startupProjectChanged
(
ProjectExplorer
::
Project
*
)),
this
,
SLOT
(
startupProjectChanged
(
ProjectExplorer
::
Project
*
)));
setAutoSynchronization
(
true
);
m_toggleSync
=
new
QToolButton
;
m_toggleSync
->
setProperty
(
"type"
,
"dockbutton"
);
m_toggleSync
->
setIcon
(
QIcon
(
":/qworkbench/images/linkicon.png"
));
m_toggleSync
->
setCheckable
(
true
);
m_toggleSync
->
setChecked
(
autoSynchronization
());
m_toggleSync
->
setToolTip
(
tr
(
"Synchronize with Editor"
));
connect
(
m_toggleSync
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toggleAutoSynchronization
()));
//setAutoSynchronization(true);
}
QToolButton
*
ProjectTreeWidget
::
toggleSync
()
{
return
m_toggleSync
;
}
void
ProjectTreeWidget
::
toggleAutoSynchronization
()
...
...
@@ -171,6 +185,7 @@ bool ProjectTreeWidget::autoSynchronization() const
void
ProjectTreeWidget
::
setAutoSynchronization
(
bool
sync
,
bool
syncNow
)
{
m_toggleSync
->
setChecked
(
sync
);
if
(
sync
==
m_autoSync
)
return
;
...
...
@@ -296,6 +311,17 @@ void ProjectTreeWidget::setGeneratedFilesFilter(bool filter)
m_filterGeneratedFilesAction
->
setChecked
(
filter
);
}
bool
ProjectTreeWidget
::
generatedFilesFilter
()
{
return
m_model
->
generatedFilesFilterEnabled
();
}
bool
ProjectTreeWidget
::
projectFilter
()
{
return
m_model
->
projectFilterEnabled
();
}
ProjectTreeWidgetFactory
::
ProjectTreeWidgetFactory
(
Core
::
ICore
*
core
)
:
m_core
(
core
)
{
...
...
@@ -331,15 +357,24 @@ Core::NavigationView ProjectTreeWidgetFactory::createWidget()
filterMenu
->
addAction
(
ptw
->
m_filterGeneratedFilesAction
);
filter
->
setMenu
(
filterMenu
);
QToolButton
*
toggleSync
=
new
QToolButton
;
toggleSync
->
setProperty
(
"type"
,
"dockbutton"
);
toggleSync
->
setIcon
(
QIcon
(
":/qworkbench/images/linkicon.png"
));
toggleSync
->
setCheckable
(
true
);
toggleSync
->
setChecked
(
ptw
->
autoSynchronization
());
toggleSync
->
setToolTip
(
tr
(
"Synchronize with Editor"
));
connect
(
toggleSync
,
SIGNAL
(
clicked
(
bool
)),
ptw
,
SLOT
(
toggleAutoSynchronization
()));
n
.
doockToolBarWidgets
<<
filter
<<
toggleSync
;
n
.
doockToolBarWidgets
<<
filter
<<
ptw
->
toggleSync
();
return
n
;
}
void
ProjectTreeWidgetFactory
::
saveSettings
(
int
position
,
QWidget
*
widget
)
{
ProjectTreeWidget
*
ptw
=
qobject_cast
<
ProjectTreeWidget
*>
(
widget
);
Q_ASSERT
(
ptw
);
m_core
->
settings
()
->
setValue
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".ProjectFilter"
,
ptw
->
projectFilter
());
m_core
->
settings
()
->
setValue
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".GeneratedFilter"
,
ptw
->
generatedFilesFilter
());
m_core
->
settings
()
->
setValue
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".SyncWithEditor"
,
ptw
->
autoSynchronization
());
}
void
ProjectTreeWidgetFactory
::
restoreSettings
(
int
position
,
QWidget
*
widget
)
{
ProjectTreeWidget
*
ptw
=
qobject_cast
<
ProjectTreeWidget
*>
(
widget
);
Q_ASSERT
(
ptw
);
ptw
->
setProjectFilter
(
m_core
->
settings
()
->
value
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".ProjectFilter"
,
false
).
toBool
());
ptw
->
setGeneratedFilesFilter
(
m_core
->
settings
()
->
value
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".GeneratedFilter"
,
true
).
toBool
());
ptw
->
setAutoSynchronization
(
m_core
->
settings
()
->
value
(
"ProjectTreeWidget."
+
QString
::
number
(
position
)
+
".SyncWithEditor"
,
true
).
toBool
());
}
src/plugins/projectexplorer/projecttreewidget.h
View file @
5b8cff20
...
...
@@ -60,6 +60,9 @@ public:
bool
autoSynchronization
()
const
;
void
setAutoSynchronization
(
bool
sync
,
bool
syncNow
=
true
);
bool
projectFilter
();
bool
generatedFilesFilter
();
QToolButton
*
toggleSync
();
public
slots
:
void
toggleAutoSynchronization
();
...
...
@@ -84,6 +87,7 @@ private:
FlatModel
*
m_model
;
QAction
*
m_filterProjectsAction
;
QAction
*
m_filterGeneratedFilesAction
;
QToolButton
*
m_toggleSync
;
QModelIndex
m_subIndex
;
QString
m_modelId
;
...
...
@@ -100,6 +104,8 @@ public:
virtual
QString
displayName
();
virtual
QKeySequence
activationSequence
();
virtual
Core
::
NavigationView
createWidget
();
void
restoreSettings
(
int
position
,
QWidget
*
widget
);
void
saveSettings
(
int
position
,
QWidget
*
widget
);
private:
Core
::
ICore
*
m_core
;
};
...
...
src/plugins/quickopen/directoryfilter.cpp
View file @
5b8cff20
...
...
@@ -62,7 +62,7 @@ QByteArray DirectoryFilter::saveState() const
out
<<
m_directories
;
out
<<
m_filters
;
out
<<
shortcutString
();
out
<<
defaultActiveState
();
out
<<
isIncludedByDefault
();
out
<<
m_files
;
return
value
;
}
...
...
@@ -120,7 +120,7 @@ bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
m_ui
.
directoryList
->
addItems
(
m_directories
);
m_ui
.
fileTypeEdit
->
setText
(
m_filters
.
join
(
tr
(
","
)));
m_ui
.
shortcutEdit
->
setText
(
shortcutString
());
m_ui
.
defaultFlag
->
setChecked
(
!
defaultActiveState
());
m_ui
.
defaultFlag
->
setChecked
(
!
isIncludedByDefault
());
updateOptionButtons
();
if
(
dialog
.
exec
()
==
QDialog
::
Accepted
)
{
QMutexLocker
locker
(
&
m_lock
);
...
...
src/plugins/quickopen/filesystemfilter.cpp
View file @
5b8cff20
...
...
@@ -114,7 +114,7 @@ bool FileSystemFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
ui
.
setupUi
(
&
dialog
);
ui
.
hiddenFilesFlag
->
setChecked
(
m_includeHidden
);
ui
.
limitCheck
->
setChecked
(
!
defaultActiveState
());
ui
.
limitCheck
->
setChecked
(
!
isIncludedByDefault
());
ui
.
shortcutEdit
->
setText
(
shortcutString
());
if
(
dialog
.
exec
()
==
QDialog
::
Accepted
)
{
...
...
@@ -132,7 +132,7 @@ QByteArray FileSystemFilter::saveState() const
QDataStream
out
(
&
value
,
QIODevice
::
WriteOnly
);
out
<<
m_includeHidden
;
out
<<
shortcutString
();
out
<<
defaultActiveState
();
out
<<
isIncludedByDefault
();
return
value
;
}
...
...
src/plugins/quickopen/filesystemfilter.h
View file @
5b8cff20
...
...
@@ -56,8 +56,8 @@ class FileSystemFilter : public QuickOpen::IQuickOpenFilter
public:
FileSystemFilter
(
Core
::
EditorManager
*
editorManager
,
QuickOpenToolWindow
*
toolWindow
);
QString
trName
()
const
{
return
tr
(
"File in file system"
);
}
QString
name
()
const
{
return
"File in file system"
;
}
QString
trName
()
const
{
return
tr
(
"File
s
in file system"
);
}
QString
name
()
const
{
return
"File
s
in file system"
;
}
QuickOpen
::
IQuickOpenFilter
::
Priority
priority
()
const
{
return
QuickOpen
::
IQuickOpenFilter
::
Medium
;
}
QList
<
QuickOpen
::
FilterEntry
>
matchesFor
(
const
QString
&
entry
);
void
accept
(
QuickOpen
::
FilterEntry
selection
)
const
;
...
...
src/plugins/quickopen/iquickopenfilter.cpp
View file @
5b8cff20
...
...
@@ -43,7 +43,9 @@
using
namespace
QuickOpen
;
IQuickOpenFilter
::
IQuickOpenFilter
(
QObject
*
parent
)
:
QObject
(
parent
)
QObject
(
parent
),
m_includedByDefault
(
false
),
m_hidden
(
false
)
{
}
...
...
@@ -62,7 +64,7 @@ QByteArray IQuickOpenFilter::saveState() const
QByteArray
value
;
QDataStream
out
(
&
value
,
QIODevice
::
WriteOnly
);
out
<<
shortcutString
();
out
<<
defaultActiveState
();
out
<<
isIncludedByDefault
();
return
value
;
}
...
...
@@ -91,7 +93,7 @@ bool IQuickOpenFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
QHBoxLayout
*
hlayout
=
new
QHBoxLayout
;
QLineEdit
*
shortcutEdit
=
new
QLineEdit
(
shortcutString
());
QCheckBox
*
limitCheck
=
new
QCheckBox
(
tr
(
"Limit to prefix"
));
limitCheck
->
setChecked
(
!
defaultActiveState
());
limitCheck
->
setChecked
(
!
isIncludedByDefault
());
hlayout
->
addWidget
(
new
QLabel
(
tr
(
"Prefix:"
)));
hlayout
->
addWidget
(
shortcutEdit
);
...
...
@@ -120,12 +122,22 @@ bool IQuickOpenFilter::isConfigurable() const
return
true
;
}
bool
IQuickOpenFilter
::
defaultActiveState
()
const
bool
IQuickOpenFilter
::
isIncludedByDefault
()
const
{
return
m_
d
efault
;
return
m_
includedByD
efault
;
}
void
IQuickOpenFilter
::
setIncludedByDefault
(
bool
includedByDefault
)
{
m_default
=
includedByDefault
;
m_includedByDefault
=
includedByDefault
;
}
bool
IQuickOpenFilter
::
isHidden
()
const
{
return
m_hidden
;
}
void
IQuickOpenFilter
::
setHidden
(
bool
hidden
)
{
m_hidden
=
hidden
;
}
src/plugins/quickopen/iquickopenfilter.h
View file @
5b8cff20
...
...
@@ -87,26 +87,25 @@ public:
IQuickOpenFilter
(
QObject
*
parent
=
0
);
virtual
~
IQuickOpenFilter
()
{}
/*
v
isible name */
/*
V
isible name
.
*/
virtual
QString
trName
()
const
=
0
;
/*
i
nternal name */
/*
I
nternal name
.
*/
virtual
QString
name
()
const
=
0
;
/*
s
election list order in case of multiple active filters (high goes on top) */
/*
S
election list order in case of multiple active filters (high goes on top)
.
*/
virtual
Priority
priority
()
const
=
0
;
/* string to type to use this filter exclusively */
virtual
QString
shortcutString
()
const
;
void
setShortcutString
(
const
QString
&
shortcut
);
/* String to type to use this filter exclusively. */
QString
shortcutString
()
const
;
/*
l
ist of matches for the given user entry */
/*
L
ist of matches for the given user entry
.
*/
virtual
QList
<
FilterEntry
>
matchesFor
(
const
QString
&
entry
)
=
0
;
/*
u
ser has selected the given entry that belongs to this filter */
/*
U
ser has selected the given entry that belongs to this filter
.
*/
virtual
void
accept
(
FilterEntry
selection
)
const
=
0
;
/*
i
mplement to update caches on user request, if that's a long operation */
/*
I
mplement to update caches on user request, if that's a long operation
.
*/
virtual
void
refresh
(
QFutureInterface
<
void
>
&
future
)
=
0
;
/* Saved state is used to restore the filter at start up. */
...
...
@@ -126,9 +125,11 @@ public:
* implementation returns true. */
virtual
bool
isConfigurable
()
const
;
/* is this filter used also when the shortcutString is not used? */
virtual
bool
defaultActiveState
()
const
;
void
setIncludedByDefault
(
bool
includedByDefault
);
/* Is this filter used also when the shortcutString is not used? */
bool
isIncludedByDefault
()
const
;
/* Returns whether the filter should be hidden from configuration and menus. */
bool
isHidden
()
const
;
static
QString
trimWildcards
(
const
QString
&
str
)
{
if
(
str
.
isEmpty
())
...
...
@@ -143,9 +144,15 @@ public:
return
str
.
mid
(
first
,
last
-
first
+
1
);
}
protected:
void
setShortcutString
(
const
QString
&
shortcut
);
void
setIncludedByDefault
(
bool
includedByDefault
);
void
setHidden
(
bool
hidden
);
private:
QString
m_shortcut
;
bool
m_default
;
bool
m_includedByDefault
;
bool
m_hidden
;
};
}
// namespace QuickOpen
...
...
src/plugins/quickopen/quickopenfiltersfilter.cpp
View file @
5b8cff20
...
...
@@ -49,7 +49,7 @@ QuickOpenFiltersFilter::QuickOpenFiltersFilter(QuickOpenPlugin *plugin,
m_icon
(
QIcon
(
Core
::
Constants
::
ICON_NEXT
))
{
setIncludedByDefault
(
true
);
set
ShortcutString
(
QString
()
);
set
Hidden
(
true
);
}
QString
QuickOpenFiltersFilter
::
trName
()
const
...
...
@@ -71,8 +71,8 @@ QList<FilterEntry> QuickOpenFiltersFilter::matchesFor(const QString &entry)
{
QList
<
FilterEntry
>
entries
;
if
(
entry
.
isEmpty
())
{
foreach
(
IQuickOpenFilter
*
filter
,
m_plugin
->
filter
())
{
if
(
!
filter
->
shortcutString
().
isEmpty
())
{
foreach
(
IQuickOpenFilter
*
filter
,
m_plugin
->
filter
())
{
if
(
!
filter
->
shortcutString
().
isEmpty
()
&&
!
filter
->
isHidden
()
)
{
FilterEntry
entry
(
this
,
filter
->
shortcutString
(),
QVariant
::
fromValue
(
filter
),
...
...
src/plugins/quickopen/quickopentoolwindow.cpp
View file @
5b8cff20
...
...
@@ -314,7 +314,7 @@ void QuickOpenToolWindow::updateFilterList()
{
m_filterMenu
->
clear
();
foreach
(
IQuickOpenFilter
*
filter
,
m_quickOpenPlugin
->
filter
())
{
if
(
!
filter
->
shortcutString
().
isEmpty
())
{
if
(
!
filter
->
shortcutString
().
isEmpty
()
&&
!
filter
->
isHidden
()
)
{
QAction
*
action
=
m_filterMenu
->
addAction
(
filter
->
trName
(),
this
,
SLOT
(
filterSelected
()));
action
->
setData
(
qVariantFromValue
(
filter
));
}
...
...
@@ -396,7 +396,7 @@ QList<IQuickOpenFilter*> QuickOpenToolWindow::filtersFor(const QString &text, QS
searchText
=
text
;
QList
<
IQuickOpenFilter
*>
activeFilters
;
foreach
(
IQuickOpenFilter
*
filter
,
filters
)
if
(
filter
->
defaultActiveState
())
if
(
filter
->
isIncludedByDefault
())
activeFilters
<<
filter
;
return
activeFilters
;
}
...
...
src/plugins/quickopen/settingspage.cpp
View file @
5b8cff20
...
...
@@ -121,8 +121,11 @@ void SettingsPage::updateFilterList()
{
m_ui
.
filterList
->
clear
();
foreach
(
IQuickOpenFilter
*
filter
,
m_filters
)
{
if
(
filter
->
isHidden
())
continue
;
QString
title
;
if
(
filter
->
defaultActiveState
())
if
(
filter
->
isIncludedByDefault
())
title
=
filter
->
trName
();
else
title
=
tr
(
"%1 (Prefix: %2)"
).
arg
(
filter
->
trName
()).
arg
(
filter
->
shortcutString
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment