Skip to content
GitLab
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
a438a853
Commit
a438a853
authored
Jan 26, 2009
by
hjk
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
f4721eaa
f37360d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp
View file @
a438a853
...
...
@@ -65,13 +65,13 @@ void GdbMacrosBuildStep::run(QFutureInterface<bool> & fi)
{
QVariant
v
=
value
(
"clean"
);
if
(
v
.
isNull
()
||
v
.
toBool
()
==
false
)
{
addToOutputWindow
(
"<b>Creating gdb macros library...</b>"
);
// Normal run
QString
dumperPath
=
Core
::
ICore
::
instance
()
->
resourcePath
()
+
"/gdbmacros/"
;
QStringList
files
;
files
<<
"gdbmacros.cpp"
<<
"gdbmacros.pro"
;
QString
destDir
=
m_buildDirectory
+
"/qtc-gdbmacros/"
;
QDir
dir
;
dir
.
mkpath
(
destDir
);
...
...
@@ -124,7 +124,6 @@ void GdbMacrosBuildStep::run(QFutureInterface<bool> & fi)
qmake
.
start
(
m_qmake
,
QStringList
()
<<
"-spec"
<<
mkspec
<<
configarguments
<<
"gdbmacros.pro"
);
qmake
.
waitForFinished
();
qmake
.
start
(
qt4Project
->
qtVersion
(
m_buildConfiguration
)
->
makeCommand
(),
makeArguments
);
qmake
.
waitForFinished
();
...
...
src/plugins/texteditor/basetextdocument.cpp
View file @
a438a853
...
...
@@ -330,7 +330,7 @@ void BaseTextDocument::cleanWhitespace(QTextCursor& cursor, bool inEntireDocumen
cursor
.
movePosition
(
QTextCursor
::
PreviousCharacter
,
QTextCursor
::
KeepAnchor
,
trailing
);
cursor
.
removeSelectedText
();
}
if
(
!
m_tabSettings
.
isIndentationClean
(
blockText
))
{
if
(
m_storageSettings
.
m_cleanIndentation
&&
!
m_tabSettings
.
isIndentationClean
(
blockText
))
{
cursor
.
setPosition
(
block
.
position
());
int
firstNonSpace
=
m_tabSettings
.
firstNonSpace
(
blockText
);
if
(
firstNonSpace
==
blockText
.
length
())
{
...
...
src/plugins/texteditor/generalsettingspage.cpp
View file @
a438a853
...
...
@@ -162,6 +162,7 @@ void GeneralSettingsPage::settingsFromUI(TabSettings &rc,
storageSettings
.
m_cleanWhitespace
=
m_d
->
m_page
.
cleanWhitespace
->
isChecked
();
storageSettings
.
m_inEntireDocument
=
m_d
->
m_page
.
inEntireDocument
->
isChecked
();
storageSettings
.
m_cleanIndentation
=
m_d
->
m_page
.
cleanIndentation
->
isChecked
();
storageSettings
.
m_addFinalNewLine
=
m_d
->
m_page
.
addFinalNewLine
->
isChecked
();
displaySettings
.
m_displayLineNumbers
=
m_d
->
m_page
.
displayLineNumbers
->
isChecked
();
...
...
@@ -187,6 +188,7 @@ void GeneralSettingsPage::settingsToUI()
StorageSettings
storageSettings
=
m_d
->
m_storageSettings
;
m_d
->
m_page
.
cleanWhitespace
->
setChecked
(
storageSettings
.
m_cleanWhitespace
);
m_d
->
m_page
.
inEntireDocument
->
setChecked
(
storageSettings
.
m_inEntireDocument
);
m_d
->
m_page
.
cleanIndentation
->
setChecked
(
storageSettings
.
m_cleanIndentation
);
m_d
->
m_page
.
addFinalNewLine
->
setChecked
(
storageSettings
.
m_addFinalNewLine
);
DisplaySettings
displaySettings
=
m_d
->
m_displaySettings
;
...
...
src/plugins/texteditor/generalsettingspage.ui
View file @
a438a853
...
...
@@ -214,6 +214,36 @@
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<spacer
name=
"horizontalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
30
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"cleanIndentation"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Clean indentation
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"addFinalNewLine"
>
<property
name=
"text"
>
...
...
@@ -338,6 +368,12 @@
</hint>
</hints>
</connection>
<connection>
<sender>
cleanWhitespace
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
cleanIndentation
</receiver>
<slot>
setEnabled(bool)
</slot>
</connection>
<connection>
<sender>
showWrapColumn
</sender>
<signal>
toggled(bool)
</signal>
...
...
src/plugins/texteditor/storagesettings.cpp
View file @
a438a853
...
...
@@ -41,12 +41,14 @@ namespace TextEditor {
static
const
char
*
const
cleanWhitespaceKey
=
"cleanWhitespace"
;
static
const
char
*
const
inEntireDocumentKey
=
"inEntireDocument"
;
static
const
char
*
const
addFinalNewLineKey
=
"addFinalNewLine"
;
static
const
char
*
const
cleanIndentationKey
=
"cleanIndentation"
;
static
const
char
*
const
groupPostfix
=
"StorageSettings"
;
StorageSettings
::
StorageSettings
()
:
m_cleanWhitespace
(
true
),
m_inEntireDocument
(
false
),
m_addFinalNewLine
(
true
)
m_addFinalNewLine
(
true
),
m_cleanIndentation
(
true
)
{
}
...
...
@@ -59,6 +61,7 @@ void StorageSettings::toSettings(const QString &category, QSettings *s) const
s
->
setValue
(
QLatin1String
(
cleanWhitespaceKey
),
m_cleanWhitespace
);
s
->
setValue
(
QLatin1String
(
inEntireDocumentKey
),
m_inEntireDocument
);
s
->
setValue
(
QLatin1String
(
addFinalNewLineKey
),
m_addFinalNewLine
);
s
->
setValue
(
QLatin1String
(
cleanIndentationKey
),
m_cleanIndentation
);
s
->
endGroup
();
}
...
...
@@ -71,13 +74,15 @@ void StorageSettings::fromSettings(const QString &category, const QSettings *s)
m_cleanWhitespace
=
s
->
value
(
group
+
QLatin1String
(
cleanWhitespaceKey
),
m_cleanWhitespace
).
toBool
();
m_inEntireDocument
=
s
->
value
(
group
+
QLatin1String
(
inEntireDocumentKey
),
m_inEntireDocument
).
toBool
();
m_addFinalNewLine
=
s
->
value
(
group
+
QLatin1String
(
addFinalNewLineKey
),
m_addFinalNewLine
).
toBool
();
m_cleanIndentation
=
s
->
value
(
group
+
QLatin1String
(
cleanIndentationKey
),
m_cleanIndentation
).
toBool
();
}
bool
StorageSettings
::
equals
(
const
StorageSettings
&
ts
)
const
{
return
m_addFinalNewLine
==
ts
.
m_addFinalNewLine
&&
m_cleanWhitespace
==
ts
.
m_cleanWhitespace
&&
m_inEntireDocument
==
ts
.
m_inEntireDocument
;
&&
m_inEntireDocument
==
ts
.
m_inEntireDocument
&&
m_cleanIndentation
==
ts
.
m_cleanIndentation
;
}
}
// namespace TextEditor
src/plugins/texteditor/storagesettings.h
View file @
a438a853
...
...
@@ -54,6 +54,7 @@ struct TEXTEDITOR_EXPORT StorageSettings
bool
m_cleanWhitespace
;
bool
m_inEntireDocument
;
bool
m_addFinalNewLine
;
bool
m_cleanIndentation
;
};
inline
bool
operator
==
(
const
StorageSettings
&
t1
,
const
StorageSettings
&
t2
)
{
return
t1
.
equals
(
t2
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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