Commit 46261d80 authored by con's avatar con
Browse files

Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline

parents 7199223a 27d2a129
......@@ -11,8 +11,8 @@ layout: QVBoxLayout {
leftMargin: 10;
rightMargin: 10;
property var effect: backendValues == null || backendValues.effect === undefined ? null : backendValues.effect
property var complexNode : effect === null ? null : effect.complexNode
property var effect: backendValues.effect
property var complexNode: effect.complexNode
QWidget {
maximumHeight: 40;
......@@ -23,7 +23,7 @@ layout: QVBoxLayout {
}
QComboBox {
enabled: isBaseState;
property var type: complexNode == null ? null : complexNode.type
property var type: backendValues.effect.complexNode.type
property var dirty;
id: effectComboBox;
items : { [
......@@ -35,21 +35,29 @@ layout: QVBoxLayout {
] }
onCurrentTextChanged: {
print("currentTextChanged before dirty");
if (dirty) //avoid recursion;
return;
if (complexNode != null && complexNode.exists)
complexNode.remove();
print("currentTextChanged");
if (backendValues.effect.complexNode.exists)
backendValues.effect.complexNode.remove();
if (currentText == "None") {
print("none");
;
} else if (complexNode != null) {
complexNode.add("Qt/" + currentText);
} else if (backendValues.effect.complexNode != null) {
print("add");
backendValues.effect.complexNode.add("Qt/" + currentText);
}
}
onTypeChanged: {
dirty = true;
if (complexNode != null && complexNode.type != "")
currentText = complexNode.type;
if (backendValues.effect.complexNode.exists)
currentText = backendValues.effect.complexNode.type;
else
currentText = "None";
dirty = false;
......@@ -70,7 +78,7 @@ layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: blurRadius;
backendValue: properties == null ? null : properties.blurRadius;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : 0;
caption: "Blur Radius:"
baseStateFlag: isBaseState;
......@@ -87,7 +95,7 @@ layout: QVBoxLayout {
DoubleSpinBox {
id: OpcacityEffectSpinBox;
objectName: "OpcacityEffectSpinBox";
backendValue: properties == null ? null : properties.opacity;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.opacity : 0;
minimum: 0;
maximum: 1;
singleStep: 0.1;
......@@ -122,7 +130,7 @@ layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: pixelSize;
backendValue: properties == null ? null : properties.pixelSize;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.pixelSize : 0;
caption: "Pixel Size:"
baseStateFlag: isBaseState;
......@@ -140,7 +148,7 @@ layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: blurRadiusShadow;
backendValue: properties == null ? null : properties.blurRadius;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : 0
caption: "Blur Radius:"
baseStateFlag: isBaseState;
......@@ -164,7 +172,7 @@ layout: QVBoxLayout {
IntEditor {
id: xOffset;
backendValue: properties == null ? 0 : properties.xOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.xOffset : 0
caption: "x Offset: "
baseStateFlag: isBaseState;
......@@ -175,7 +183,7 @@ layout: QVBoxLayout {
IntEditor {
id: yOffset;
backendValue: properties == null ? 0 : properties.yOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.yOffset : 0
caption: "y Offset: "
baseStateFlag: isBaseState;
......
......@@ -242,42 +242,44 @@ win32 {
}
unix {
HEADERS += botan/curve_gfp.h \
build.kh/botan/cvc_ado.h \
build.kh/botan/cvc_ca.h \
build.kh/botan/cvc_cert.h \
build.kh/botan/cvc_gen_cert.h \
build.kh/botan/cvc_key.h \
build.kh/botan/cvc_req.h \
build.kh/botan/cvc_self.h \
build.kh/botan/eac_asn_obj.h \
build.kh/botan/eac_obj.h \
build.kh/botan/ecc_key.h \
build.kh/botan/ec_dompar.h \
build.kh/botan/ecdsa_core.h \
build.kh/botan/ecdsa.h \
build.kh/botan/ecdsa_op.h \
build.kh/botan/ecdsa_sig.h \
build.kh/botan/eckaeg_core.h \
build.kh/botan/eckaeg.h \
build.kh/botan/eckaeg_op.h \
build.kh/botan/es_dev.h \
build.kh/botan/es_egd.h \
build.kh/botan/es_ftw.h \
build.kh/botan/es_unix.h \
build.kh/botan/fd_unix.h \
build.kh/botan/freestore.h \
build.kh/botan/gfp_element.h \
build.kh/botan/gfp_modulus.h \
build.kh/botan/mmap_mem.h \
build.kh/botan/mux_pthr.h \
build.kh/botan/point_gfp.h \
build.kh/botan/signed_obj.h \
build.kh/botan/tm_posix.h \
build.kh/botan/tm_unix.h \
build.kh/botan/unix_cmd.h
HEADERS += alloc/alloc_mmap/mmap_mem.h \
cert/cvc/cvc_ado.h \
cert/cvc/cvc_ca.h \
cert/cvc/cvc_cert.h \
cert/cvc/cvc_gen_cert.h \
cert/cvc/cvc_key.h \
cert/cvc/cvc_req.h \
cert/cvc/cvc_self.h \
cert/cvc/eac_asn_obj.h \
cert/cvc/eac_obj.h \
cert/cvc/ecdsa_sig.h \
cert/cvc/freestore.h \
cert/cvc/signed_obj.h \
entropy/dev_random/es_dev.h \
entropy/egd/es_egd.h \
entropy/proc_walk/es_ftw.h \
entropy/unix_procs/es_unix.h \
entropy/unix_procs/unix_cmd.h \
filters/fd_unix/fd_unix.h \
math/gfpmath/curve_gfp.h \
math/gfpmath/gfp_element.h \
math/gfpmath/gfp_modulus.h \
math/gfpmath/point_gfp.h \
mutex/pthreads/mux_pthr.h \
pubkey/ec_dompar/ec_dompar.h \
pubkey/ecc_key/ecc_key.h \
pubkey/ecdsa/ecdsa.h \
pubkey/ecdsa/ecdsa_core.h \
pubkey/ecdsa/ecdsa_op.h \
pubkey/eckaeg/eckaeg.h \
pubkey/eckaeg/eckaeg_core.h \
pubkey/eckaeg/eckaeg_op.h \
timer/gettimeofday/tm_unix.h
}
linux*-g++* {
HEADERS += timer/posix_rt/tm_posix.h
}
SOURCES += algo_factory/algo_factory.cpp \
algo_factory/prov_weight.cpp \
......@@ -527,7 +529,7 @@ SOURCES += entropy/cryptoapi_rng/es_capi.cpp \
}
unix {
SOURCES += alloc/alloc_mmap/mmap_mem.cpp \
SOURCES += alloc/alloc_mmap/mmap_mem.cpp \
cert/cvc/asn1_eac_str.cpp \
cert/cvc/asn1_eac_tm.cpp \
cert/cvc/cvc_ado.cpp \
......@@ -560,15 +562,5 @@ SOURCES += alloc/alloc_mmap/mmap_mem.cpp \
}
linux*-g++* {
SOURCES += \
# block/serpent_ia32/serp_ia32.cpp \
# block/serpent_ia32/serp_ia32_imp.S \
# engine/ia32_eng/eng_ia32.cpp \
# hash/md4_ia32/md4_ia32.cpp \
# hash/md4_ia32/md4_ia32_imp.S \
# hash/md5_ia32/md5_ia32.cpp \
# hash/md5_ia32/md5_ia32_imp.S \
# hash/sha1_ia32/sha1_ia32.cpp \
# hash/sha1_ia32/sha1_ia32_imp.S \
timer/posix_rt/tm_posix.cpp
SOURCES += timer/posix_rt/tm_posix.cpp
}
......@@ -88,7 +88,7 @@ typedef uint8_t Byte;
#endif
#if defined(WIN32) || defined(__MINGW32__)
# define usleep(time) Sleep(time)
# define usleep(time) Sleep(time / 1000)
#endif
#endif
......
......@@ -6,10 +6,9 @@
}
QScrollBar::handle:vertical {
background: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0, x3: 0.8, y3: 0,
background: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0
stop: 0 #cEcEcE,
stop: 1 #8E8E8E,
stop: 2 #101010);
stop: 1 #8E8E8E);
min-height: 20px;
border-radius: 10px;
}
......
......@@ -37,6 +37,8 @@
#include "qmllookupcontext.h"
#include "qmlresolveexpression.h"
#include <qscripthighlighter/qscriptindenter.h>
#include <qml/metatype/qmltypesystem.h>
#include <qml/parser/qmljsastvisitor_p.h>
#include <qml/parser/qmljsast_p.h>
......@@ -74,6 +76,27 @@ using namespace QmlJS;
using namespace QmlJS::AST;
using namespace SharedTools;
namespace {
int blockBraceDepth(const QTextBlock &block)
{
int state = block.userState();
if (state == -1)
return 0;
return (state >> 8) & 0xFF;
}
int blockStartState(const QTextBlock &block)
{
int state = block.userState();
if (state == -1)
return 0;
else
return state & 0xff;
}
} // end of anonymous namespace
namespace QmlEditor {
namespace Internal {
......@@ -548,65 +571,14 @@ bool QmlTextEditor::isClosingBrace(const QList<QScriptIncrementalScanner::Token>
return false;
}
static int blockBraceDepth(const QTextBlock &block)
{
int state = block.userState();
if (state == -1)
return 0;
return (state >> 8) & 0xFF;
}
static int blockStartState(const QTextBlock &block)
{
int state = block.userState();
if (state == -1)
return 0;
else
return state & 0xff;
}
void QmlTextEditor::indentBlock(QTextDocument *, QTextBlock block, QChar /*typedChar*/)
void QmlTextEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar)
{
TextEditor::TabSettings ts = tabSettings();
SharedTools::QScriptIndenter indenter;
indenter.setTabSize(ts.m_tabSize);
indenter.setIndentSize(ts.m_indentSize);
QTextCursor tc(block);
const QString blockText = block.text();
int startState = blockStartState(block.previous());
QScriptIncrementalScanner scanner;
const QList<QScriptIncrementalScanner::Token> tokens = scanner(blockText, startState);
if (! tokens.isEmpty()) {
const QScriptIncrementalScanner::Token tk = tokens.first();
if (tk.is(QScriptIncrementalScanner::Token::RightBrace)
|| tk.is(QScriptIncrementalScanner::Token::RightBracket)) {
if (TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tc)) {
const QString text = tc.block().text();
int indent = ts.columnAt(text, ts.firstNonSpace(text));
ts.indentLine(block, indent);
return;
}
}
}
int initialIndent = 0;
for (QTextBlock it = block.previous(); it.isValid(); it = it.previous()) {
const QString text = it.text();
if (! text.isEmpty()) {
initialIndent = ts.columnAt(text, ts.firstNonSpace(text));
break;
}
}
const int braceDepth = blockBraceDepth(block.previous());
const int previousBraceDepth = blockBraceDepth(block.previous().previous());
const int delta = qMax(0, braceDepth - previousBraceDepth);
int indent = initialIndent + (delta * ts.m_indentSize);
const int indent = indenter.indentForBottomLine(doc->begin(), block.next(), typedChar);
ts.indentLine(block, indent);
}
......
......@@ -210,8 +210,13 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
void QMakeStep::setUserArguments(const QStringList &arguments)
{
if (m_userArgs == arguments)
return;
m_userArgs = arguments;
emit userArgumentsChanged();
qt4BuildConfiguration()->emitQMakeBuildConfigurationChanged();
}
QStringList QMakeStep::userArguments()
......
......@@ -132,9 +132,11 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command)
const char * const error = lastError();
if (error)
throw MaemoSshException(tr("SSH error: %1").arg(error));
const char * output = ssh.readAndReset(channel(), alloc);
const char * const output = ssh.readAndReset(channel(), alloc);
if (output) {
emit remoteOutput(QString::fromUtf8(output));
if (!done)
done = strstr(output, m_prompt) != 0;
delete[] output;
}
} while (!done && !stopRequested());
......
......@@ -6,7 +6,6 @@ SUPPORT_QT_MAEMO = $$(QTCREATOR_WITH_MAEMO)
# INCLUDEPATH += $$PWD/../../../libs/3rdparty/net7ssh/src
# INCLUDEPATH += $$PWD/../../../libs/3rdparty/botan/build
# LIBS += -l$$qtLibraryTarget(Net7ssh) -l$$qtLibraryTarget(Botan)
HEADERS += $$PWD/maemorunconfiguration.h \
$$PWD/maemomanager.h \
$$PWD/maemotoolchain.h \
......
......@@ -316,6 +316,11 @@ void Qt4BuildConfiguration::setQMakeBuildConfiguration(QtVersion::QmakeBuildConf
emit targetInformationChanged();
}
void Qt4BuildConfiguration::emitQMakeBuildConfigurationChanged()
{
emit qmakeBuildConfigurationChanged();
}
void Qt4BuildConfiguration::getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const
{
QtVersion::QmakeBuildConfigs defaultBuildConfiguration = qtVersion()->defaultBuildConfig();
......
......@@ -90,6 +90,9 @@ public:
QtVersion::QmakeBuildConfigs qmakeBuildConfiguration() const;
void setQMakeBuildConfiguration(QtVersion::QmakeBuildConfigs config);
// used by qmake step to notify that the qmake args have changed
// not really nice
void emitQMakeBuildConfigurationChanged();
void getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const;
// Those functions are used in a few places.
......
......@@ -87,7 +87,7 @@ QScriptIndenter::QScriptIndenter()
inlineCComment(QRegExp(QLatin1String("/\\*.*\\*/"))),
braceX(QRegExp(QLatin1String("^\\s*\\}\\s*(?:else|catch)\\b"))),
iflikeKeyword(QRegExp(QLatin1String("\\b(?:catch|do|for|if|while|with)\\b"))),
propertylikeKeyword(QRegExp(QLatin1String("^\\s*\\b(?:property|signal|import)\\b")))
propertylikeKeyword(QRegExp(QLatin1String("^\\s*\\b(?:property|signal|import|readonly|return)\\b")))
{
/*
......@@ -278,13 +278,14 @@ QString QScriptIndenter::trimmedCodeLine(const QString &t) const
const QString e = trimmed.trimmed();
if (insertSemicolon
|| e.endsWith(QLatin1Char(','))
|| e.endsWith(QLatin1Char(']'))
|| trimmed.indexOf(propertylikeKeyword) != -1)
if (insertSemicolon || e.endsWith(QLatin1Char(',')) || e.endsWith(QLatin1Char(']')))
trimmed.append(QLatin1Char(';'));
//qDebug() << trimmed;
else if (trimmed.indexOf(propertylikeKeyword) != -1) {
const QChar ch = trimmed.at(trimmed.length() - 1);
if (ch.isLetterOrNumber() || ch == QLatin1Char(')') || ch == QLatin1Char(']')
|| ch == QLatin1Char('"') || ch == QLatin1Char('\''))
trimmed.append(QLatin1Char(';'));
}
return trimmed;
}
......
Supports Markdown
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