forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -216,7 +216,7 @@ QT_END_NAMESPACE
|
|||||||
// comma-separated integer list
|
// comma-separated integer list
|
||||||
static char qDumpInBuffer[10000];
|
static char qDumpInBuffer[10000];
|
||||||
static char qDumpOutBuffer[100000];
|
static char qDumpOutBuffer[100000];
|
||||||
static char qDumpSize[20];
|
//static char qDumpSize[20];
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -309,10 +309,16 @@ static bool isSimpleType(const char *type)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isShortKey(const char *type)
|
#if 0
|
||||||
|
static bool isStringType(const char *type)
|
||||||
{
|
{
|
||||||
return isSimpleType(type) || isEqual(type, NS"QString");
|
return isEqual(type, NS"QString")
|
||||||
|
|| isEqual(type, NS"QByteArray")
|
||||||
|
|| isEqual(type, "std::string")
|
||||||
|
|| isEqual(type, "std::wstring")
|
||||||
|
|| isEqual(type, "wstring");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool isMovableType(const char *type)
|
static bool isMovableType(const char *type)
|
||||||
{
|
{
|
||||||
@@ -555,7 +561,7 @@ void QDumper::addCommaIfNeeded()
|
|||||||
put(',');
|
put(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDumper::putBase64Encoded(const char *buf, int n, char delim)
|
void QDumper::putBase64Encoded(const char *buf, int n)
|
||||||
{
|
{
|
||||||
const char alphabet[] = "ABCDEFGH" "IJKLMNOP" "QRSTUVWX" "YZabcdef"
|
const char alphabet[] = "ABCDEFGH" "IJKLMNOP" "QRSTUVWX" "YZabcdef"
|
||||||
"ghijklmn" "opqrstuv" "wxyz0123" "456789+/";
|
"ghijklmn" "opqrstuv" "wxyz0123" "456789+/";
|
||||||
@@ -740,6 +746,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
|
|||||||
return;
|
return;
|
||||||
case 'B':
|
case 'B':
|
||||||
if (isEqual(type, "QByteArray")) {
|
if (isEqual(type, "QByteArray")) {
|
||||||
|
d.addCommaIfNeeded();
|
||||||
d << field << "encoded=\"1\",";
|
d << field << "encoded=\"1\",";
|
||||||
P(d, field, *(QByteArray*)addr);
|
P(d, field, *(QByteArray*)addr);
|
||||||
}
|
}
|
||||||
@@ -769,6 +776,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
|
|||||||
return;
|
return;
|
||||||
case 'S':
|
case 'S':
|
||||||
if (isEqual(type, "QString")) {
|
if (isEqual(type, "QString")) {
|
||||||
|
d.addCommaIfNeeded();
|
||||||
d << field << "encoded=\"1\",";
|
d << field << "encoded=\"1\",";
|
||||||
P(d, field, *(QString*)addr);
|
P(d, field, *(QString*)addr);
|
||||||
}
|
}
|
||||||
@@ -1086,13 +1094,15 @@ static void qDumpQHash(QDumper &d)
|
|||||||
if (d.dumpChildren) {
|
if (d.dumpChildren) {
|
||||||
if (n > 1000)
|
if (n > 1000)
|
||||||
n = 1000;
|
n = 1000;
|
||||||
bool simpleKey = isShortKey(keyType);
|
bool isSimpleKey = isSimpleType(keyType);
|
||||||
bool simpleValue = isShortKey(valueType);
|
bool isSimpleValue = isSimpleType(valueType);
|
||||||
bool opt = isOptimizedIntKey(keyType);
|
bool opt = isOptimizedIntKey(keyType);
|
||||||
int keyOffset = hashOffset(opt, true, keySize, valueSize);
|
int keyOffset = hashOffset(opt, true, keySize, valueSize);
|
||||||
int valueOffset = hashOffset(opt, false, keySize, valueSize);
|
int valueOffset = hashOffset(opt, false, keySize, valueSize);
|
||||||
|
|
||||||
P(d, "extra", "simplekey: " << simpleKey << " simpleValue: " << simpleValue
|
P(d, "extra", "isSimpleKey: " << isSimpleKey
|
||||||
|
<< " isSimpleValue: " << isSimpleValue
|
||||||
|
<< " valueType: '" << isSimpleValue
|
||||||
<< " keySize: " << keyOffset << " valueOffset: " << valueOffset
|
<< " keySize: " << keyOffset << " valueOffset: " << valueOffset
|
||||||
<< " opt: " << opt);
|
<< " opt: " << opt);
|
||||||
|
|
||||||
@@ -1103,18 +1113,17 @@ static void qDumpQHash(QDumper &d)
|
|||||||
d << ",children=[";
|
d << ",children=[";
|
||||||
while (node != end) {
|
while (node != end) {
|
||||||
d.beginHash();
|
d.beginHash();
|
||||||
if (simpleKey) {
|
|
||||||
P(d, "name", i);
|
P(d, "name", i);
|
||||||
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
|
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
|
||||||
if (simpleValue)
|
|
||||||
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
||||||
|
if (isSimpleKey && isSimpleValue) {
|
||||||
P(d, "type", valueType);
|
P(d, "type", valueType);
|
||||||
P(d, "addr", addOffset(node, valueOffset));
|
P(d, "addr", addOffset(node, valueOffset));
|
||||||
} else {
|
} else {
|
||||||
P(d, "name", i);
|
P(d, "exp", "*('"NS"QHashNode<" << keyType << ","
|
||||||
//P(d, "exp", "*(char*)" << node);
|
<< valueType << " >'*)" << node);
|
||||||
P(d, "exp", "*('"NS"QHashNode<" << keyType << "," << valueType << " >'*)" << node);
|
P(d, "type", "'"NS"QHashNode<" << keyType << ","
|
||||||
P(d, "type", "'"NS"QHashNode<" << keyType << "," << valueType << " >'");
|
<< valueType << " >'");
|
||||||
}
|
}
|
||||||
d.endHash();
|
d.endHash();
|
||||||
++i;
|
++i;
|
||||||
@@ -1131,15 +1140,18 @@ static void qDumpQHashNode(QDumper &d)
|
|||||||
const char *keyType = d.templateParameters[0];
|
const char *keyType = d.templateParameters[0];
|
||||||
const char *valueType = d.templateParameters[1];
|
const char *valueType = d.templateParameters[1];
|
||||||
|
|
||||||
P(d, "value", "");
|
|
||||||
P(d, "numchild", 2);
|
|
||||||
if (d.dumpChildren) {
|
|
||||||
unsigned keySize = d.extraInt[0];
|
unsigned keySize = d.extraInt[0];
|
||||||
unsigned valueSize = d.extraInt[1];
|
unsigned valueSize = d.extraInt[1];
|
||||||
bool opt = isOptimizedIntKey(keyType);
|
bool opt = isOptimizedIntKey(keyType);
|
||||||
int keyOffset = hashOffset(opt, true, keySize, valueSize);
|
int keyOffset = hashOffset(opt, true, keySize, valueSize);
|
||||||
int valueOffset = hashOffset(opt, false, keySize, valueSize);
|
int valueOffset = hashOffset(opt, false, keySize, valueSize);
|
||||||
|
if (isSimpleType(valueType))
|
||||||
|
qDumpInnerValueHelper(d, valueType, addOffset(h, valueOffset));
|
||||||
|
else
|
||||||
|
P(d, "value", "");
|
||||||
|
|
||||||
|
P(d, "numchild", 2);
|
||||||
|
if (d.dumpChildren) {
|
||||||
// there is a hash specialization in cast the key are integers or shorts
|
// there is a hash specialization in cast the key are integers or shorts
|
||||||
d << ",children=[";
|
d << ",children=[";
|
||||||
d.beginHash();
|
d.beginHash();
|
||||||
@@ -1262,8 +1274,8 @@ static void qDumpQLinkedList(QDumper &d)
|
|||||||
P(d, "numchild", n);
|
P(d, "numchild", n);
|
||||||
P(d, "childtype", d.innertype);
|
P(d, "childtype", d.innertype);
|
||||||
if (d.dumpChildren) {
|
if (d.dumpChildren) {
|
||||||
unsigned innerSize = d.extraInt[0];
|
//unsigned innerSize = d.extraInt[0];
|
||||||
bool innerTypeIsPointer = isPointerType(d.innertype);
|
//bool innerTypeIsPointer = isPointerType(d.innertype);
|
||||||
QByteArray strippedInnerType = stripPointerType(d.innertype);
|
QByteArray strippedInnerType = stripPointerType(d.innertype);
|
||||||
const char *stripped =
|
const char *stripped =
|
||||||
isPointerType(d.innertype) ? strippedInnerType.data() : 0;
|
isPointerType(d.innertype) ? strippedInnerType.data() : 0;
|
||||||
@@ -1397,13 +1409,13 @@ static void qDumpQMap(QDumper &d)
|
|||||||
unsigned mapnodesize = d.extraInt[2];
|
unsigned mapnodesize = d.extraInt[2];
|
||||||
unsigned valueOff = d.extraInt[3];
|
unsigned valueOff = d.extraInt[3];
|
||||||
|
|
||||||
bool simpleKey = isShortKey(keyType);
|
bool isSimpleKey = isSimpleType(keyType);
|
||||||
bool simpleValue = isShortKey(valueType);
|
bool isSimpleValue = isSimpleType(valueType);
|
||||||
// both negative:
|
// both negative:
|
||||||
int keyOffset = 2 * sizeof(void*) - int(mapnodesize);
|
int keyOffset = 2 * sizeof(void*) - int(mapnodesize);
|
||||||
int valueOffset = 2 * sizeof(void*) - int(mapnodesize) + valueOff;
|
int valueOffset = 2 * sizeof(void*) - int(mapnodesize) + valueOff;
|
||||||
|
|
||||||
P(d, "extra", "simplekey: " << simpleKey << " simpleValue: " << simpleValue
|
P(d, "extra", "simplekey: " << isSimpleKey << " isSimpleValue: " << isSimpleValue
|
||||||
<< " keyOffset: " << keyOffset << " valueOffset: " << valueOffset
|
<< " keyOffset: " << keyOffset << " valueOffset: " << valueOffset
|
||||||
<< " mapnodesize: " << mapnodesize);
|
<< " mapnodesize: " << mapnodesize);
|
||||||
d << ",children=[";
|
d << ",children=[";
|
||||||
@@ -1415,12 +1427,9 @@ static void qDumpQMap(QDumper &d)
|
|||||||
while (node != end) {
|
while (node != end) {
|
||||||
d.beginHash();
|
d.beginHash();
|
||||||
P(d, "name", i);
|
P(d, "name", i);
|
||||||
if (simpleKey) {
|
|
||||||
P(d, "type", valueType);
|
|
||||||
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
|
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
|
||||||
if (simpleValue)
|
|
||||||
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
||||||
|
if (isSimpleKey && isSimpleValue) {
|
||||||
P(d, "type", valueType);
|
P(d, "type", valueType);
|
||||||
P(d, "addr", addOffset(node, valueOffset));
|
P(d, "addr", addOffset(node, valueOffset));
|
||||||
} else {
|
} else {
|
||||||
@@ -2194,35 +2203,38 @@ static void qDumpStdMap(QDumper &d)
|
|||||||
// (#4, "std::allocator<std::pair<key, value> >")
|
// (#4, "std::allocator<std::pair<key, value> >")
|
||||||
// as it is there, and, equally importantly, in an order that
|
// as it is there, and, equally importantly, in an order that
|
||||||
// gdb accepts when fed with it.
|
// gdb accepts when fed with it.
|
||||||
char *pairType = (char *)(d.templateParameters[3]) + 16;
|
char *pairType = (char *)(d.templateParameters[3]) + 15;
|
||||||
pairType[strlen(pairType) - 2] = 0;
|
pairType[strlen(pairType) - 2] = 0;
|
||||||
P(d, "pairtype", pairType);
|
P(d, "pairtype", pairType);
|
||||||
|
|
||||||
if (d.dumpChildren) {
|
if (d.dumpChildren) {
|
||||||
bool simpleKey = isSimpleType(keyType);
|
bool isSimpleKey = isSimpleType(keyType);
|
||||||
bool simpleValue = isShortKey(valueType);
|
bool isSimpleValue = isSimpleType(valueType);
|
||||||
int valueOffset = d.extraInt[2];
|
int valueOffset = d.extraInt[2];
|
||||||
|
|
||||||
|
P(d, "extra", "isSimpleKey: " << isSimpleKey
|
||||||
|
<< " isSimpleValue: " << isSimpleValue
|
||||||
|
<< " valueType: '" << valueType
|
||||||
|
<< " valueOffset: " << valueOffset);
|
||||||
|
|
||||||
d << ",children=[";
|
d << ",children=[";
|
||||||
it = map.begin();
|
it = map.begin();
|
||||||
for (int i = 0; i < 1000 && it != map.end(); ++i, ++it) {
|
for (int i = 0; i < 1000 && it != map.end(); ++i, ++it) {
|
||||||
|
d.beginHash();
|
||||||
const void *node = it.operator->();
|
const void *node = it.operator->();
|
||||||
if (simpleKey) {
|
|
||||||
d.beginHash();
|
|
||||||
P(d, "type", valueType);
|
|
||||||
qDumpInnerValueHelper(d, keyType, node, "name");
|
|
||||||
P(d, "nameisindex", "1");
|
|
||||||
if (simpleValue)
|
|
||||||
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
|
||||||
P(d, "addr", addOffset(node, valueOffset));
|
|
||||||
d.endHash();
|
|
||||||
} else {
|
|
||||||
d.beginHash();
|
|
||||||
P(d, "name", i);
|
P(d, "name", i);
|
||||||
P(d, "addr", it.operator->());
|
qDumpInnerValueHelper(d, keyType, node, "key");
|
||||||
|
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
|
||||||
|
if (isSimpleKey && isSimpleValue) {
|
||||||
|
P(d, "type", valueType);
|
||||||
|
P(d, "addr", addOffset(node, valueOffset));
|
||||||
|
P(d, "numchild", 0);
|
||||||
|
} else {
|
||||||
|
P(d, "addr", node);
|
||||||
P(d, "type", pairType);
|
P(d, "type", pairType);
|
||||||
d.endHash();
|
P(d, "numchild", 2);
|
||||||
}
|
}
|
||||||
|
d.endHash();
|
||||||
}
|
}
|
||||||
if (it != map.end())
|
if (it != map.end())
|
||||||
d.putEllipsis();
|
d.putEllipsis();
|
||||||
|
@@ -110,7 +110,7 @@ PathChooser::PathChooser(QWidget *parent) :
|
|||||||
connect(m_d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
|
connect(m_d->m_lineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
|
||||||
connect(m_d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
|
connect(m_d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
|
||||||
|
|
||||||
m_d->m_lineEdit->setMinimumWidth(260);
|
m_d->m_lineEdit->setMinimumWidth(200);
|
||||||
hLayout->addWidget(m_d->m_lineEdit);
|
hLayout->addWidget(m_d->m_lineEdit);
|
||||||
hLayout->setSizeConstraint(QLayout::SetMinimumSize);
|
hLayout->setSizeConstraint(QLayout::SetMinimumSize);
|
||||||
|
|
||||||
|
@@ -291,7 +291,7 @@ void BookmarkView::gotoBookmark(const QModelIndex &index)
|
|||||||
////
|
////
|
||||||
|
|
||||||
BookmarkContext::BookmarkContext(BookmarkView *widget)
|
BookmarkContext::BookmarkContext(BookmarkView *widget)
|
||||||
: m_bookmarkView(widget)
|
: Core::IContext(widget), m_bookmarkView(widget)
|
||||||
{
|
{
|
||||||
m_context << UniqueIDManager::instance()->uniqueIdentifier(Constants::BOOKMARKS_CONTEXT);
|
m_context << UniqueIDManager::instance()->uniqueIdentifier(Constants::BOOKMARKS_CONTEXT);
|
||||||
}
|
}
|
||||||
|
@@ -116,6 +116,8 @@ QWidget *ShortcutSettings::createPage(QWidget *parent)
|
|||||||
|
|
||||||
commandChanged(0);
|
commandChanged(0);
|
||||||
|
|
||||||
|
delete m_page;
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1249,6 +1249,8 @@ void EditorManager::addCurrentPositionToNavigationHistory(bool compress)
|
|||||||
if ((previousLocation->editor && editor == previousLocation->editor)
|
if ((previousLocation->editor && editor == previousLocation->editor)
|
||||||
|| (!fileName.isEmpty() && previousLocation->fileName == fileName)) {
|
|| (!fileName.isEmpty() && previousLocation->fileName == fileName)) {
|
||||||
firstIndexToRemove = m_d->currentNavigationHistoryPosition;
|
firstIndexToRemove = m_d->currentNavigationHistoryPosition;
|
||||||
|
} else {
|
||||||
|
firstIndexToRemove = m_d->currentNavigationHistoryPosition+1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
firstIndexToRemove = m_d->currentNavigationHistoryPosition+1;
|
firstIndexToRemove = m_d->currentNavigationHistoryPosition+1;
|
||||||
|
@@ -69,6 +69,7 @@ OpenEditorsWidget::OpenEditorsWidget()
|
|||||||
m_ui.editorList->setTextElideMode(Qt::ElideMiddle);
|
m_ui.editorList->setTextElideMode(Qt::ElideMiddle);
|
||||||
m_ui.editorList->installEventFilter(this);
|
m_ui.editorList->installEventFilter(this);
|
||||||
m_ui.editorList->setFrameStyle(QFrame::NoFrame);
|
m_ui.editorList->setFrameStyle(QFrame::NoFrame);
|
||||||
|
m_ui.editorList->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
EditorManager *em = EditorManager::instance();
|
EditorManager *em = EditorManager::instance();
|
||||||
m_ui.editorList->setModel(em->openedEditorsModel());
|
m_ui.editorList->setModel(em->openedEditorsModel());
|
||||||
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
|
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
|
||||||
|
@@ -74,7 +74,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo)
|
|||||||
|
|
||||||
// Disabled since for now we'll make sure that all icons fit with our
|
// Disabled since for now we'll make sure that all icons fit with our
|
||||||
// own custom icons by returning an empty one if we don't know it.
|
// own custom icons by returning an empty one if we don't know it.
|
||||||
#if 0
|
#ifdef Q_OS_WIN
|
||||||
// This is incorrect if the OS does not always return the same icon for the
|
// This is incorrect if the OS does not always return the same icon for the
|
||||||
// same suffix (Mac OS X), but should speed up the retrieval a lot ...
|
// same suffix (Mac OS X), but should speed up the retrieval a lot ...
|
||||||
icon = m_systemIconProvider.icon(fileInfo);
|
icon = m_systemIconProvider.icon(fileInfo);
|
||||||
@@ -127,7 +127,7 @@ void FileIconProvider::registerIconOverlayForSuffix(const QIcon &icon, const QSt
|
|||||||
QIcon FileIconProvider::iconForSuffix(const QString &suffix) const
|
QIcon FileIconProvider::iconForSuffix(const QString &suffix) const
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
|
#ifndef Q_OS_WIN // On windows we use the file system icons
|
||||||
if (suffix.isEmpty())
|
if (suffix.isEmpty())
|
||||||
return icon;
|
return icon;
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ QIcon FileIconProvider::iconForSuffix(const QString &suffix) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ QString GeneralSettings::trCategory() const
|
|||||||
|
|
||||||
QWidget *GeneralSettings::createPage(QWidget *parent)
|
QWidget *GeneralSettings::createPage(QWidget *parent)
|
||||||
{
|
{
|
||||||
m_page = new Ui_GeneralSettings;
|
m_page = new Ui_GeneralSettings();
|
||||||
QWidget *w = new QWidget(parent);
|
QWidget *w = new QWidget(parent);
|
||||||
m_page->setupUi(w);
|
m_page->setupUi(w);
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
|
|||||||
this, SLOT(resetExternalEditor()));
|
this, SLOT(resetExternalEditor()));
|
||||||
connect(m_page->helpExternalEditorButton, SIGNAL(clicked()),
|
connect(m_page->helpExternalEditorButton, SIGNAL(clicked()),
|
||||||
this, SLOT(showHelpForExternalEditor()));
|
this, SLOT(showHelpForExternalEditor()));
|
||||||
|
delete m_page;
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1054,3 +1054,11 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mac style reimplements this to control the
|
||||||
|
// focus widget among other things
|
||||||
|
bool ManhattanStyle::event(QEvent *e)
|
||||||
|
{
|
||||||
|
Q_ASSERT(d->style);
|
||||||
|
return d->style->event(e);
|
||||||
|
}
|
||||||
|
@@ -78,6 +78,9 @@ public:
|
|||||||
void unpolish(QWidget *widget);
|
void unpolish(QWidget *widget);
|
||||||
void unpolish(QApplication *app);
|
void unpolish(QApplication *app);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool event(QEvent *e);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const;
|
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const;
|
||||||
int layoutSpacingImplementation(QSizePolicy::ControlType control1,
|
int layoutSpacingImplementation(QSizePolicy::ControlType control1,
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include <CoreTypes.h>
|
#include <CoreTypes.h>
|
||||||
#include <Literals.h>
|
#include <Literals.h>
|
||||||
#include <Semantic.h>
|
#include <Semantic.h>
|
||||||
|
#include <SymbolVisitor.h>
|
||||||
#include <cplusplus/ExpressionUnderCursor.h>
|
#include <cplusplus/ExpressionUnderCursor.h>
|
||||||
#include <cplusplus/LookupContext.h>
|
#include <cplusplus/LookupContext.h>
|
||||||
#include <cplusplus/Overview.h>
|
#include <cplusplus/Overview.h>
|
||||||
@@ -100,6 +101,44 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FindFunctionDefinitions: protected SymbolVisitor
|
||||||
|
{
|
||||||
|
Name *_declarationName;
|
||||||
|
QList<Function *> *_functions;
|
||||||
|
|
||||||
|
public:
|
||||||
|
FindFunctionDefinitions()
|
||||||
|
: _declarationName(0),
|
||||||
|
_functions(0)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
void operator()(Name *declarationName, Scope *globals,
|
||||||
|
QList<Function *> *functions)
|
||||||
|
{
|
||||||
|
_declarationName = declarationName;
|
||||||
|
_functions = functions;
|
||||||
|
|
||||||
|
for (unsigned i = 0; i < globals->symbolCount(); ++i) {
|
||||||
|
accept(globals->symbolAt(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
using SymbolVisitor::visit;
|
||||||
|
|
||||||
|
virtual bool visit(Function *function)
|
||||||
|
{
|
||||||
|
Name *name = function->name();
|
||||||
|
if (QualifiedNameId *q = name->asQualifiedNameId())
|
||||||
|
name = q->unqualifiedNameId();
|
||||||
|
|
||||||
|
if (_declarationName->isEqualTo(name))
|
||||||
|
_functions->append(function);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
|
||||||
QualifiedNameId *qualifiedNameIdForSymbol(Symbol *s, const LookupContext &context)
|
QualifiedNameId *qualifiedNameIdForSymbol(Symbol *s, const LookupContext &context)
|
||||||
@@ -550,58 +589,60 @@ void CPPEditor::jumpToDefinition()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbol *CPPEditor::findDefinition(Symbol *lastSymbol)
|
Symbol *CPPEditor::findDefinition(Symbol *symbol)
|
||||||
{
|
{
|
||||||
// Currently only functions are supported
|
if (symbol->isFunction())
|
||||||
if (!lastSymbol->type()->isFunction())
|
return 0; // symbol is a function definition.
|
||||||
return 0;
|
|
||||||
|
|
||||||
QVector<Name *> qualifiedName;
|
Function *funTy = symbol->type()->asFunction();
|
||||||
Scope *scope = lastSymbol->scope();
|
if (! funTy)
|
||||||
for (; scope; scope = scope->enclosingScope()) {
|
return 0; // symbol does not have function type.
|
||||||
if (scope->isClassScope() || scope->isNamespaceScope()) {
|
|
||||||
if (scope->owner() && scope->owner()->name()) {
|
Name *name = symbol->name();
|
||||||
Name *scopeOwnerName = scope->owner()->name();
|
if (! name)
|
||||||
if (QualifiedNameId *q = scopeOwnerName->asQualifiedNameId()) {
|
return 0; // skip anonymous functions!
|
||||||
for (unsigned i = 0; i < q->nameCount(); ++i) {
|
|
||||||
qualifiedName.prepend(q->nameAt(i));
|
if (QualifiedNameId *q = name->asQualifiedNameId())
|
||||||
}
|
name = q->unqualifiedNameId();
|
||||||
} else {
|
|
||||||
qualifiedName.prepend(scopeOwnerName);
|
// map from file names to function definitions.
|
||||||
}
|
QMap<QString, QList<Function *> > functionDefinitions;
|
||||||
}
|
|
||||||
|
// find function definitions.
|
||||||
|
FindFunctionDefinitions findFunctionDefinitions;
|
||||||
|
|
||||||
|
// save the current snapshot
|
||||||
|
const Snapshot snapshot = m_modelManager->snapshot();
|
||||||
|
|
||||||
|
foreach (Document::Ptr doc, snapshot) {
|
||||||
|
if (Scope *globals = doc->globalSymbols()) {
|
||||||
|
QList<Function *> *localFunctionDefinitions =
|
||||||
|
&functionDefinitions[doc->fileName()];
|
||||||
|
|
||||||
|
findFunctionDefinitions(name, globals,
|
||||||
|
localFunctionDefinitions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qualifiedName.append(lastSymbol->name());
|
// a dummy document.
|
||||||
|
Document::Ptr expressionDocument = Document::create("<empty>");
|
||||||
|
|
||||||
Control control;
|
QMapIterator<QString, QList<Function *> > it(functionDefinitions);
|
||||||
QualifiedNameId *q = control.qualifiedNameId(&qualifiedName[0], qualifiedName.size());
|
while (it.hasNext()) {
|
||||||
LookupContext context(&control);
|
it.next();
|
||||||
|
|
||||||
const Snapshot documents = m_modelManager->snapshot();
|
// get the instance of the document.
|
||||||
foreach (Document::Ptr doc, documents) {
|
Document::Ptr thisDocument = snapshot.value(it.key());
|
||||||
QList<Scope *> visibleScopes;
|
|
||||||
visibleScopes.append(doc->globalSymbols());
|
foreach (Function *f, it.value()) {
|
||||||
visibleScopes = context.expand(visibleScopes);
|
// create a lookup context
|
||||||
//qDebug() << "** doc:" << doc->fileName() << "visible scopes:" << visibleScopes.count();
|
const LookupContext context(f, expressionDocument,
|
||||||
foreach (Scope *visibleScope, visibleScopes) {
|
thisDocument, snapshot);
|
||||||
Symbol *symbol = 0;
|
|
||||||
if (NameId *nameId = q->unqualifiedNameId()->asNameId())
|
// search the matching definition for the function declaration `symbol'.
|
||||||
symbol = visibleScope->lookat(nameId->identifier());
|
foreach (Symbol *s, context.resolve(f->name())) {
|
||||||
else if (DestructorNameId *dtorId = q->unqualifiedNameId()->asDestructorNameId())
|
if (s == symbol)
|
||||||
symbol = visibleScope->lookat(dtorId->identifier());
|
return f;
|
||||||
else if (TemplateNameId *templNameId = q->unqualifiedNameId()->asTemplateNameId())
|
|
||||||
symbol = visibleScope->lookat(templNameId->identifier());
|
|
||||||
else if (OperatorNameId *opId = q->unqualifiedNameId()->asOperatorNameId())
|
|
||||||
symbol = visibleScope->lookat(opId->kind());
|
|
||||||
// ### cast operators
|
|
||||||
for (; symbol; symbol = symbol->next()) {
|
|
||||||
if (! symbol->isFunction())
|
|
||||||
continue;
|
|
||||||
else if (! isCompatible(symbol->asFunction(), lastSymbol, q))
|
|
||||||
continue;
|
|
||||||
return symbol;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -94,7 +94,6 @@ DebuggerSettings::DebuggerSettings()
|
|||||||
m_skipKnownFrames = false;
|
m_skipKnownFrames = false;
|
||||||
m_debugDumpers = false;
|
m_debugDumpers = false;
|
||||||
m_useToolTips = false;
|
m_useToolTips = false;
|
||||||
m_useTerminal = false;
|
|
||||||
m_useCustomDumpers = true;
|
m_useCustomDumpers = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -198,7 +198,6 @@ public:
|
|||||||
bool m_debugDumpers;
|
bool m_debugDumpers;
|
||||||
bool m_useFastStart;
|
bool m_useFastStart;
|
||||||
bool m_useToolTips;
|
bool m_useToolTips;
|
||||||
bool m_useTerminal;
|
|
||||||
|
|
||||||
QString m_scriptFile;
|
QString m_scriptFile;
|
||||||
};
|
};
|
||||||
|
@@ -282,7 +282,6 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
|
|||||||
m_ui.checkBoxUseCustomDumpers->setChecked(m_settings.m_useCustomDumpers);
|
m_ui.checkBoxUseCustomDumpers->setChecked(m_settings.m_useCustomDumpers);
|
||||||
m_ui.checkBoxFastStart->setChecked(m_settings.m_useFastStart);
|
m_ui.checkBoxFastStart->setChecked(m_settings.m_useFastStart);
|
||||||
m_ui.checkBoxUseToolTips->setChecked(m_settings.m_useToolTips);
|
m_ui.checkBoxUseToolTips->setChecked(m_settings.m_useToolTips);
|
||||||
m_ui.checkBoxUseTerminal->setChecked(m_settings.m_useTerminal);
|
|
||||||
|
|
||||||
#ifndef QT_DEBUG
|
#ifndef QT_DEBUG
|
||||||
#if 0
|
#if 0
|
||||||
@@ -325,7 +324,6 @@ void GdbOptionPage::apply()
|
|||||||
m_settings.m_useCustomDumpers = m_ui.checkBoxUseCustomDumpers->isChecked();
|
m_settings.m_useCustomDumpers = m_ui.checkBoxUseCustomDumpers->isChecked();
|
||||||
m_settings.m_useFastStart = m_ui.checkBoxFastStart->isChecked();
|
m_settings.m_useFastStart = m_ui.checkBoxFastStart->isChecked();
|
||||||
m_settings.m_useToolTips = m_ui.checkBoxUseToolTips->isChecked();
|
m_settings.m_useToolTips = m_ui.checkBoxUseToolTips->isChecked();
|
||||||
m_settings.m_useTerminal = m_ui.checkBoxUseTerminal->isChecked();
|
|
||||||
|
|
||||||
*m_plugin->m_manager->settings() = m_settings;
|
*m_plugin->m_manager->settings() = m_settings;
|
||||||
m_plugin->writeSettings();
|
m_plugin->writeSettings();
|
||||||
@@ -892,7 +890,6 @@ void DebuggerPlugin::writeSettings() const
|
|||||||
|
|
||||||
s->setValue("UseFastStart", m->m_useFastStart);
|
s->setValue("UseFastStart", m->m_useFastStart);
|
||||||
s->setValue("UseToolTips", m->m_useToolTips);
|
s->setValue("UseToolTips", m->m_useToolTips);
|
||||||
s->setValue("UseTerminal", m->m_useTerminal);
|
|
||||||
s->setValue("UseCustomDumpers", m->m_useCustomDumpers);
|
s->setValue("UseCustomDumpers", m->m_useCustomDumpers);
|
||||||
s->setValue("SkipKnowFrames", m->m_skipKnownFrames);
|
s->setValue("SkipKnowFrames", m->m_skipKnownFrames);
|
||||||
s->setValue("DebugDumpers", m->m_debugDumpers);
|
s->setValue("DebugDumpers", m->m_debugDumpers);
|
||||||
@@ -926,7 +923,6 @@ void DebuggerPlugin::readSettings()
|
|||||||
m->m_useCustomDumpers = s->value("UseCustomDumpers", true).toBool();
|
m->m_useCustomDumpers = s->value("UseCustomDumpers", true).toBool();
|
||||||
m->m_useFastStart = s->value("UseFastStart", false).toBool();
|
m->m_useFastStart = s->value("UseFastStart", false).toBool();
|
||||||
m->m_useToolTips = s->value("UseToolTips", false).toBool();
|
m->m_useToolTips = s->value("UseToolTips", false).toBool();
|
||||||
m->m_useTerminal = s->value("UseTerminal", false).toBool();
|
|
||||||
s->endGroup();
|
s->endGroup();
|
||||||
|
|
||||||
m_manager->mainWindow()->restoreState(ba);
|
m_manager->mainWindow()->restoreState(ba);
|
||||||
|
@@ -2833,9 +2833,12 @@ static bool extractTemplate(const QString &type, QString *tmplate, QString *inne
|
|||||||
// 'tmplate' and "Inner1@Inner2@..." etc in 'inner'. Result indicates
|
// 'tmplate' and "Inner1@Inner2@..." etc in 'inner'. Result indicates
|
||||||
// whether parsing was successful
|
// whether parsing was successful
|
||||||
int level = 0;
|
int level = 0;
|
||||||
|
bool skipSpace = false;
|
||||||
for (int i = 0; i != type.size(); ++i) {
|
for (int i = 0; i != type.size(); ++i) {
|
||||||
QChar c = type[i];
|
QChar c = type[i];
|
||||||
if (c == '<') {
|
if (c == ' ' && skipSpace) {
|
||||||
|
skipSpace = false;
|
||||||
|
} else if (c == '<') {
|
||||||
*(level == 0 ? tmplate : inner) += c;
|
*(level == 0 ? tmplate : inner) += c;
|
||||||
++level;
|
++level;
|
||||||
} else if (c == '>') {
|
} else if (c == '>') {
|
||||||
@@ -2843,6 +2846,7 @@ static bool extractTemplate(const QString &type, QString *tmplate, QString *inne
|
|||||||
*(level == 0 ? tmplate : inner) += c;
|
*(level == 0 ? tmplate : inner) += c;
|
||||||
} else if (c == ',') {
|
} else if (c == ',') {
|
||||||
*inner += (level == 1) ? '@' : ',';
|
*inner += (level == 1) ? '@' : ',';
|
||||||
|
skipSpace = true;
|
||||||
} else {
|
} else {
|
||||||
*(level == 0 ? tmplate : inner) += c;
|
*(level == 0 ? tmplate : inner) += c;
|
||||||
}
|
}
|
||||||
@@ -2850,7 +2854,7 @@ static bool extractTemplate(const QString &type, QString *tmplate, QString *inne
|
|||||||
*tmplate = tmplate->trimmed();
|
*tmplate = tmplate->trimmed();
|
||||||
*tmplate = tmplate->remove("<>");
|
*tmplate = tmplate->remove("<>");
|
||||||
*inner = inner->trimmed();
|
*inner = inner->trimmed();
|
||||||
//qDebug() << "EXTRACT TEMPLATE: " << *tmplate << *inner;
|
//qDebug() << "EXTRACT TEMPLATE: " << *tmplate << *inner << " FROM " << type;
|
||||||
return !inner->isEmpty();
|
return !inner->isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3555,9 +3559,15 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
|
|||||||
data1.name = '[' + data1.name + ']';
|
data1.name = '[' + data1.name + ']';
|
||||||
QString key = item.findChild("key").data();
|
QString key = item.findChild("key").data();
|
||||||
if (!key.isEmpty()) {
|
if (!key.isEmpty()) {
|
||||||
if (item.findChild("keyencoded").data()[0] == '1')
|
if (item.findChild("keyencoded").data()[0] == '1') {
|
||||||
key = '"' + QByteArray::fromBase64(key.toUtf8()) + '"';
|
key = '"' + QByteArray::fromBase64(key.toUtf8()) + '"';
|
||||||
data1.name += " (" + key + ")";
|
if (key.size() > 13) {
|
||||||
|
key = key.left(12);
|
||||||
|
key += "...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//data1.name += " (" + key + ")";
|
||||||
|
data1.name = key;
|
||||||
}
|
}
|
||||||
setWatchDataType(data1, item.findChild("type"));
|
setWatchDataType(data1, item.findChild("type"));
|
||||||
setWatchDataExpression(data1, item.findChild("exp"));
|
setWatchDataExpression(data1, item.findChild("exp"));
|
||||||
|
@@ -84,16 +84,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBoxUseTerminal">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Start debugged process in a separte terminal.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Start in terminal</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxFastStart">
|
<widget class="QCheckBox" name="checkBoxFastStart">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@@ -107,9 +97,8 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
|
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>fter checking this option 'Step Into' combines in certain situations several steps, leading to 'less noisy' debugging. So will, e.g., the atomic
|
<string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
|
||||||
reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.
|
reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.</string>
|
||||||
</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Skip known frames when stepping</string>
|
<string>Skip known frames when stepping</string>
|
||||||
@@ -173,8 +162,6 @@ reference counting code be skipped, and a single 'Step Into' for a signal emissi
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../coreplugin/core.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -55,8 +55,8 @@ enum { INameRole = Qt::UserRole, VisualRole, ExpandedRole };
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
WatchWindow::WatchWindow(Type type, QWidget *parent)
|
WatchWindow::WatchWindow(Type type, QWidget *parent)
|
||||||
: QTreeView(parent), m_type(type)
|
: QTreeView(parent)
|
||||||
, m_alwaysResizeColumnsToContents(true)
|
, m_alwaysResizeColumnsToContents(true), m_type(type)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Locals and Watchers"));
|
setWindowTitle(tr("Locals and Watchers"));
|
||||||
setAlternatingRowColors(true);
|
setAlternatingRowColors(true);
|
||||||
|
@@ -348,6 +348,10 @@ public:
|
|||||||
|
|
||||||
QPointer<QObject> m_extraData;
|
QPointer<QObject> m_extraData;
|
||||||
int m_cursorWidth;
|
int m_cursorWidth;
|
||||||
|
|
||||||
|
void recordJump();
|
||||||
|
QList<int> m_jumpListUndo;
|
||||||
|
QList<int> m_jumpListRedo;
|
||||||
};
|
};
|
||||||
|
|
||||||
FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
|
FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
|
||||||
@@ -483,16 +487,18 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
|
|||||||
m_marks['>'] = m_tc.position();
|
m_marks['>'] = m_tc.position();
|
||||||
|
|
||||||
if (m_submode == ChangeSubMode) {
|
if (m_submode == ChangeSubMode) {
|
||||||
|
if (m_moveType == MoveInclusive)
|
||||||
|
moveRight(); // correction
|
||||||
if (!dotCommand.isEmpty())
|
if (!dotCommand.isEmpty())
|
||||||
m_dotCommand = "c" + dotCommand;
|
m_dotCommand = "c" + dotCommand;
|
||||||
QString text = recordRemoveSelectedText();
|
QString text = recordRemoveSelectedText();
|
||||||
qDebug() << "CHANGING TO INSERT MODE" << text;
|
//qDebug() << "CHANGING TO INSERT MODE" << text;
|
||||||
m_registers[m_register] = text;
|
m_registers[m_register] = text;
|
||||||
m_mode = InsertMode;
|
m_mode = InsertMode;
|
||||||
m_submode = NoSubMode;
|
m_submode = NoSubMode;
|
||||||
} else if (m_submode == DeleteSubMode) {
|
} else if (m_submode == DeleteSubMode) {
|
||||||
if (m_moveType == MoveInclusive)
|
if (m_moveType == MoveInclusive)
|
||||||
moveRight(); // correct
|
moveRight(); // correction
|
||||||
if (!dotCommand.isEmpty())
|
if (!dotCommand.isEmpty())
|
||||||
m_dotCommand = "d" + dotCommand;
|
m_dotCommand = "d" + dotCommand;
|
||||||
m_registers[m_register] = recordRemoveSelectedText();
|
m_registers[m_register] = recordRemoveSelectedText();
|
||||||
@@ -669,16 +675,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
moveToStartOfLine();
|
moveToStartOfLine();
|
||||||
setAnchor();
|
setAnchor();
|
||||||
moveDown(count());
|
moveDown(count());
|
||||||
moveLeft();
|
m_moveType = MoveLineWise;
|
||||||
m_registers[m_register] = recordRemoveSelectedText();
|
|
||||||
m_submode = NoSubMode;
|
|
||||||
m_mode = InsertMode;
|
|
||||||
finishMovement("c");
|
finishMovement("c");
|
||||||
} else if (m_submode == DeleteSubMode && key == 'd') {
|
} else if (m_submode == DeleteSubMode && key == 'd') {
|
||||||
moveToStartOfLine();
|
moveToStartOfLine();
|
||||||
setAnchor();
|
setAnchor();
|
||||||
moveDown(count());
|
moveDown(count());
|
||||||
m_registers[m_register] = recordRemoveSelectedText();
|
m_moveType = MoveLineWise;
|
||||||
finishMovement("d");
|
finishMovement("d");
|
||||||
} else if (m_submode == YankSubMode && key == 'y') {
|
} else if (m_submode == YankSubMode && key == 'y') {
|
||||||
moveToStartOfLine();
|
moveToStartOfLine();
|
||||||
@@ -798,6 +801,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
m_lastSearchForward = (key == '*');
|
m_lastSearchForward = (key == '*');
|
||||||
updateMiniBuffer();
|
updateMiniBuffer();
|
||||||
search(needle, m_lastSearchForward);
|
search(needle, m_lastSearchForward);
|
||||||
|
recordJump();
|
||||||
} else if (key == '\'') {
|
} else if (key == '\'') {
|
||||||
m_subsubmode = TickSubSubMode;
|
m_subsubmode = TickSubSubMode;
|
||||||
} else if (key == '|') {
|
} else if (key == '|') {
|
||||||
@@ -947,6 +951,11 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
moveToStartOfLine();
|
moveToStartOfLine();
|
||||||
else
|
else
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
|
} else if (key == control('i')) {
|
||||||
|
if (!m_jumpListRedo.isEmpty()) {
|
||||||
|
m_jumpListUndo.append(position());
|
||||||
|
m_tc.setPosition(m_jumpListRedo.takeLast());
|
||||||
|
}
|
||||||
} else if (key == 'j' || key == Key_Down) {
|
} else if (key == 'j' || key == Key_Down) {
|
||||||
int savedColumn = m_desiredColumn;
|
int savedColumn = m_desiredColumn;
|
||||||
if (m_submode == NoSubMode || m_submode == ZSubMode
|
if (m_submode == NoSubMode || m_submode == ZSubMode
|
||||||
@@ -986,6 +995,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
finishMovement();
|
finishMovement();
|
||||||
m_desiredColumn = savedColumn;
|
m_desiredColumn = savedColumn;
|
||||||
} else if (key == 'l' || key == Key_Right) {
|
} else if (key == 'l' || key == Key_Right) {
|
||||||
|
m_moveType = MoveExclusive;
|
||||||
moveRight(qMin(count(), rightDist()));
|
moveRight(qMin(count(), rightDist()));
|
||||||
finishMovement();
|
finishMovement();
|
||||||
} else if (key == 'L') {
|
} else if (key == 'L') {
|
||||||
@@ -1001,8 +1011,10 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
finishMovement();
|
finishMovement();
|
||||||
} else if (key == 'n') {
|
} else if (key == 'n') {
|
||||||
search(lastSearchString(), m_lastSearchForward);
|
search(lastSearchString(), m_lastSearchForward);
|
||||||
|
recordJump();
|
||||||
} else if (key == 'N') {
|
} else if (key == 'N') {
|
||||||
search(lastSearchString(), !m_lastSearchForward);
|
search(lastSearchString(), !m_lastSearchForward);
|
||||||
|
recordJump();
|
||||||
} else if (key == 'o' || key == 'O') {
|
} else if (key == 'o' || key == 'O') {
|
||||||
recordBeginGroup();
|
recordBeginGroup();
|
||||||
recordMove();
|
recordMove();
|
||||||
@@ -1018,6 +1030,11 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
recordInsertText(QString(indentDist(), ' '));
|
recordInsertText(QString(indentDist(), ' '));
|
||||||
else
|
else
|
||||||
recordInsertText(QString(numSpaces, ' '));
|
recordInsertText(QString(numSpaces, ' '));
|
||||||
|
} else if (key == control('o')) {
|
||||||
|
if (!m_jumpListUndo.isEmpty()) {
|
||||||
|
m_jumpListRedo.append(position());
|
||||||
|
m_tc.setPosition(m_jumpListUndo.takeLast());
|
||||||
|
}
|
||||||
} else if (key == 'p' || key == 'P') {
|
} else if (key == 'p' || key == 'P') {
|
||||||
recordBeginGroup();
|
recordBeginGroup();
|
||||||
QString text = m_registers[m_register];
|
QString text = m_registers[m_register];
|
||||||
@@ -1089,16 +1106,25 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
} else if (key == 'w') {
|
} else if (key == 'w') {
|
||||||
// Special case: "cw" and "cW" work the same as "ce" and "cE" if the
|
// Special case: "cw" and "cW" work the same as "ce" and "cE" if the
|
||||||
// cursor is on a non-blank.
|
// cursor is on a non-blank.
|
||||||
if (m_submode == ChangeSubMode)
|
if (m_submode == ChangeSubMode) {
|
||||||
moveToWordBoundary(false, true);
|
moveToWordBoundary(false, true);
|
||||||
else
|
m_moveType = MoveInclusive;
|
||||||
|
} else {
|
||||||
moveToNextWord(false);
|
moveToNextWord(false);
|
||||||
m_moveType = MoveExclusive;
|
m_moveType = MoveExclusive;
|
||||||
|
}
|
||||||
finishMovement("w");
|
finishMovement("w");
|
||||||
} else if (key == 'W') {
|
} else if (key == 'W') {
|
||||||
|
if (m_submode == ChangeSubMode) {
|
||||||
|
moveToWordBoundary(true, true);
|
||||||
|
m_moveType = MoveInclusive;
|
||||||
|
} else {
|
||||||
moveToNextWord(true);
|
moveToNextWord(true);
|
||||||
|
m_moveType = MoveExclusive;
|
||||||
|
}
|
||||||
finishMovement("W");
|
finishMovement("W");
|
||||||
} else if (key == 'x') { // = "dl"
|
} else if (key == 'x') { // = "dl"
|
||||||
|
m_moveType = MoveExclusive;
|
||||||
if (atEndOfLine())
|
if (atEndOfLine())
|
||||||
moveLeft();
|
moveLeft();
|
||||||
recordBeginGroup();
|
recordBeginGroup();
|
||||||
@@ -1289,6 +1315,7 @@ bool FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodified,
|
|||||||
m_searchHistory.append(m_commandBuffer);
|
m_searchHistory.append(m_commandBuffer);
|
||||||
m_lastSearchForward = (m_mode == SearchForwardMode);
|
m_lastSearchForward = (m_mode == SearchForwardMode);
|
||||||
search(lastSearchString(), m_lastSearchForward);
|
search(lastSearchString(), m_lastSearchForward);
|
||||||
|
recordJump();
|
||||||
}
|
}
|
||||||
enterCommandMode();
|
enterCommandMode();
|
||||||
updateMiniBuffer();
|
updateMiniBuffer();
|
||||||
@@ -2097,6 +2124,13 @@ void FakeVimHandler::Private::quit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FakeVimHandler::Private::recordJump()
|
||||||
|
{
|
||||||
|
m_jumpListUndo.append(position());
|
||||||
|
m_jumpListRedo.clear();
|
||||||
|
//qDebug() << m_jumpListUndo;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// FakeVimHandler
|
// FakeVimHandler
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/findplaceholder.h>
|
#include <coreplugin/findplaceholder.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <coreplugin/stylehelper.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
#include <coreplugin/actionmanager/command.h>
|
#include <coreplugin/actionmanager/command.h>
|
||||||
@@ -224,6 +225,16 @@ FindToolBar::~FindToolBar()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FindToolBar::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
QToolBar::paintEvent(event);
|
||||||
|
|
||||||
|
QPainter p(this);
|
||||||
|
const QRect r = rect();
|
||||||
|
p.setPen(StyleHelper::borderColor());
|
||||||
|
p.drawLine(r.topLeft(), r.topRight());
|
||||||
|
}
|
||||||
|
|
||||||
bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
|
bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
|
||||||
{
|
{
|
||||||
if ((obj == m_ui.findEdit || obj == m_findCompleter->popup())
|
if ((obj == m_ui.findEdit || obj == m_findCompleter->popup())
|
||||||
|
@@ -58,6 +58,8 @@ public:
|
|||||||
|
|
||||||
void invokeClearResults();
|
void invokeClearResults();
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void invokeFindNext();
|
void invokeFindNext();
|
||||||
void invokeFindPrevious();
|
void invokeFindPrevious();
|
||||||
|
@@ -56,6 +56,7 @@ SearchResultWindow::SearchResultWindow()
|
|||||||
m_searchResultTreeView = new SearchResultTreeView(m_widget);
|
m_searchResultTreeView = new SearchResultTreeView(m_widget);
|
||||||
m_searchResultTreeView->setUniformRowHeights(true);
|
m_searchResultTreeView->setUniformRowHeights(true);
|
||||||
m_searchResultTreeView->setFrameStyle(QFrame::NoFrame);
|
m_searchResultTreeView->setFrameStyle(QFrame::NoFrame);
|
||||||
|
m_searchResultTreeView->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
m_widget->addWidget(m_searchResultTreeView);
|
m_widget->addWidget(m_searchResultTreeView);
|
||||||
|
|
||||||
m_noMatchesFoundDisplay = new QListWidget(m_widget);
|
m_noMatchesFoundDisplay = new QListWidget(m_widget);
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>389</width>
|
<width>403</width>
|
||||||
<height>183</height>
|
<height>183</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -25,16 +25,16 @@
|
|||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
<widget class="QLabel" name="pathlabel">
|
<widget class="QLabel" name="pathlabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PATH:</string>
|
<string>PATH:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="pathLineEdit"/>
|
<widget class="QLineEdit" name="pathLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
@@ -47,14 +47,16 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
<widget class="QLabel" name="noteLabel">
|
<widget class="QLabel" name="noteLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Note:</b></string>
|
<string><b>Note:</b></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item>
|
||||||
<widget class="QLabel" name="noteFieldlabel">
|
<widget class="QLabel" name="noteFieldlabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Git needs to find Perl in the environment as well.</string>
|
<string>Git needs to find Perl in the environment as well.</string>
|
||||||
@@ -62,6 +64,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@@ -248,8 +248,6 @@ void CentralWidget::setLastShownPages()
|
|||||||
}
|
}
|
||||||
setSource(url);
|
setSource(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBrowserFont();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CentralWidget::hasSelection() const
|
bool CentralWidget::hasSelection() const
|
||||||
@@ -407,24 +405,6 @@ void CentralWidget::setSourceInNewTab(const QUrl &url)
|
|||||||
tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
|
tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
|
||||||
quoteTabTitle(viewer->documentTitle())));
|
quoteTabTitle(viewer->documentTitle())));
|
||||||
|
|
||||||
#if defined(QT_NO_WEBIT)
|
|
||||||
QFont font = qApp->font();
|
|
||||||
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
|
|
||||||
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
|
|
||||||
viewer->setFont(font);
|
|
||||||
#else
|
|
||||||
QWebView* view = qobject_cast<QWebView*> (viewer);
|
|
||||||
if (view) {
|
|
||||||
QWebSettings* settings = QWebSettings::globalSettings();
|
|
||||||
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
|
|
||||||
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
|
|
||||||
|
|
||||||
settings = view->settings();
|
|
||||||
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
|
|
||||||
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
connectSignals();
|
connectSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,36 +592,6 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e)
|
|||||||
return QWidget::eventFilter(object, e);
|
return QWidget::eventFilter(object, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CentralWidget::updateBrowserFont()
|
|
||||||
{
|
|
||||||
#if defined(QT_NO_WEBKIT)
|
|
||||||
QFont font = qApp->font();
|
|
||||||
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
|
|
||||||
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
|
|
||||||
|
|
||||||
QWidget* widget = 0;
|
|
||||||
for (int i = 0; i < tabWidget->count(); ++i) {
|
|
||||||
widget = tabWidget->widget(i);
|
|
||||||
if (widget->font() != font)
|
|
||||||
widget->setFont(font);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
QWebSettings* settings = QWebSettings::globalSettings();
|
|
||||||
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
|
|
||||||
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
|
|
||||||
|
|
||||||
QWebView* widget = 0;
|
|
||||||
for (int i = 0; i < tabWidget->count(); ++i) {
|
|
||||||
widget = qobject_cast<QWebView*> (tabWidget->widget(i));
|
|
||||||
if (widget) {
|
|
||||||
settings = widget->settings();
|
|
||||||
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
|
|
||||||
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
|
bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
|
||||||
bool incremental)
|
bool incremental)
|
||||||
{
|
{
|
||||||
|
@@ -98,7 +98,6 @@ public slots:
|
|||||||
void print();
|
void print();
|
||||||
void pageSetup();
|
void pageSetup();
|
||||||
void printPreview();
|
void printPreview();
|
||||||
void updateBrowserFont();
|
|
||||||
void setSource(const QUrl &url);
|
void setSource(const QUrl &url);
|
||||||
void setSourceInNewTab(const QUrl &url);
|
void setSourceInNewTab(const QUrl &url);
|
||||||
HelpViewer *newEmptyTab();
|
HelpViewer *newEmptyTab();
|
||||||
|
@@ -51,9 +51,9 @@ namespace ProjectExplorer {
|
|||||||
It should be used as a base class if your buildstep just needs to run a process.
|
It should be used as a base class if your buildstep just needs to run a process.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
Use setCommand(), setArguments(), setWorkingDirectory() to specify the process you want to run.
|
Use setCommand(), setArguments(), setWorkingDirectory() to specify the process you want to run
|
||||||
(You need to do that before calling AbstractProcess::init())
|
(you need to do that before calling AbstractProcessStep::init()).
|
||||||
Inside YourBuildStep::init() call AbstractProcessStep::init()
|
Inside YourBuildStep::init() call AbstractProcessStep::init().
|
||||||
Inside YourBuildStep::run() call AbstractProcessStep::run(), which automatically starts the proces
|
Inside YourBuildStep::run() call AbstractProcessStep::run(), which automatically starts the proces
|
||||||
and by default adds the output on stdOut and stdErr to the OutputWindow.
|
and by default adds the output on stdOut and stdErr to the OutputWindow.
|
||||||
If you need to process the process output override stdOut() and/or stdErr.
|
If you need to process the process output override stdOut() and/or stdErr.
|
||||||
|
@@ -46,29 +46,36 @@ ConsoleProcess::~ConsoleProcess()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString shellEscape(const QString &in)
|
||||||
|
{
|
||||||
|
QString out = in;
|
||||||
|
out.replace('\'', "'\''");
|
||||||
|
out.prepend('\'');
|
||||||
|
out.append('\'');
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
bool ConsoleProcess::start(const QString &program, const QStringList &args)
|
bool ConsoleProcess::start(const QString &program, const QStringList &args)
|
||||||
{
|
{
|
||||||
if (m_process->state() != QProcess::NotRunning)
|
if (m_process->state() != QProcess::NotRunning)
|
||||||
return false;
|
return false;
|
||||||
QString shellArgs;
|
QString shellArgs;
|
||||||
shellArgs += QLatin1String("cd ");
|
shellArgs += QLatin1String("cd ");
|
||||||
shellArgs += workingDirectory();
|
shellArgs += shellEscape(workingDirectory());
|
||||||
shellArgs += QLatin1Char(';');
|
shellArgs += QLatin1Char(';');
|
||||||
shellArgs += program;
|
shellArgs += shellEscape(program);
|
||||||
foreach (const QString &arg, args) {
|
foreach (const QString &arg, args) {
|
||||||
shellArgs += QLatin1Char(' ');
|
shellArgs += QLatin1Char(' ');
|
||||||
shellArgs += QLatin1Char('\'');
|
shellArgs += shellEscape(arg);
|
||||||
shellArgs += arg;
|
|
||||||
shellArgs += QLatin1Char('\'');
|
|
||||||
}
|
}
|
||||||
shellArgs += QLatin1String("; echo; echo \"Press enter to close this window\"; read");
|
shellArgs += QLatin1String("; echo; echo \"Press enter to close this window\"; read DUMMY");
|
||||||
|
|
||||||
m_process->setEnvironment(environment());
|
m_process->setEnvironment(environment());
|
||||||
|
|
||||||
connect(m_process, SIGNAL(finished(int, QProcess::ExitStatus)),
|
connect(m_process, SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
this, SLOT(processFinished(int, QProcess::ExitStatus)));
|
this, SLOT(processFinished(int, QProcess::ExitStatus)));
|
||||||
|
|
||||||
m_process->start(QLatin1String("xterm"), QStringList() << QLatin1String("-e") << shellArgs);
|
m_process->start(QLatin1String("xterm"), QStringList() << QLatin1String("-e") << "/bin/sh" << "-c" << shellArgs);
|
||||||
if (!m_process->waitForStarted())
|
if (!m_process->waitForStarted())
|
||||||
return false;
|
return false;
|
||||||
emit processStarted();
|
emit processStarted();
|
||||||
|
@@ -54,46 +54,34 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
|
|||||||
QFormLayout *layout = new QFormLayout();
|
QFormLayout *layout = new QFormLayout();
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
|
|
||||||
m_executableLineEdit = new QLineEdit;
|
m_executableChooser = new Core::Utils::PathChooser();
|
||||||
QToolButton *exectuableToolButton = new QToolButton();
|
m_executableChooser->setExpectedKind(Core::Utils::PathChooser::File);
|
||||||
exectuableToolButton->setText("...");
|
layout->addRow("Executable:", m_executableChooser);
|
||||||
QHBoxLayout *hl = new QHBoxLayout;
|
|
||||||
hl->addWidget(m_executableLineEdit);
|
|
||||||
hl->addWidget(exectuableToolButton);
|
|
||||||
layout->addRow("Executable", hl);
|
|
||||||
|
|
||||||
m_commandLineArgumentsLineEdit = new QLineEdit;
|
m_commandLineArgumentsLineEdit = new QLineEdit;
|
||||||
layout->addRow("Arguments", m_commandLineArgumentsLineEdit);
|
m_commandLineArgumentsLineEdit->setMinimumWidth(200); // this shouldn't be fixed here...
|
||||||
|
layout->addRow("Arguments:", m_commandLineArgumentsLineEdit);
|
||||||
|
|
||||||
m_workingDirectoryLineEdit = new QLineEdit();
|
m_workingDirectory = new Core::Utils::PathChooser();
|
||||||
QToolButton *workingDirectoryToolButton = new QToolButton();
|
layout->addRow("Working Directory:", m_workingDirectory);
|
||||||
workingDirectoryToolButton->setText("...");
|
|
||||||
hl = new QHBoxLayout;
|
|
||||||
hl->addWidget(m_workingDirectoryLineEdit);
|
|
||||||
hl->addWidget(workingDirectoryToolButton);
|
|
||||||
layout->addRow("Working Directory", hl);
|
|
||||||
|
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
changed();
|
changed();
|
||||||
|
|
||||||
connect(m_executableLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_executableChooser, SIGNAL(changed()),
|
||||||
this, SLOT(setExecutable(const QString&)));
|
this, SLOT(setExecutable()));
|
||||||
connect(m_commandLineArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_commandLineArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
||||||
this, SLOT(setCommandLineArguments(const QString&)));
|
this, SLOT(setCommandLineArguments(const QString&)));
|
||||||
connect(m_workingDirectoryLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_workingDirectory, SIGNAL(changed()),
|
||||||
this, SLOT(setWorkingDirectory(const QString&)));
|
this, SLOT(setWorkingDirectory()));
|
||||||
connect(exectuableToolButton, SIGNAL(clicked(bool)),
|
|
||||||
this, SLOT(executableToolButtonClicked()));
|
|
||||||
connect(workingDirectoryToolButton, SIGNAL(clicked(bool)),
|
|
||||||
this, SLOT(workingDirectoryToolButtonClicked()));
|
|
||||||
|
|
||||||
connect(m_runConfiguration, SIGNAL(changed()), this, SLOT(changed()));
|
connect(m_runConfiguration, SIGNAL(changed()), this, SLOT(changed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomExecutableConfigurationWidget::setExecutable(const QString &executable)
|
void CustomExecutableConfigurationWidget::setExecutable()
|
||||||
{
|
{
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
m_runConfiguration->setExecutable(executable);
|
m_runConfiguration->setExecutable(m_executableChooser->path());
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
void CustomExecutableConfigurationWidget::setCommandLineArguments(const QString &commandLineArguments)
|
void CustomExecutableConfigurationWidget::setCommandLineArguments(const QString &commandLineArguments)
|
||||||
@@ -102,47 +90,21 @@ void CustomExecutableConfigurationWidget::setCommandLineArguments(const QString
|
|||||||
m_runConfiguration->setCommandLineArguments(commandLineArguments);
|
m_runConfiguration->setCommandLineArguments(commandLineArguments);
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
void CustomExecutableConfigurationWidget::setWorkingDirectory(const QString &workingDirectory)
|
void CustomExecutableConfigurationWidget::setWorkingDirectory()
|
||||||
{
|
{
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
m_runConfiguration->setWorkingDirectory(workingDirectory);
|
m_runConfiguration->setWorkingDirectory(m_workingDirectory->path());
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomExecutableConfigurationWidget::executableToolButtonClicked()
|
|
||||||
{
|
|
||||||
QString newValue;
|
|
||||||
QString executableFilter;
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
executableFilter = "Executable (*.exe)";
|
|
||||||
#endif
|
|
||||||
newValue = QFileDialog::getOpenFileName(this, "Executable", "", executableFilter);
|
|
||||||
if (!newValue.isEmpty()) {
|
|
||||||
m_executableLineEdit->setText(newValue);
|
|
||||||
setExecutable(newValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomExecutableConfigurationWidget::workingDirectoryToolButtonClicked()
|
|
||||||
{
|
|
||||||
QString newValue;
|
|
||||||
QString executableFilter;
|
|
||||||
|
|
||||||
newValue = QFileDialog::getExistingDirectory(this, "Directory", m_workingDirectoryLineEdit->text());
|
|
||||||
if (newValue.isEmpty()) {
|
|
||||||
m_workingDirectoryLineEdit->setText(newValue);
|
|
||||||
setWorkingDirectory(newValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomExecutableConfigurationWidget::changed()
|
void CustomExecutableConfigurationWidget::changed()
|
||||||
{
|
{
|
||||||
// We triggered the change, don't update us
|
// We triggered the change, don't update us
|
||||||
if (m_ignoreChange)
|
if (m_ignoreChange)
|
||||||
return;
|
return;
|
||||||
m_executableLineEdit->setText(m_runConfiguration->baseExecutable());
|
m_executableChooser->setPath(m_runConfiguration->baseExecutable());
|
||||||
m_commandLineArgumentsLineEdit->setText(ProjectExplorer::Environment::joinArgumentList(m_runConfiguration->commandLineArguments()));
|
m_commandLineArgumentsLineEdit->setText(ProjectExplorer::Environment::joinArgumentList(m_runConfiguration->commandLineArguments()));
|
||||||
m_workingDirectoryLineEdit->setText(m_runConfiguration->baseWorkingDirectory());
|
m_workingDirectory->setPath(m_runConfiguration->baseWorkingDirectory());
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Project *pro)
|
CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Project *pro)
|
||||||
|
@@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include "applicationrunconfiguration.h"
|
#include "applicationrunconfiguration.h"
|
||||||
|
|
||||||
|
#include <utils/pathchooser.h>
|
||||||
|
|
||||||
#include <QtGui/QToolButton>
|
#include <QtGui/QToolButton>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -108,18 +110,16 @@ public:
|
|||||||
CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc);
|
CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc);
|
||||||
private slots:
|
private slots:
|
||||||
void changed();
|
void changed();
|
||||||
void executableToolButtonClicked();
|
|
||||||
void workingDirectoryToolButtonClicked();
|
|
||||||
|
|
||||||
void setExecutable(const QString &executable);
|
void setExecutable();
|
||||||
void setCommandLineArguments(const QString &commandLineArguments);
|
void setCommandLineArguments(const QString &commandLineArguments);
|
||||||
void setWorkingDirectory(const QString &workingDirectory);
|
void setWorkingDirectory();
|
||||||
private:
|
private:
|
||||||
bool m_ignoreChange;
|
bool m_ignoreChange;
|
||||||
CustomExecutableRunConfiguration *m_runConfiguration;
|
CustomExecutableRunConfiguration *m_runConfiguration;
|
||||||
QLineEdit *m_executableLineEdit;
|
Core::Utils::PathChooser *m_executableChooser;
|
||||||
QLineEdit *m_commandLineArgumentsLineEdit;
|
QLineEdit *m_commandLineArgumentsLineEdit;
|
||||||
QLineEdit *m_workingDirectoryLineEdit;
|
Core::Utils::PathChooser *m_workingDirectory;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -89,6 +89,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
|
|||||||
m_filter->setSourceModel(m_dirModel);
|
m_filter->setSourceModel(m_dirModel);
|
||||||
m_view->setModel(m_filter);
|
m_view->setModel(m_filter);
|
||||||
m_view->setFrameStyle(QFrame::NoFrame);
|
m_view->setFrameStyle(QFrame::NoFrame);
|
||||||
|
m_view->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
setFocusProxy(m_view);
|
setFocusProxy(m_view);
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout();
|
QVBoxLayout *layout = new QVBoxLayout();
|
||||||
|
@@ -136,17 +136,14 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
|
|||||||
: m_step(step)
|
: m_step(step)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
connect(m_ui.commandBrowseButton, SIGNAL(clicked(bool)),
|
m_ui.command->setExpectedKind(Core::Utils::PathChooser::File);
|
||||||
this, SLOT(commandBrowseButtonClicked()));
|
connect(m_ui.command, SIGNAL(changed()),
|
||||||
connect(m_ui.workingDirBrowseButton, SIGNAL(clicked(bool)),
|
this, SLOT(commandLineEditTextEdited()));
|
||||||
this, SLOT(workingDirBrowseButtonClicked()));
|
connect(m_ui.workingDirectory, SIGNAL(changed()),
|
||||||
|
this, SLOT(workingDirectoryLineEditTextEdited()));
|
||||||
|
|
||||||
connect(m_ui.nameLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_ui.nameLineEdit, SIGNAL(textEdited(const QString&)),
|
||||||
this, SLOT(nameLineEditTextEdited()));
|
this, SLOT(nameLineEditTextEdited()));
|
||||||
connect(m_ui.commandLineEdit, SIGNAL(textEdited(const QString&)),
|
|
||||||
this, SLOT(commandLineEditTextEdited()));
|
|
||||||
connect(m_ui.workingDirectoryLineEdit, SIGNAL(textEdited(const QString&)),
|
|
||||||
this, SLOT(workingDirectoryLineEditTextEdited()));
|
|
||||||
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
||||||
this, SLOT(commandArgumentsLineEditTextEdited()));
|
this, SLOT(commandArgumentsLineEditTextEdited()));
|
||||||
connect(m_ui.enabledGroupBox, SIGNAL(clicked(bool)),
|
connect(m_ui.enabledGroupBox, SIGNAL(clicked(bool)),
|
||||||
@@ -158,34 +155,16 @@ QString ProcessStepConfigWidget::displayName() const
|
|||||||
return m_step->name();
|
return m_step->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessStepConfigWidget::workingDirBrowseButtonClicked()
|
|
||||||
{
|
|
||||||
QString workingDirectory = QFileDialog::getExistingDirectory(this, "Select the working directory", m_ui.workingDirectoryLineEdit->text());
|
|
||||||
if (workingDirectory.isEmpty())
|
|
||||||
return;
|
|
||||||
m_ui.workingDirectoryLineEdit->setText(workingDirectory);
|
|
||||||
workingDirectoryLineEditTextEdited();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProcessStepConfigWidget::commandBrowseButtonClicked()
|
|
||||||
{
|
|
||||||
QString filename = QFileDialog::getOpenFileName(this, "Select the executable");
|
|
||||||
if (filename.isEmpty())
|
|
||||||
return;
|
|
||||||
m_ui.commandLineEdit->setText(filename);
|
|
||||||
commandLineEditTextEdited();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProcessStepConfigWidget::init(const QString &buildConfiguration)
|
void ProcessStepConfigWidget::init(const QString &buildConfiguration)
|
||||||
{
|
{
|
||||||
m_buildConfiguration = buildConfiguration;
|
m_buildConfiguration = buildConfiguration;
|
||||||
if (buildConfiguration != QString::null) {
|
if (buildConfiguration != QString::null) {
|
||||||
m_ui.commandLineEdit->setText(m_step->command(buildConfiguration));
|
m_ui.command->setPath(m_step->command(buildConfiguration));
|
||||||
|
|
||||||
QString workingDirectory = m_step->value(buildConfiguration, "workingDirectory").toString();
|
QString workingDirectory = m_step->value(buildConfiguration, "workingDirectory").toString();
|
||||||
if (workingDirectory.isEmpty())
|
if (workingDirectory.isEmpty())
|
||||||
workingDirectory = "$BUILDDIR";
|
workingDirectory = "$BUILDDIR";
|
||||||
m_ui.workingDirectoryLineEdit->setText(workingDirectory);
|
m_ui.workingDirectory->setPath(workingDirectory);
|
||||||
|
|
||||||
m_ui.commandArgumentsLineEdit->setText(m_step->arguments(buildConfiguration).join(" "));
|
m_ui.commandArgumentsLineEdit->setText(m_step->arguments(buildConfiguration).join(" "));
|
||||||
m_ui.enabledGroupBox->setChecked(m_step->enabled(buildConfiguration));
|
m_ui.enabledGroupBox->setChecked(m_step->enabled(buildConfiguration));
|
||||||
@@ -200,12 +179,12 @@ void ProcessStepConfigWidget::nameLineEditTextEdited()
|
|||||||
|
|
||||||
void ProcessStepConfigWidget::commandLineEditTextEdited()
|
void ProcessStepConfigWidget::commandLineEditTextEdited()
|
||||||
{
|
{
|
||||||
m_step->setCommand(m_buildConfiguration, m_ui.commandLineEdit->text());
|
m_step->setCommand(m_buildConfiguration, m_ui.command->path());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessStepConfigWidget::workingDirectoryLineEditTextEdited()
|
void ProcessStepConfigWidget::workingDirectoryLineEditTextEdited()
|
||||||
{
|
{
|
||||||
QString wd = m_ui.workingDirectoryLineEdit->text();
|
QString wd = m_ui.workingDirectory->path();
|
||||||
m_step->setValue(m_buildConfiguration, "workingDirectory", wd);
|
m_step->setValue(m_buildConfiguration, "workingDirectory", wd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -84,8 +84,6 @@ private slots:
|
|||||||
void workingDirectoryLineEditTextEdited();
|
void workingDirectoryLineEditTextEdited();
|
||||||
void commandArgumentsLineEditTextEdited();
|
void commandArgumentsLineEditTextEdited();
|
||||||
void enabledGroupBoxClicked(bool);
|
void enabledGroupBoxClicked(bool);
|
||||||
void workingDirBrowseButtonClicked();
|
|
||||||
void commandBrowseButtonClicked();
|
|
||||||
private:
|
private:
|
||||||
QString m_buildConfiguration;
|
QString m_buildConfiguration;
|
||||||
ProcessStep *m_step;
|
ProcessStep *m_step;
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>428</width>
|
<width>505</width>
|
||||||
<height>222</height>
|
<height>271</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -22,61 +22,50 @@
|
|||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="nameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="nameLineEdit"/>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="commandLabel">
|
<widget class="QLabel" name="commandLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Command</string>
|
<string>Command:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="commandLineEdit"/>
|
<widget class="Core::Utils::PathChooser" name="command"/>
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QToolButton" name="commandBrowseButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="workingDirecoryLabel">
|
<widget class="QLabel" name="workingDirecoryLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Working Directory</string>
|
<string>Working Directory:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="workingDirectoryLineEdit"/>
|
<widget class="Core::Utils::PathChooser" name="workingDirectory"/>
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QToolButton" name="workingDirBrowseButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="commandArgumentsLabel">
|
<widget class="QLabel" name="commandArgumentsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>command arguments</string>
|
<string>Command Arguments:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
|
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="nameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="2">
|
|
||||||
<widget class="QLineEdit" name="nameLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -95,6 +84,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>Core::Utils::PathChooser</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">utils/pathchooser.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -75,6 +75,7 @@ public:
|
|||||||
setUniformRowHeights(true);
|
setUniformRowHeights(true);
|
||||||
setTextElideMode(Qt::ElideNone);
|
setTextElideMode(Qt::ElideNone);
|
||||||
// setExpandsOnDoubleClick(false);
|
// setExpandsOnDoubleClick(false);
|
||||||
|
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -34,11 +34,17 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="runConfigurationCombo">
|
<widget class="QComboBox" name="runConfigurationCombo">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="sizeAdjustPolicy">
|
<property name="sizeAdjustPolicy">
|
||||||
<enum>QComboBox::AdjustToContents</enum>
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumContentsLength">
|
<property name="minimumContentsLength">
|
||||||
<number>30</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -265,6 +265,7 @@ TaskWindow::TaskWindow()
|
|||||||
m_listview->setItemDelegate(tld);
|
m_listview->setItemDelegate(tld);
|
||||||
m_listview->setWindowIcon(QIcon(":/qt4projectmanager/images/window.png"));
|
m_listview->setWindowIcon(QIcon(":/qt4projectmanager/images/window.png"));
|
||||||
m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
|
m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||||
|
m_listview->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
|
|
||||||
m_taskWindowContext = new TaskWindowContext(m_listview);
|
m_taskWindowContext = new TaskWindowContext(m_listview);
|
||||||
core->addContextObject(m_taskWindowContext);
|
core->addContextObject(m_taskWindowContext);
|
||||||
@@ -577,7 +578,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TaskWindowContext::TaskWindowContext(QWidget *widget)
|
TaskWindowContext::TaskWindowContext(QWidget *widget)
|
||||||
: m_taskList(widget)
|
: Core::IContext(widget), m_taskList(widget)
|
||||||
{
|
{
|
||||||
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
||||||
m_context << uidm->uniqueIdentifier(Core::Constants::C_PROBLEM_PANE);
|
m_context << uidm->uniqueIdentifier(Core::Constants::C_PROBLEM_PANE);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="nameLabel">
|
<widget class="QLabel" name="nameLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Configuration Name</string>
|
<string>Configuration Name:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Qt Version</string>
|
<string>Qt Version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Shadow Build</string>
|
<string>Shadow Build:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Build Directory</string>
|
<string>Build Directory:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -845,7 +845,7 @@ void Qt4ProFileNode::updateUiFiles()
|
|||||||
}
|
}
|
||||||
addFileNodes(toAdd, this);
|
addFileNodes(toAdd, this);
|
||||||
}
|
}
|
||||||
modelManager->updateSourceFiles(toUpdate);
|
m_project->addUiFilesToCodeModel(toUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProFileReader *Qt4PriFileNode::createProFileReader() const
|
ProFileReader *Qt4PriFileNode::createProFileReader() const
|
||||||
|
@@ -255,6 +255,10 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
|
|||||||
m_updateCodeModelTimer.setSingleShot(true);
|
m_updateCodeModelTimer.setSingleShot(true);
|
||||||
m_updateCodeModelTimer.setInterval(20);
|
m_updateCodeModelTimer.setInterval(20);
|
||||||
connect(&m_updateCodeModelTimer, SIGNAL(timeout()), this, SLOT(updateCodeModel()));
|
connect(&m_updateCodeModelTimer, SIGNAL(timeout()), this, SLOT(updateCodeModel()));
|
||||||
|
|
||||||
|
m_addUiFilesTimer.setSingleShot(true);
|
||||||
|
m_addUiFilesTimer.setInterval(20);
|
||||||
|
connect(&m_addUiFilesTimer, SIGNAL(timeout()), this, SLOT(addUiFiles()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt4Project::~Qt4Project()
|
Qt4Project::~Qt4Project()
|
||||||
@@ -370,6 +374,27 @@ namespace {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Qt4Project::addUiFilesToCodeModel(const QStringList &files)
|
||||||
|
{
|
||||||
|
// if we already have a full updateCodeModel() scheduled
|
||||||
|
// then we don't need to this seperately
|
||||||
|
// since that one will add also all the ui files
|
||||||
|
if (m_updateCodeModelTimer.isActive())
|
||||||
|
return;
|
||||||
|
m_addUiFilesTimer.start();
|
||||||
|
m_uiFilesToAdd << files;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Qt4Project::addUiFiles()
|
||||||
|
{
|
||||||
|
if (m_updateCodeModelTimer.isActive())
|
||||||
|
return;
|
||||||
|
CppTools::CppModelManagerInterface *modelManager =
|
||||||
|
ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
|
||||||
|
modelManager->updateSourceFiles(m_uiFilesToAdd);
|
||||||
|
m_uiFilesToAdd.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void Qt4Project::scheduleUpdateCodeModel()
|
void Qt4Project::scheduleUpdateCodeModel()
|
||||||
{
|
{
|
||||||
m_updateCodeModelTimer.start();
|
m_updateCodeModelTimer.start();
|
||||||
|
@@ -182,6 +182,9 @@ public:
|
|||||||
|
|
||||||
void notifyChanged(const QString &name);
|
void notifyChanged(const QString &name);
|
||||||
|
|
||||||
|
// called by qt4ProjectNode to add ui_*.h files to the codemodel
|
||||||
|
void addUiFilesToCodeModel(const QStringList &files);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void update();
|
void update();
|
||||||
void proFileParseError(const QString &errorMessage);
|
void proFileParseError(const QString &errorMessage);
|
||||||
@@ -200,6 +203,7 @@ private slots:
|
|||||||
const Qt4ProjectManager::Internal::Qt4ProjectType oldType,
|
const Qt4ProjectManager::Internal::Qt4ProjectType oldType,
|
||||||
const Qt4ProjectManager::Internal::Qt4ProjectType newType);
|
const Qt4ProjectManager::Internal::Qt4ProjectType newType);
|
||||||
void proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node);
|
void proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node);
|
||||||
|
void addUiFiles();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader &settingsReader);
|
virtual void restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader &settingsReader);
|
||||||
@@ -232,6 +236,8 @@ private:
|
|||||||
Internal::Qt4ProjectFiles *m_projectFiles;
|
Internal::Qt4ProjectFiles *m_projectFiles;
|
||||||
|
|
||||||
QTimer m_updateCodeModelTimer;
|
QTimer m_updateCodeModelTimer;
|
||||||
|
QTimer m_addUiFilesTimer;
|
||||||
|
QStringList m_uiFilesToAdd;
|
||||||
Internal::GCCPreprocessor m_preproc;
|
Internal::GCCPreprocessor m_preproc;
|
||||||
|
|
||||||
friend class Qt4ProjectFile;
|
friend class Qt4ProjectFile;
|
||||||
|
@@ -247,6 +247,7 @@ QString Qt4RunConfiguration::proFilePath() const
|
|||||||
void Qt4RunConfiguration::updateCachedValues()
|
void Qt4RunConfiguration::updateCachedValues()
|
||||||
{
|
{
|
||||||
ProFileReader *reader = static_cast<Qt4Project *>(project())->createProFileReader();
|
ProFileReader *reader = static_cast<Qt4Project *>(project())->createProFileReader();
|
||||||
|
reader->setCumulative(false);
|
||||||
if (!reader->readProFile(m_proFilePath)) {
|
if (!reader->readProFile(m_proFilePath)) {
|
||||||
delete reader;
|
delete reader;
|
||||||
Core::ICore::instance()->messageManager()->printToOutputPane(QString("Could not parse %1. The Qt4 run configuration %2 can not be started.").arg(m_proFilePath).arg(name()));
|
Core::ICore::instance()->messageManager()->printToOutputPane(QString("Could not parse %1. The Qt4 run configuration %2 can not be started.").arg(m_proFilePath).arg(name()));
|
||||||
|
@@ -56,9 +56,7 @@ QT_END_NAMESPACE
|
|||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QRegExp>
|
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtCore/QDebug>
|
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtGui/QContextMenuEvent>
|
#include <QtGui/QContextMenuEvent>
|
||||||
|
@@ -38,7 +38,6 @@ namespace ResourceEditor {
|
|||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
const char * const C_RESOURCEEDITOR = "Resource Editor";
|
const char * const C_RESOURCEEDITOR = "Resource Editor";
|
||||||
const char * const C_RESOURCEWINDOW = "Resourcewindow";
|
|
||||||
const char * const C_RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
|
const char * const C_RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
|
@@ -161,7 +161,7 @@ bool ResourceEditorFile::save(const QString &name /*= QString()*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *ResourceEditorW::kind() const {
|
const char *ResourceEditorW::kind() const {
|
||||||
return ResourceEditor::Constants::C_RESOURCEWINDOW;
|
return ResourceEditor::Constants::C_RESOURCEEDITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ResourceEditorFile::fileName() const
|
QString ResourceEditorFile::fileName() const
|
||||||
|
@@ -215,9 +215,9 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="cleanIndentationLayout">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="cleanIndentationSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@@ -2508,7 +2508,8 @@ bool Parser::parseBoolLiteral(ExpressionAST *&node)
|
|||||||
|
|
||||||
bool Parser::parseNumericLiteral(ExpressionAST *&node)
|
bool Parser::parseNumericLiteral(ExpressionAST *&node)
|
||||||
{
|
{
|
||||||
if (LA() == T_INT_LITERAL || LA() == T_FLOAT_LITERAL || LA() == T_CHAR_LITERAL) {
|
if (LA() == T_INT_LITERAL || LA() == T_FLOAT_LITERAL ||
|
||||||
|
LA() == T_CHAR_LITERAL || LA() == T_WIDE_CHAR_LITERAL) {
|
||||||
NumericLiteralAST *ast = new (_pool) NumericLiteralAST;
|
NumericLiteralAST *ast = new (_pool) NumericLiteralAST;
|
||||||
ast->token = consumeToken();
|
ast->token = consumeToken();
|
||||||
node = ast;
|
node = ast;
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include <QtGui/QFileDialog>
|
#include <QtGui/QFileDialog>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|
||||||
namespace SharedTools {
|
using namespace SharedTools;
|
||||||
|
|
||||||
QrcEditor::QrcEditor(QWidget *parent)
|
QrcEditor::QrcEditor(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
@@ -96,8 +96,6 @@ QrcEditor::QrcEditor(QWidget *parent)
|
|||||||
|
|
||||||
connect(&m_history, SIGNAL(canRedoChanged(bool)), this, SLOT(updateHistoryControls()));
|
connect(&m_history, SIGNAL(canRedoChanged(bool)), this, SLOT(updateHistoryControls()));
|
||||||
connect(&m_history, SIGNAL(canUndoChanged(bool)), this, SLOT(updateHistoryControls()));
|
connect(&m_history, SIGNAL(canUndoChanged(bool)), this, SLOT(updateHistoryControls()));
|
||||||
connect(&m_history, SIGNAL(canRedoChanged(bool)), this, SLOT(updateCurrent()));
|
|
||||||
connect(&m_history, SIGNAL(canUndoChanged(bool)), this, SLOT(updateCurrent()));
|
|
||||||
updateHistoryControls();
|
updateHistoryControls();
|
||||||
updateCurrent();
|
updateCurrent();
|
||||||
}
|
}
|
||||||
@@ -151,28 +149,21 @@ void QrcEditor::updateCurrent()
|
|||||||
const bool isValid = m_treeview->currentIndex().isValid();
|
const bool isValid = m_treeview->currentIndex().isValid();
|
||||||
const bool isPrefix = m_treeview->isPrefix(m_treeview->currentIndex()) && isValid;
|
const bool isPrefix = m_treeview->isPrefix(m_treeview->currentIndex()) && isValid;
|
||||||
const bool isFile = !isPrefix && isValid;
|
const bool isFile = !isPrefix && isValid;
|
||||||
int cursorPosition;
|
|
||||||
|
|
||||||
m_ui.aliasLabel->setEnabled(isFile);
|
m_ui.aliasLabel->setEnabled(isFile);
|
||||||
m_ui.aliasText->setEnabled(isFile);
|
m_ui.aliasText->setEnabled(isFile);
|
||||||
m_currentAlias = m_treeview->currentAlias();
|
m_currentAlias = m_treeview->currentAlias();
|
||||||
cursorPosition = m_ui.aliasText->cursorPosition();
|
|
||||||
m_ui.aliasText->setText(m_currentAlias);
|
m_ui.aliasText->setText(m_currentAlias);
|
||||||
m_ui.aliasText->setCursorPosition(cursorPosition);
|
|
||||||
|
|
||||||
m_ui.prefixLabel->setEnabled(isPrefix);
|
m_ui.prefixLabel->setEnabled(isPrefix);
|
||||||
m_ui.prefixText->setEnabled(isPrefix);
|
m_ui.prefixText->setEnabled(isPrefix);
|
||||||
m_currentPrefix = m_treeview->currentPrefix();
|
m_currentPrefix = m_treeview->currentPrefix();
|
||||||
cursorPosition = m_ui.prefixText->cursorPosition();
|
|
||||||
m_ui.prefixText->setText(m_currentPrefix);
|
m_ui.prefixText->setText(m_currentPrefix);
|
||||||
m_ui.prefixText->setCursorPosition(cursorPosition);
|
|
||||||
|
|
||||||
m_ui.languageLabel->setEnabled(isPrefix);
|
m_ui.languageLabel->setEnabled(isPrefix);
|
||||||
m_ui.languageText->setEnabled(isPrefix);
|
m_ui.languageText->setEnabled(isPrefix);
|
||||||
m_currentLanguage = m_treeview->currentLanguage();
|
m_currentLanguage = m_treeview->currentLanguage();
|
||||||
cursorPosition = m_ui.languageText->cursorPosition();
|
|
||||||
m_ui.languageText->setText(m_currentLanguage);
|
m_ui.languageText->setText(m_currentLanguage);
|
||||||
m_ui.languageText->setCursorPosition(cursorPosition);
|
|
||||||
|
|
||||||
m_ui.addButton->setEnabled(true);
|
m_ui.addButton->setEnabled(true);
|
||||||
m_addFileAction->setEnabled(isValid);
|
m_addFileAction->setEnabled(isValid);
|
||||||
@@ -225,7 +216,6 @@ void QrcEditor::resolveLocationIssues(QStringList &files)
|
|||||||
QMessageBox message(this);
|
QMessageBox message(this);
|
||||||
message.setWindowTitle(tr("Invalid file"));
|
message.setWindowTitle(tr("Invalid file"));
|
||||||
message.setIcon(QMessageBox::Warning);
|
message.setIcon(QMessageBox::Warning);
|
||||||
QPushButton * const continueButton = message.addButton(tr("Add anyway"), QMessageBox::AcceptRole);
|
|
||||||
QPushButton * const copyButton = message.addButton(tr("Copy"), QMessageBox::ActionRole);
|
QPushButton * const copyButton = message.addButton(tr("Copy"), QMessageBox::ActionRole);
|
||||||
QPushButton * const skipButton = message.addButton(tr("Don't add"), QMessageBox::DestructiveRole);
|
QPushButton * const skipButton = message.addButton(tr("Don't add"), QMessageBox::DestructiveRole);
|
||||||
QPushButton * const abortButton = message.addButton(tr("Abort"), QMessageBox::RejectRole);
|
QPushButton * const abortButton = message.addButton(tr("Abort"), QMessageBox::RejectRole);
|
||||||
@@ -234,9 +224,7 @@ void QrcEditor::resolveLocationIssues(QStringList &files)
|
|||||||
message.setText(tr("The file %1 is not in a subdirectory of the resource file. Continuing will result in an invalid resource file.")
|
message.setText(tr("The file %1 is not in a subdirectory of the resource file. Continuing will result in an invalid resource file.")
|
||||||
.arg(QDir::toNativeSeparators(file)));
|
.arg(QDir::toNativeSeparators(file)));
|
||||||
message.exec();
|
message.exec();
|
||||||
if (message.clickedButton() == continueButton) {
|
if (message.clickedButton() == skipButton) {
|
||||||
continue;
|
|
||||||
} else if (message.clickedButton() == skipButton) {
|
|
||||||
files.removeAt(i);
|
files.removeAt(i);
|
||||||
count--;
|
count--;
|
||||||
i--; // Compensate i++
|
i--; // Compensate i++
|
||||||
@@ -246,6 +234,11 @@ void QrcEditor::resolveLocationIssues(QStringList &files)
|
|||||||
const QString copyName = QFileDialog::getSaveFileName(this, tr("Choose copy location"),
|
const QString copyName = QFileDialog::getSaveFileName(this, tr("Choose copy location"),
|
||||||
suggestion.absoluteFilePath());
|
suggestion.absoluteFilePath());
|
||||||
if (!copyName.isEmpty()) {
|
if (!copyName.isEmpty()) {
|
||||||
|
QString relPath = dir.relativeFilePath(copyName);
|
||||||
|
if (relPath.startsWith(dotdotSlash)) { // directory is still invalid
|
||||||
|
i--; // Compensate i++ and try again
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (QFile::exists(copyName)) {
|
if (QFile::exists(copyName)) {
|
||||||
if (!QFile::remove(copyName)) {
|
if (!QFile::remove(copyName)) {
|
||||||
QMessageBox::critical(this, tr("Overwrite failed"),
|
QMessageBox::critical(this, tr("Overwrite failed"),
|
||||||
@@ -405,5 +398,3 @@ void QrcEditor::onRedo()
|
|||||||
updateCurrent();
|
updateCurrent();
|
||||||
updateHistoryControls();
|
updateHistoryControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace SharedTools
|
|
||||||
|
@@ -54,6 +54,19 @@ TRANSLATOR qdesigner_internal::ResourceModel
|
|||||||
|
|
||||||
namespace qdesigner_internal {
|
namespace qdesigner_internal {
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
** FileList
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool FileList::containsFile(File *file)
|
||||||
|
{
|
||||||
|
foreach (const File *tmpFile, *this)
|
||||||
|
if (tmpFile->name == file->name && tmpFile->prefix() == file->prefix())
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
** ResourceFile
|
** ResourceFile
|
||||||
*/
|
*/
|
||||||
@@ -155,7 +168,7 @@ bool ResourceFile::save()
|
|||||||
foreach (const QString &name, name_list) {
|
foreach (const QString &name, name_list) {
|
||||||
FileList file_list;
|
FileList file_list;
|
||||||
QString lang;
|
QString lang;
|
||||||
foreach (Prefix *pref, m_prefix_list) {
|
foreach (const Prefix *pref, m_prefix_list) {
|
||||||
if (pref->name == name){
|
if (pref->name == name){
|
||||||
file_list += pref->file_list;
|
file_list += pref->file_list;
|
||||||
lang = pref->lang;
|
lang = pref->lang;
|
||||||
@@ -375,7 +388,7 @@ bool ResourceFile::contains(const QString &prefix, const QString &file) const
|
|||||||
Prefix * const p = m_prefix_list.at(pref_idx);
|
Prefix * const p = m_prefix_list.at(pref_idx);
|
||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
File equalFile(p, absolutePath(file));
|
File equalFile(p, absolutePath(file));
|
||||||
return p->file_list.contains(&equalFile);
|
return p->file_list.containsFile(&equalFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ResourceFile::contains(int pref_idx, const QString &file) const
|
bool ResourceFile::contains(int pref_idx, const QString &file) const
|
||||||
@@ -383,7 +396,7 @@ bool ResourceFile::contains(int pref_idx, const QString &file) const
|
|||||||
Q_ASSERT(pref_idx >= 0 && pref_idx < m_prefix_list.count());
|
Q_ASSERT(pref_idx >= 0 && pref_idx < m_prefix_list.count());
|
||||||
Prefix * const p = m_prefix_list.at(pref_idx);
|
Prefix * const p = m_prefix_list.at(pref_idx);
|
||||||
File equalFile(p, absolutePath(file));
|
File equalFile(p, absolutePath(file));
|
||||||
return p->file_list.contains(&equalFile);
|
return p->file_list.containsFile(&equalFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/ QString ResourceFile::fixPrefix(const QString &prefix)
|
/*static*/ QString ResourceFile::fixPrefix(const QString &prefix)
|
||||||
@@ -586,7 +599,7 @@ bool ResourceModel::iconFileExtension(const QString &path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (QString ext, ext_list) {
|
foreach (const QString &ext, ext_list) {
|
||||||
if (path.endsWith(ext, Qt::CaseInsensitive))
|
if (path.endsWith(ext, Qt::CaseInsensitive))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -606,12 +619,12 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
void * const internalPointer = index.internalPointer();
|
const void *internalPointer = index.internalPointer();
|
||||||
Node * const node = reinterpret_cast<Node *>(internalPointer);
|
const Node *node = reinterpret_cast<const Node *>(internalPointer);
|
||||||
Prefix const * const prefix = node->prefix();
|
const Prefix *prefix = node->prefix();
|
||||||
File const * const file = node->file();
|
File *file = node->file();
|
||||||
Q_ASSERT(prefix);
|
Q_ASSERT(prefix);
|
||||||
bool const isFileNode = (prefix != node);
|
const bool isFileNode = (prefix != node);
|
||||||
|
|
||||||
QVariant result;
|
QVariant result;
|
||||||
|
|
||||||
@@ -628,7 +641,8 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
|
|||||||
} else {
|
} else {
|
||||||
// File node
|
// File node
|
||||||
Q_ASSERT(file);
|
Q_ASSERT(file);
|
||||||
stringRes = QFileInfo(file->name).fileName();
|
QString conv_file = m_resource_file.relativePath(file->name);
|
||||||
|
stringRes = conv_file.replace(QDir::separator(), QLatin1Char('/'));
|
||||||
const QString alias = file->alias;
|
const QString alias = file->alias;
|
||||||
if (!alias.isEmpty())
|
if (!alias.isEmpty())
|
||||||
appendParenthesized(alias, stringRes);
|
appendParenthesized(alias, stringRes);
|
||||||
@@ -640,29 +654,15 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
|
|||||||
if (isFileNode) {
|
if (isFileNode) {
|
||||||
// File node
|
// File node
|
||||||
Q_ASSERT(file);
|
Q_ASSERT(file);
|
||||||
|
if (file->icon.isNull()) {
|
||||||
const QString path = m_resource_file.absolutePath(file->name);
|
const QString path = m_resource_file.absolutePath(file->name);
|
||||||
if (iconFileExtension(path)) {
|
if (iconFileExtension(path))
|
||||||
const QIcon icon(path);
|
file->icon = QIcon(path);
|
||||||
if (!icon.isNull())
|
|
||||||
result = icon;
|
|
||||||
}
|
}
|
||||||
|
if (!file->icon.isNull())
|
||||||
|
result = file->icon;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::ToolTipRole:
|
|
||||||
if (isFileNode) {
|
|
||||||
// File node
|
|
||||||
Q_ASSERT(file);
|
|
||||||
QString conv_file = m_resource_file.relativePath(file->name);
|
|
||||||
QString stringRes = conv_file.replace(QDir::separator(), QLatin1Char('/'));
|
|
||||||
const QString &alias_file = file->alias;
|
|
||||||
if (!alias_file.isEmpty())
|
|
||||||
appendParenthesized(alias_file, stringRes);
|
|
||||||
|
|
||||||
result = stringRes;
|
|
||||||
result = "Qt::ToolTipRole " + stringRes;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -677,14 +677,14 @@ void ResourceModel::getItem(const QModelIndex &index, QString &prefix, QString &
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
void * const internalPointer = index.internalPointer();
|
const void *internalPointer = index.internalPointer();
|
||||||
Node * const node = reinterpret_cast<Node *>(internalPointer);
|
const Node *node = reinterpret_cast<const Node *>(internalPointer);
|
||||||
Prefix * const p = node->prefix();
|
const Prefix *p = node->prefix();
|
||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
bool const isFileNode = (p != node);
|
const bool isFileNode = (p != node);
|
||||||
|
|
||||||
if (isFileNode) {
|
if (isFileNode) {
|
||||||
File *const f = node->file();
|
const File *f = node->file();
|
||||||
Q_ASSERT(f);
|
Q_ASSERT(f);
|
||||||
if (!f->alias.isEmpty())
|
if (!f->alias.isEmpty())
|
||||||
file = f->alias;
|
file = f->alias;
|
||||||
@@ -797,7 +797,7 @@ void ResourceModel::addFiles(int prefixIndex, const QStringList &fileNames, int
|
|||||||
const int prefix_idx = prefixIndex;
|
const int prefix_idx = prefixIndex;
|
||||||
|
|
||||||
QStringList unique_list;
|
QStringList unique_list;
|
||||||
foreach (QString file, file_list) {
|
foreach (const QString &file, file_list) {
|
||||||
if (!m_resource_file.contains(prefix_idx, file) && !unique_list.contains(file))
|
if (!m_resource_file.contains(prefix_idx, file) && !unique_list.contains(file))
|
||||||
unique_list.append(file);
|
unique_list.append(file);
|
||||||
}
|
}
|
||||||
@@ -808,7 +808,7 @@ void ResourceModel::addFiles(int prefixIndex, const QStringList &fileNames, int
|
|||||||
const int cnt = m_resource_file.fileCount(prefix_idx);
|
const int cnt = m_resource_file.fileCount(prefix_idx);
|
||||||
beginInsertRows(prefix_model_idx, cnt, cnt + unique_list.count() - 1); // ### FIXME
|
beginInsertRows(prefix_model_idx, cnt, cnt + unique_list.count() - 1); // ### FIXME
|
||||||
|
|
||||||
foreach (QString file, file_list)
|
foreach (const QString &file, unique_list)
|
||||||
m_resource_file.addFile(prefix_idx, file);
|
m_resource_file.addFile(prefix_idx, file);
|
||||||
|
|
||||||
const QFileInfo fi(file_list.last());
|
const QFileInfo fi(file_list.last());
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
#include <QtGui/QIcon>
|
||||||
|
|
||||||
#include "shared_global_p.h"
|
#include "shared_global_p.h"
|
||||||
|
|
||||||
@@ -69,8 +70,8 @@ protected:
|
|||||||
Q_ASSERT(m_prefix);
|
Q_ASSERT(m_prefix);
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
File *file() { return m_file; }
|
File *file() const { return m_file; }
|
||||||
Prefix *prefix() { return m_prefix; }
|
Prefix *prefix() const { return m_prefix; }
|
||||||
private:
|
private:
|
||||||
File *m_file;
|
File *m_file;
|
||||||
Prefix *m_prefix;
|
Prefix *m_prefix;
|
||||||
@@ -89,8 +90,14 @@ struct File : public Node {
|
|||||||
bool operator != (const File &other) const { return name != other.name; }
|
bool operator != (const File &other) const { return name != other.name; }
|
||||||
QString name;
|
QString name;
|
||||||
QString alias;
|
QString alias;
|
||||||
|
QIcon icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FileList : public QList<File *>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool containsFile(File *file);
|
||||||
};
|
};
|
||||||
typedef QList<File *> FileList;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Prefix
|
\class Prefix
|
||||||
|
@@ -382,6 +382,14 @@ void ResourceView::mouseReleaseEvent(QMouseEvent *e)
|
|||||||
QTreeView::mouseReleaseEvent(e);
|
QTreeView::mouseReleaseEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ResourceView::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if (e->key() == Qt::Key_Delete)
|
||||||
|
removeItem();
|
||||||
|
else
|
||||||
|
QTreeView::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
void ResourceView::popupMenu(const QModelIndex &index)
|
void ResourceView::popupMenu(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
if (!m_releasePos.isNull()) {
|
if (!m_releasePos.isNull()) {
|
||||||
|
@@ -138,6 +138,7 @@ protected:
|
|||||||
void changeLang(const QModelIndex &index);
|
void changeLang(const QModelIndex &index);
|
||||||
void changeAlias(const QModelIndex &index);
|
void changeAlias(const QModelIndex &index);
|
||||||
void mouseReleaseEvent(QMouseEvent *e);
|
void mouseReleaseEvent(QMouseEvent *e);
|
||||||
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void removeItem();
|
void removeItem();
|
||||||
|
@@ -9,7 +9,7 @@ SOURCES = customwidgets.cpp
|
|||||||
|
|
||||||
# Link against the qtcreator utils lib
|
# Link against the qtcreator utils lib
|
||||||
|
|
||||||
unix {
|
linux-* {
|
||||||
# form abs path to qtcreator lib dir
|
# form abs path to qtcreator lib dir
|
||||||
GH_LIB=$$dirname(PWD)
|
GH_LIB=$$dirname(PWD)
|
||||||
GH_LIB=$$dirname(GH_LIB)
|
GH_LIB=$$dirname(GH_LIB)
|
||||||
@@ -19,7 +19,13 @@ unix {
|
|||||||
}
|
}
|
||||||
|
|
||||||
INCLUDEPATH += ../../../src/libs
|
INCLUDEPATH += ../../../src/libs
|
||||||
|
macx {
|
||||||
|
LIBS += -L../../../bin/QtCreator.app/Contents/PlugIns
|
||||||
|
CONFIG(debug, debug|release):LIBS += -lUtils_debug
|
||||||
|
else:LIBS += -lUtils
|
||||||
|
} else {
|
||||||
LIBS += -L../../../lib -lUtils
|
LIBS += -L../../../lib -lUtils
|
||||||
|
}
|
||||||
|
|
||||||
DESTDIR= $$[QT_INSTALL_PLUGINS]/designer
|
DESTDIR= $$[QT_INSTALL_PLUGINS]/designer
|
||||||
|
|
||||||
|
@@ -35,8 +35,15 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
#include "binpatch.h"
|
#include "binpatch.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
# define strcasecmp _stricmp
|
||||||
|
# define strncasecmp _strnicmp
|
||||||
|
#endif
|
||||||
|
|
||||||
// returns positive value if it finds a null termination inside the buffer
|
// returns positive value if it finds a null termination inside the buffer
|
||||||
long BinPatch::getBufferStringLength(char *data, char *end)
|
long BinPatch::getBufferStringLength(char *data, char *end)
|
||||||
{
|
{
|
||||||
@@ -181,7 +188,7 @@ bool BinPatch::patch(const char *oldstr, const char *newstr)
|
|||||||
|
|
||||||
if (!(input = fopen(fileName, "r+b")))
|
if (!(input = fopen(fileName, "r+b")))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Cannot open file %s!\n", fileName);
|
fprintf(stderr, "Warning: Could not open file %s\n", fileName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,8 +42,10 @@
|
|||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
const char * const oldInstallBase = "C:/qt-greenhouse/Trolltech/Code_less_create_more/"
|
# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3";
|
||||||
"Trolltech/Code_less_create_more/Troll/4.4.3";
|
|
||||||
|
const char * const oldInstallBase = QT_INSTALL_DIR;
|
||||||
|
const char * const oldSourceBase = QT_INSTALL_DIR;
|
||||||
#else
|
#else
|
||||||
const char * const oldSourceBase = "/home/berlin/dev/qt-4.4.3-temp/qt-x11-opensource-src-4.4.3";
|
const char * const oldSourceBase = "/home/berlin/dev/qt-4.4.3-temp/qt-x11-opensource-src-4.4.3";
|
||||||
const char * const oldInstallBase = "/home/berlin/dev/qt-4.4.3-shipping/qt";
|
const char * const oldInstallBase = "/home/berlin/dev/qt-4.4.3-shipping/qt";
|
||||||
@@ -85,13 +87,13 @@ bool patchBinaryWithQtPathes(const char *fileName, const char *baseQtPath)
|
|||||||
|
|
||||||
logFileName(fileName);
|
logFileName(fileName);
|
||||||
for (int i = 0; i < (int)(sizeof(variables) / sizeof(variables[0])); i++) {
|
for (int i = 0; i < (int)(sizeof(variables) / sizeof(variables[0])); i++) {
|
||||||
const char * const newStr = allocFileNameCopyAppend(variables[i].variable, baseQtPath, variables[i].subDirectory);
|
const char * const newStr = allocFileNameCopyAppend(
|
||||||
|
variables[i].variable, baseQtPath, variables[i].subDirectory);
|
||||||
BinPatch binFile(fileName);
|
BinPatch binFile(fileName);
|
||||||
const bool success = binFile.patch(variables[i].variable, newStr);
|
const bool success = binFile.patch(variables[i].variable, newStr);
|
||||||
delete[] newStr;
|
delete[] newStr;
|
||||||
if (!success) {
|
if (!success) {
|
||||||
result = false;
|
result = false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +121,6 @@ bool patchBinariesWithQtPathes(const char *baseQtPath)
|
|||||||
delete[] fileName;
|
delete[] fileName;
|
||||||
if (!success) {
|
if (!success) {
|
||||||
result = false;
|
result = false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,9 +603,6 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
|
|||||||
delete[] fileName;
|
delete[] fileName;
|
||||||
delete[] oldSourcePath;
|
delete[] oldSourcePath;
|
||||||
delete[] newSourcePath;
|
delete[] newSourcePath;
|
||||||
|
|
||||||
if (!result)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -631,83 +629,83 @@ void patchQMakeSpec(const char *path)
|
|||||||
out << all;
|
out << all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
const char * const textFileFileNames[] =
|
const char * const textFileFileNames[] =
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
// *.la
|
// *.la
|
||||||
"lib/libQtCore.la",
|
"/lib/libQtCore.la",
|
||||||
"lib/libQt3Support.la",
|
"/lib/libQt3Support.la",
|
||||||
"lib/libQtCLucene.la",
|
"/lib/libQtCLucene.la",
|
||||||
"lib/libQtDBus.la",
|
"/lib/libQtDBus.la",
|
||||||
"lib/libQtGui.la",
|
"/lib/libQtGui.la",
|
||||||
"lib/libQtHelp.la",
|
"/lib/libQtHelp.la",
|
||||||
"lib/libQtNetwork.la",
|
"/lib/libQtNetwork.la",
|
||||||
"lib/libQtOpenGL.la",
|
"/lib/libQtOpenGL.la",
|
||||||
"lib/libQtScript.la",
|
"/lib/libQtScript.la",
|
||||||
"lib/libQtSql.la",
|
"/lib/libQtSql.la",
|
||||||
"lib/libQtSvg.la",
|
"/lib/libQtSvg.la",
|
||||||
"lib/libQtTest.la",
|
"/lib/libQtTest.la",
|
||||||
"lib/libQtWebKit.la",
|
"/lib/libQtWebKit.la",
|
||||||
"lib/libQtXml.la",
|
"/lib/libQtXml.la",
|
||||||
"lib/libQtXmlPatterns.la",
|
"/lib/libQtXmlPatterns.la",
|
||||||
|
|
||||||
// *.prl
|
// *.prl
|
||||||
"demos/shared/libdemo_shared.prl",
|
"/demos/shared/libdemo_shared.prl",
|
||||||
"lib/libQt3Support.prl",
|
"/lib/libQt3Support.prl",
|
||||||
"lib/libQtAssistantClient.prl",
|
"/lib/libQtAssistantClient.prl",
|
||||||
"lib/libQtCLucene.prl",
|
"/lib/libQtCLucene.prl",
|
||||||
"lib/libQtCore.prl",
|
"/lib/libQtCore.prl",
|
||||||
"lib/libQtDBus.prl",
|
"/lib/libQtDBus.prl",
|
||||||
"lib/libQtDesignerComponents.prl",
|
"/lib/libQtDesignerComponents.prl",
|
||||||
"lib/libQtDesigner.prl",
|
"/lib/libQtDesigner.prl",
|
||||||
"lib/libQtGui.prl",
|
"/lib/libQtGui.prl",
|
||||||
"lib/libQtHelp.prl",
|
"/lib/libQtHelp.prl",
|
||||||
"lib/libQtNetwork.prl",
|
"/lib/libQtNetwork.prl",
|
||||||
"lib/libQtOpenGL.prl",
|
"/lib/libQtOpenGL.prl",
|
||||||
"lib/libQtScript.prl",
|
"/lib/libQtScript.prl",
|
||||||
"lib/libQtSql.prl",
|
"/lib/libQtSql.prl",
|
||||||
"lib/libQtSvg.prl",
|
"/lib/libQtSvg.prl",
|
||||||
"lib/libQtTest.prl",
|
"/lib/libQtTest.prl",
|
||||||
"lib/libQtUiTools.prl",
|
"/lib/libQtUiTools.prl",
|
||||||
"lib/libQtWebKit.prl",
|
"/lib/libQtWebKit.prl",
|
||||||
"lib/libQtXmlPatterns.prl",
|
"/lib/libQtXmlPatterns.prl",
|
||||||
"lib/libQtXml.prl",
|
"/lib/libQtXml.prl",
|
||||||
|
|
||||||
// *.pc
|
// *.pc
|
||||||
"lib/pkgconfig/Qt3Support.pc",
|
"/lib/pkgconfig/Qt3Support.pc",
|
||||||
"lib/pkgconfig/QtAssistantClient.pc",
|
"/lib/pkgconfig/QtAssistantClient.pc",
|
||||||
"lib/pkgconfig/QtCLucene.pc",
|
"/lib/pkgconfig/QtCLucene.pc",
|
||||||
"lib/pkgconfig/QtCore.pc",
|
"/lib/pkgconfig/QtCore.pc",
|
||||||
"lib/pkgconfig/QtDBus.pc",
|
"/lib/pkgconfig/QtDBus.pc",
|
||||||
"lib/pkgconfig/QtDesignerComponents.pc",
|
"/lib/pkgconfig/QtDesignerComponents.pc",
|
||||||
"lib/pkgconfig/QtDesigner.pc",
|
"/lib/pkgconfig/QtDesigner.pc",
|
||||||
"lib/pkgconfig/QtGui.pc",
|
"/lib/pkgconfig/QtGui.pc",
|
||||||
"lib/pkgconfig/QtHelp.pc",
|
"/lib/pkgconfig/QtHelp.pc",
|
||||||
"lib/pkgconfig/QtNetwork.pc",
|
"/lib/pkgconfig/QtNetwork.pc",
|
||||||
"lib/pkgconfig/QtOpenGL.pc",
|
"/lib/pkgconfig/QtOpenGL.pc",
|
||||||
"lib/pkgconfig/QtScript.pc",
|
"/lib/pkgconfig/QtScript.pc",
|
||||||
"lib/pkgconfig/QtSql.pc",
|
"/lib/pkgconfig/QtSql.pc",
|
||||||
"lib/pkgconfig/QtSvg.pc",
|
"/lib/pkgconfig/QtSvg.pc",
|
||||||
"lib/pkgconfig/QtTest.pc",
|
"/lib/pkgconfig/QtTest.pc",
|
||||||
"lib/pkgconfig/QtUiTools.pc",
|
"/lib/pkgconfig/QtUiTools.pc",
|
||||||
"lib/pkgconfig/QtWebKit.pc",
|
"/lib/pkgconfig/QtWebKit.pc",
|
||||||
"lib/pkgconfig/QtXmlPatterns.pc",
|
"/lib/pkgconfig/QtXmlPatterns.pc",
|
||||||
"lib/pkgconfig/QtXml.pc",
|
"/lib/pkgconfig/QtXml.pc",
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
"mkspecs/qconfig.pri"
|
"/mkspecs/qconfig.pri"
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void replaceInTextFile(const char * fileName,
|
void replaceInTextFile(const char * fileName,
|
||||||
const char * oldText, const char * newText,
|
const char * oldText, const char * newText,
|
||||||
const char * oldText2 = NULL, const char * newText2 = NULL)
|
const char * oldText2 = NULL, const char * newText2 = NULL)
|
||||||
{
|
{
|
||||||
const QString errorMessage = QString("Could not patch file ") + fileName;
|
const QString errorMessage = QString("Warning: Could not patch file ") + fileName;
|
||||||
|
|
||||||
QFile f(fileName);
|
QFile f(fileName);
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
if (!f.open(QIODevice::ReadOnly)) {
|
||||||
std::cout << qPrintable(errorMessage) << std::endl;
|
std::cerr << qPrintable(errorMessage) << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QTextStream in(&f);
|
QTextStream in(&f);
|
||||||
@@ -720,7 +718,7 @@ void replaceInTextFile(const char * fileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!f.open(QIODevice::WriteOnly)) {
|
if (!f.open(QIODevice::WriteOnly)) {
|
||||||
std::cout << qPrintable(errorMessage) << std::endl;
|
std::cerr << qPrintable(errorMessage) << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QTextStream out(&f);
|
QTextStream out(&f);
|
||||||
@@ -730,20 +728,21 @@ void replaceInTextFile(const char * fileName,
|
|||||||
|
|
||||||
void patchTextFiles(const char *newInstallBase)
|
void patchTextFiles(const char *newInstallBase)
|
||||||
{
|
{
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
|
const char * const baseQtPath = newInstallBase;
|
||||||
const char * const newSourceBase = newInstallBase;
|
const char * const newSourceBase = newInstallBase;
|
||||||
const int fileCount = sizeof(textFileFileNames) / sizeof(const char *);
|
const int fileCount = sizeof(textFileFileNames) / sizeof(const char *);
|
||||||
for (int i = 0; i < fileCount; i++) {
|
for (int i = 0; i < fileCount; i++) {
|
||||||
logFileName(textFileFileNames[i]);
|
char * const fileName = allocFileNameCopyAppend(baseQtPath, textFileFileNames[i]);
|
||||||
|
logFileName(fileName);
|
||||||
logDiff(oldSourceBase, newSourceBase);
|
logDiff(oldSourceBase, newSourceBase);
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
logDiff(oldInstallBase, newInstallBase);
|
logDiff(oldInstallBase, newInstallBase);
|
||||||
#endif
|
replaceInTextFile(fileName,
|
||||||
replaceInTextFile(textFileFileNames[i],
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
oldSourceBase, newSourceBase,
|
oldSourceBase, newSourceBase,
|
||||||
#endif
|
|
||||||
oldInstallBase, newInstallBase);
|
oldInstallBase, newInstallBase);
|
||||||
|
delete[] fileName;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
patchQMakeSpec(newInstallBase);
|
patchQMakeSpec(newInstallBase);
|
||||||
}
|
}
|
||||||
@@ -774,8 +773,8 @@ int main(int argc, char *args[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
patchTextFiles(baseQtPath);
|
patchTextFiles(baseQtPath);
|
||||||
const bool success = patchBinariesWithQtPathes(baseQtPath)
|
patchBinariesWithQtPathes(baseQtPath);
|
||||||
&& patchDebugLibrariesWithQtPath(baseQtPath);
|
patchDebugLibrariesWithQtPath(baseQtPath);
|
||||||
delete[] baseQtPath;
|
delete[] baseQtPath;
|
||||||
return success ? 0 : 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -159,16 +159,27 @@ void testQHash()
|
|||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
|
||||||
QHash<QString, float> hgg1;
|
QHash<QString, int> hgg1;
|
||||||
hgg1["22.0"] = 22.0;
|
hgg1["22.0"] = 22.0;
|
||||||
hgg1["23.0"] = 22.0;
|
hgg1["123.0"] = 22.0;
|
||||||
hgg1["24.0"] = 22.0;
|
hgg1["111111ss111128.0"] = 28.0;
|
||||||
hgg1["25.0"] = 22.0;
|
hgg1["11124.0"] = 22.0;
|
||||||
hgg1["26.0"] = 22.0;
|
hgg1["1111125.0"] = 22.0;
|
||||||
hgg1["27.0"] = 27.0;
|
hgg1["11111126.0"] = 22.0;
|
||||||
hgg1["28.0"] = 28.0;
|
hgg1["111111127.0"] = 27.0;
|
||||||
hgg1["29.0"] = 29.0;
|
hgg1["111111111128.0"] = 28.0;
|
||||||
|
hgg1["111111111111111111129.0"] = 29.0;
|
||||||
|
|
||||||
|
QHash<QByteArray, float> hgx1;
|
||||||
|
hgx1["22.0"] = 22.0;
|
||||||
|
hgx1["123.0"] = 22.0;
|
||||||
|
hgx1["111111ss111128.0"] = 28.0;
|
||||||
|
hgx1["11124.0"] = 22.0;
|
||||||
|
hgx1["1111125.0"] = 22.0;
|
||||||
|
hgx1["11111126.0"] = 22.0;
|
||||||
|
hgx1["111111127.0"] = 27.0;
|
||||||
|
hgx1["111111111128.0"] = 28.0;
|
||||||
|
hgx1["111111111111111111129.0"] = 29.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
Reference in New Issue
Block a user