Changeset 561 for trunk/src/scripttools/debugging
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 142 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/scripttools/debugging/debugging.pri
r2 r561 112 112 $$PWD/qscriptbreakpointsmodel.cpp \ 113 113 $$PWD/qscripterrorlogwidgetinterface.cpp \ 114 $$PWD/qscripterrorlogwidget.cpp 114 $$PWD/qscripterrorlogwidget.cpp \ 115 $$PWD/qscriptdebuggerstandardwidgetfactory.cpp 115 116 116 117 HEADERS += \ … … 149 150 $$PWD/qscripterrorlogwidgetinterface_p.h \ 150 151 $$PWD/qscripterrorlogwidget_p.h \ 151 $$PWD/qscriptdebuggerwidgetfactoryinterface_p.h 152 $$PWD/qscriptdebuggerwidgetfactoryinterface_p.h \ 153 $$PWD/qscriptdebuggerstandardwidgetfactory_p.h 152 154 153 155 SOURCES += \ -
trunk/src/scripttools/debugging/qscriptbreakpointdata.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 137 137 QScriptBreakpointData::~QScriptBreakpointData() 138 138 { 139 delete d_ptr;140 139 } 141 140 … … 356 355 QDataStream &operator<<(QDataStream &out, const QScriptBreakpointData &data) 357 356 { 358 const QScriptBreakpointDataPrivate *d = data.d_ptr ;357 const QScriptBreakpointDataPrivate *d = data.d_ptr.data(); 359 358 out << d->scriptId; 360 359 out << d->fileName; … … 378 377 QDataStream &operator>>(QDataStream &in, QScriptBreakpointData &data) 379 378 { 380 QScriptBreakpointDataPrivate *d = data.d_ptr ;379 QScriptBreakpointDataPrivate *d = data.d_ptr.data(); 381 380 in >> d->scriptId; 382 381 in >> d->fileName; -
trunk/src/scripttools/debugging/qscriptbreakpointdata_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qmap.h> 59 59 … … 115 115 116 116 private: 117 QSc riptBreakpointDataPrivate *d_ptr;117 QScopedPointer<QScriptBreakpointDataPrivate> d_ptr; 118 118 119 119 Q_DECLARE_PRIVATE(QScriptBreakpointData) -
trunk/src/scripttools/debugging/qscriptbreakpointsmodel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 48 48 49 49 #include <QtCore/qpair.h> 50 #include <QtCore/qcoreapplication.h> 50 51 #include <QtGui/qicon.h> 51 52 #include <QtCore/qdebug.h> … … 452 453 if (role == Qt::DisplayRole) { 453 454 if (section == 0) 454 return Q Object::tr("ID");455 return QCoreApplication::translate("QScriptBreakpointsModel", "ID"); 455 456 else if (section == 1) 456 return Q Object::tr("Location");457 return QCoreApplication::translate("QScriptBreakpointsModel", "Location"); 457 458 else if (section == 2) 458 return Q Object::tr("Condition");459 return QCoreApplication::translate("QScriptBreakpointsModel", "Condition"); 459 460 else if (section == 3) 460 return Q Object::tr("Ignore-count");461 return QCoreApplication::translate("QScriptBreakpointsModel", "Ignore-count"); 461 462 else if (section == 4) 462 return Q Object::tr("Single-shot");463 return QCoreApplication::translate("QScriptBreakpointsModel", "Single-shot"); 463 464 else if (section == 5) 464 return Q Object::tr("Hit-count");465 return QCoreApplication::translate("QScriptBreakpointsModel", "Hit-count"); 465 466 } 466 467 } -
trunk/src/scripttools/debugging/qscriptbreakpointsmodel_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptbreakpointswidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 79 79 toolClose->setIcon(QIcon(QString::fromUtf8(":/qt/scripttools/debugging/images/%1/closetab.png").arg(system))); 80 80 toolClose->setAutoRaise(true); 81 toolClose->setText( QObject::tr("Close"));81 toolClose->setText(tr("Close")); 82 82 hboxLayout->addWidget(toolClose); 83 83 … … 226 226 bool eventFilter(QObject *editor, QEvent *event) 227 227 { 228 #if QT_VERSION >= 0x040500229 228 if (QLineEdit *le = qobject_cast<QLineEdit*>(editor)) { 230 229 if (event->type() == QEvent::KeyPress) { … … 238 237 } 239 238 } 240 #endif241 239 return QStyledItemDelegate::eventFilter(editor, event); 242 240 } … … 245 243 const QModelIndex &index) const 246 244 { 247 #if QT_VERSION >= 0x040500248 245 if (index.column() == 2) { 249 246 // check that the syntax is OK … … 252 249 return; 253 250 } 254 #endif255 251 QStyledItemDelegate::setModelData(editor, model, index); 256 252 } … … 262 258 QPalette pal = editor->palette(); 263 259 QColor col; 264 #if QT_VERSION >= 0x040500265 260 bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid); 266 #else267 bool ok = true;268 #endif269 261 if (ok) { 270 262 col = Qt::white; … … 304 296 QIcon newBreakpointIcon; 305 297 newBreakpointIcon.addPixmap(d->pixmap(QString::fromLatin1("new.png")), QIcon::Normal); 306 QAction *newBreakpointAction = new QAction(newBreakpointIcon, QObject::tr("New"), this);298 QAction *newBreakpointAction = new QAction(newBreakpointIcon, tr("New"), this); 307 299 QObject::connect(newBreakpointAction, SIGNAL(triggered()), 308 300 this, SLOT(_q_newBreakpoint())); … … 310 302 QIcon deleteBreakpointIcon; 311 303 deleteBreakpointIcon.addPixmap(d->pixmap(QString::fromLatin1("delete.png")), QIcon::Normal); 312 d->deleteBreakpointAction = new QAction(deleteBreakpointIcon, QObject::tr("Delete"), this);304 d->deleteBreakpointAction = new QAction(deleteBreakpointIcon, tr("Delete"), this); 313 305 d->deleteBreakpointAction->setEnabled(false); 314 306 QObject::connect(d->deleteBreakpointAction, SIGNAL(triggered()), 315 307 this, SLOT(_q_deleteBreakpoint())); 316 308 309 #ifndef QT_NO_TOOLBAR 317 310 QToolBar *toolBar = new QToolBar(); 318 311 toolBar->addAction(newBreakpointAction); 319 312 toolBar->addAction(d->deleteBreakpointAction); 313 #endif 320 314 321 315 QVBoxLayout *vbox = new QVBoxLayout(this); 322 316 vbox->setMargin(0); 317 #ifndef QT_NO_TOOLBAR 323 318 vbox->addWidget(toolBar); 319 #endif 324 320 vbox->addWidget(d->newBreakpointWidget); 325 321 vbox->addWidget(d->view); -
trunk/src/scripttools/debugging/qscriptbreakpointswidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptcompletionproviderinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptcompletiontask.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 45 45 #include "qscriptdebuggerconsolecommand_p.h" 46 46 #include "qscriptdebuggerconsolecommandmanager_p.h" 47 48 #include "qscriptenginedebuggerfrontend_p.h" // ### kill 49 #include "qscriptdebuggerbackend_p.h" // ### kill 50 #include <QtScript/qscriptcontext.h> 51 #include <QtScript/qscriptvalue.h> 52 #include <QtScript/qscriptvalueiterator.h> 47 #include "qscriptdebuggercommandschedulerjob_p.h" 48 #include "qscriptdebuggercommandschedulerfrontend_p.h" 49 #include "qscriptdebuggerjobschedulerinterface_p.h" 50 #include "qscriptdebuggerresponse_p.h" 53 51 54 52 #include "private/qobject_p.h" … … 68 66 69 67 void completeScriptExpression(); 68 void emitFinished(); 70 69 71 70 QString contents; 72 71 int cursorPosition; 73 72 int frameIndex; 74 QScriptDebuggerFrontend *frontend; 73 QScriptDebuggerCommandSchedulerInterface *commandScheduler; 74 QScriptDebuggerJobSchedulerInterface *jobScheduler; 75 75 QScriptDebuggerConsole *console; 76 76 }; 77 77 78 78 QScriptCompletionTaskPrivate::QScriptCompletionTaskPrivate() 79 : cursorPosition(0), frameIndex(0), commandScheduler(0), 80 jobScheduler(0), console(0) 79 81 { 80 82 } … … 84 86 } 85 87 86 QScriptCompletionTask::QScriptCompletionTask( 87 const QString &contents, int cursorPosition, 88 int frameIndex, QScriptDebuggerFrontend *frontend, 89 QScriptDebuggerConsole *console, 90 QObject *parent) 91 : QScriptCompletionTaskInterface( 92 *new QScriptCompletionTaskPrivate, parent) 93 { 94 Q_D(QScriptCompletionTask); 95 d->contents = contents; 96 d->cursorPosition = cursorPosition; 97 if ((frameIndex == -1) && console) 98 d->frameIndex = console->currentFrameIndex(); 99 else 100 d->frameIndex = frameIndex; 101 d->frontend = frontend; 102 d->console = console; 103 } 104 105 QScriptCompletionTask::~QScriptCompletionTask() 106 { 107 } 88 class QScriptCompleteExpressionJob : public QScriptDebuggerCommandSchedulerJob 89 { 90 public: 91 QScriptCompleteExpressionJob(int frameIndex, const QStringList &path, 92 QScriptCompletionTaskPrivate *task, 93 QScriptDebuggerCommandSchedulerInterface *scheduler) 94 : QScriptDebuggerCommandSchedulerJob(scheduler), 95 m_frameIndex(frameIndex), m_path(path), m_task(task) 96 {} 97 98 void start() 99 { 100 QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); 101 frontend.scheduleGetCompletions(m_frameIndex, m_path); 102 } 103 void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) 104 { 105 m_task->results = response.result().toStringList(); 106 m_task->emitFinished(); 107 finish(); 108 } 109 110 private: 111 int m_frameIndex; 112 QStringList m_path; 113 QScriptCompletionTaskPrivate *m_task; 114 }; 108 115 109 116 namespace { … … 122 129 123 130 } // namespace 131 132 class QScriptCompleteScriptsJob : public QScriptDebuggerCommandSchedulerJob 133 { 134 public: 135 QScriptCompleteScriptsJob(const QString &prefix, QScriptCompletionTaskPrivate *task, 136 QScriptDebuggerCommandSchedulerInterface *scheduler) 137 : QScriptDebuggerCommandSchedulerJob(scheduler), 138 m_prefix(prefix), m_task(task) 139 {} 140 141 void start() 142 { 143 QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); 144 frontend.scheduleGetScripts(); 145 } 146 void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) 147 { 148 QScriptScriptMap scripts = response.resultAsScripts(); 149 QScriptScriptMap::const_iterator it; 150 for (it = scripts.constBegin(); it != scripts.constEnd(); ++it) { 151 QString fileName = it.value().fileName(); 152 if (isPrefixOf(m_prefix, fileName)) 153 m_task->results.append(fileName); 154 } 155 m_task->emitFinished(); 156 finish(); 157 } 158 private: 159 QString m_prefix; 160 QScriptCompletionTaskPrivate *m_task; 161 }; 124 162 125 163 void QScriptCompletionTaskPrivate::completeScriptExpression() … … 128 166 if ((pos > 0) && contents.at(pos-1).isNumber()) { 129 167 // completion of numbers is pointless 168 emitFinished(); 130 169 return; 131 170 } … … 133 172 while ((pos > 0) && isIdentChar(contents.at(pos-1))) 134 173 --pos; 135 int pos2 = cursorPosition ;174 int pos2 = cursorPosition - 1; 136 175 while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) 137 176 ++pos2; … … 149 188 } 150 189 151 // ### super-cheating for now; have to use the async API 152 QScriptEngineDebuggerFrontend *edf = static_cast<QScriptEngineDebuggerFrontend*>(frontend); 153 QScriptDebuggerBackend *backend = edf->backend(); 154 QScriptContext *ctx = backend->context(frameIndex); 155 QScriptValueList objects; 156 QString prefix = path.last(); 157 QSet<QString> matches; 158 if (path.size() > 1) { 159 const QString &topLevelIdent = path.at(0); 160 QScriptValue obj; 161 if (topLevelIdent == QString::fromLatin1("this")) { 162 obj = ctx->thisObject(); 163 } else { 164 QScriptValueList scopeChain; 165 #if QT_VERSION >= 0x040500 166 scopeChain = ctx->scopeChain(); 167 #else 168 scopeChain.append(ctx->activationObject()); 169 #endif 170 for (int i = 0; i < scopeChain.size(); ++i) { 171 QScriptValue oo = scopeChain.at(i).property(topLevelIdent); 172 if (oo.isObject()) { 173 obj = oo; 174 break; 175 } 176 } 177 } 178 for (int i = 1; obj.isObject() && (i < path.size()-1); ++i) 179 obj = obj.property(path.at(i)); 180 if (obj.isValid()) 181 objects.append(obj); 182 } else { 183 #if QT_VERSION >= 0x040500 184 objects << ctx->scopeChain(); 185 #else 186 objects.append(ctx->activationObject()); 187 #endif 188 QStringList keywords; 189 keywords.append(QString::fromLatin1("this")); 190 keywords.append(QString::fromLatin1("true")); 191 keywords.append(QString::fromLatin1("false")); 192 keywords.append(QString::fromLatin1("null")); 193 for (int i = 0; i < keywords.size(); ++i) { 194 const QString &kwd = keywords.at(i); 195 if (isPrefixOf(prefix, kwd)) 196 matches.insert(kwd); 197 } 198 } 199 200 for (int i = 0; i < objects.size(); ++i) { 201 QScriptValue obj = objects.at(i); 202 while (obj.isObject()) { 203 QScriptValueIterator it(obj); 204 while (it.hasNext()) { 205 it.next(); 206 QString propertyName = it.name(); 207 if (isPrefixOf(prefix, propertyName)) 208 matches.insert(propertyName); 209 } 210 obj = obj.prototype(); 211 } 212 } 213 results = matches.toList(); 214 qStableSort(results); 215 216 length = prefix.length(); 190 length = path.last().length(); 217 191 type = QScriptCompletionTask::ScriptIdentifierCompletion; 192 193 QScriptDebuggerJob *job = new QScriptCompleteExpressionJob(frameIndex, path, this, commandScheduler); 194 jobScheduler->scheduleJob(job); 195 } 196 197 void QScriptCompletionTaskPrivate::emitFinished() 198 { 199 emit q_func()->finished(); 200 } 201 202 QScriptCompletionTask::QScriptCompletionTask( 203 const QString &contents, int cursorPosition, int frameIndex, 204 QScriptDebuggerCommandSchedulerInterface *commandScheduler, 205 QScriptDebuggerJobSchedulerInterface *jobScheduler, 206 QScriptDebuggerConsole *console, 207 QObject *parent) 208 : QScriptCompletionTaskInterface( 209 *new QScriptCompletionTaskPrivate, parent) 210 { 211 Q_D(QScriptCompletionTask); 212 d->contents = contents; 213 d->cursorPosition = cursorPosition; 214 if ((frameIndex == -1) && console) 215 d->frameIndex = console->currentFrameIndex(); 216 else 217 d->frameIndex = frameIndex; 218 d->commandScheduler = commandScheduler; 219 d->jobScheduler = jobScheduler; 220 d->console = console; 221 } 222 223 QScriptCompletionTask::~QScriptCompletionTask() 224 { 218 225 } 219 226 … … 232 239 // editing command --> get command completions 233 240 d->results = d->console->commandManager()->completions(prefix); 234 qStableSort(d->results);235 241 d->position = cmdRx.pos(1); 236 242 d->length = prefix.length(); … … 265 271 QString argType = cmd->argumentTypes().value(argNum); 266 272 if (!argType.isEmpty()) { 267 if (argType == Q String::fromLatin1("command-or-group-name")) {273 if (argType == QLatin1String("command-or-group-name")) { 268 274 d->results = d->console->commandManager()->completions(arg); 269 } else if (argType == QString::fromLatin1("script-filename")) { 270 // ### super-cheating for now; have to use the async API 271 QScriptEngineDebuggerFrontend *edf = static_cast<QScriptEngineDebuggerFrontend*>(d->frontend); 272 QScriptDebuggerBackend *backend = edf->backend(); 273 QScriptScriptMap scripts = backend->scripts(); 274 QScriptScriptMap::const_iterator it; 275 for (it = scripts.constBegin(); it != scripts.constEnd(); ++it) { 276 QString fileName = it.value().fileName(); 277 if (isPrefixOf(arg, fileName)) 278 d->results.append(fileName); 279 } 280 } else if (argType == QString::fromLatin1("subcommand-name")) { 275 } else if (argType == QLatin1String("script-filename")) { 276 d->position = pos; 277 d->length = arg.length(); 278 d->type = CommandArgumentCompletion; 279 QScriptDebuggerJob *job = new QScriptCompleteScriptsJob(arg, d, d->commandScheduler); 280 d->jobScheduler->scheduleJob(job); 281 } else if (argType == QLatin1String("subcommand-name")) { 281 282 for (int i = 0; i < cmd->subCommands().size(); ++i) { 282 283 QString name = cmd->subCommands().at(i); … … 284 285 d->results.append(name); 285 286 } 286 } else if (argType == QString::fromLatin1("script")) { 287 qStableSort(d->results); 288 } else if (argType == QLatin1String("script")) { 287 289 d->completeScriptExpression(); 290 } else { 291 emit finished(); 288 292 } 289 293 if ((d->type == NoCompletion) && !d->results.isEmpty()) { 290 qStableSort(d->results);291 294 d->position = pos; 292 295 d->length = arg.length(); 293 296 d->type = CommandArgumentCompletion; 297 emit finished(); 294 298 } 295 299 } 296 emit finished();297 300 } 298 301 } else { 299 302 // assume it's an eval expression 300 303 d->completeScriptExpression(); 301 emit finished();302 304 } 303 305 } -
trunk/src/scripttools/debugging/qscriptcompletiontask_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 QT_BEGIN_NAMESPACE 62 62 63 class QScriptDebuggerFrontend; 63 class QScriptDebuggerCommandSchedulerInterface; 64 class QScriptDebuggerJobSchedulerInterface; 64 65 class QScriptDebuggerConsole; 65 66 … … 71 72 public: 72 73 QScriptCompletionTask( 73 const QString &contents, int cursorPosition, 74 int frameIndex,75 QScriptDebugger Frontend *frontend,74 const QString &contents, int cursorPosition, int frameIndex, 75 QScriptDebuggerCommandSchedulerInterface *commandScheduler, 76 QScriptDebuggerJobSchedulerInterface *jobScheduler, 76 77 QScriptDebuggerConsole *console, 77 78 QObject *parent = 0); -
trunk/src/scripttools/debugging/qscriptcompletiontaskinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptcompletiontaskinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebugger.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 76 76 #include "qscriptxmlparser_p.h" 77 77 78 #include "qscriptenginedebuggerfrontend_p.h"79 #include "qscriptdebuggerbackend_p.h"80 #include <QtScript/qscriptengine.h>81 82 78 #include "private/qobject_p.h" 83 79 … … 95 91 #include <QtGui/qicon.h> 96 92 #include <QtGui/qinputdialog.h> 93 #include <QtGui/qmenu.h> 94 #include <QtGui/qtoolbar.h> 95 #include <QtGui/qtooltip.h> 97 96 98 97 QT_BEGIN_NAMESPACE … … 138 137 \brief The QScriptDebugger class provides a Qt Script debugger. 139 138 140 \ingroup script tools141 \mainclass 139 \ingroup script 140 142 141 */ 143 142 … … 172 171 const QString &contents, int cursorPosition, int frameIndex, int options); 173 172 174 QString toolTip(int frameIndex, int lineNumber,175 const QStringList &path);173 void showToolTip(const QPoint &pos, int frameIndex, 174 int lineNumber, const QStringList &path); 176 175 177 176 static QPixmap pixmap(const QString &path); … … 634 633 } 635 634 635 class QScriptToolTipJob : public QScriptDebuggerCommandSchedulerJob 636 { 637 public: 638 QScriptToolTipJob(const QPoint &pos, int frameIndex, 639 int lineNumber, const QStringList &path, 640 QScriptDebuggerCommandSchedulerInterface *scheduler) 641 : QScriptDebuggerCommandSchedulerJob(scheduler), m_pos(pos), 642 m_frameIndex(frameIndex), m_lineNumber(lineNumber), m_path(path) 643 {} 644 645 void start() 646 { 647 QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); 648 frontend.scheduleGetPropertyExpressionValue(m_frameIndex, m_lineNumber, m_path); 649 } 650 void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/) 651 { 652 QString tip = response.result().toString(); 653 if (tip.indexOf(QLatin1Char('\n')) != -1) { 654 QStringList lines = tip.split(QLatin1Char('\n')); 655 int lineCount = lines.size(); 656 if (lineCount > 5) { 657 lines = lines.mid(0, 5); 658 lines.append(QString::fromLatin1("(... %0 more lines ...)").arg(lineCount - 5)); 659 } 660 tip = lines.join(QLatin1String("\n")); 661 } 662 QToolTip::showText(m_pos, tip); 663 finish(); 664 } 665 666 private: 667 QPoint m_pos; 668 int m_frameIndex; 669 int m_lineNumber; 670 QStringList m_path; 671 }; 672 636 673 /*! 637 674 \reimp 638 675 */ 639 QString QScriptDebuggerPrivate::toolTip(int frameIndex, int lineNumber,640 const QStringList &path)676 void QScriptDebuggerPrivate::showToolTip(const QPoint &pos, int frameIndex, 677 int lineNumber, const QStringList &path) 641 678 { 642 679 if (frameIndex == -1) { … … 646 683 frameIndex = console->currentFrameIndex(); 647 684 } 648 // ### cheating for now, need to use async API 649 QScriptEngineDebuggerFrontend *edf = static_cast<QScriptEngineDebuggerFrontend*>(frontend); 650 QScriptDebuggerBackend *backend = edf->backend(); 651 QScriptContext *ctx = backend->context(frameIndex); 652 if (!ctx || path.isEmpty()) 653 return QString(); 654 QScriptContextInfo ctxInfo(ctx); 655 if (ctx->callee().isValid() 656 && ((lineNumber < ctxInfo.functionStartLineNumber()) 657 || (lineNumber > ctxInfo.functionEndLineNumber()))) { 658 return QString(); 659 } 660 QScriptValueList objects; 661 int pathIndex = 0; 662 if (path.at(0) == QLatin1String("this")) { 663 objects.append(ctx->thisObject()); 664 ++pathIndex; 665 } else { 666 #if QT_VERSION >= 0x040500 667 objects << ctx->scopeChain(); 668 #else 669 objects.append(ctx->activationObject()); 670 #endif 671 } 672 for (int i = 0; i < objects.size(); ++i) { 673 QScriptValue val = objects.at(i); 674 for (int j = pathIndex; val.isValid() && (j < path.size()); ++j) { 675 val = val.property(path.at(j)); 676 } 677 if (val.isValid()) { 678 bool hadException = (ctx->state() == QScriptContext::ExceptionState); 679 QString str = val.toString(); 680 if (!hadException && backend->engine()->hasUncaughtException()) 681 backend->engine()->clearExceptions(); 682 return str; 683 } 684 } 685 return QString(); 685 QScriptDebuggerJob *job = new QScriptToolTipJob(pos, frameIndex, lineNumber, path, this); 686 scheduleJob(job); 686 687 } 687 688 … … 693 694 { 694 695 return new QScriptCompletionTask( 695 contents, cursorPosition, frameIndex, frontend,696 contents, cursorPosition, frameIndex, this, this, 696 697 (options & QScriptCompletionProviderInterface::ConsoleCommandCompletion) ? console : 0); 697 698 } … … 882 883 return; 883 884 bool ok = false; 884 int lineNumber = QInputDialog::getInteger(0, Q Object::tr("Go to Line"),885 Q Object::tr("Line:"),885 int lineNumber = QInputDialog::getInteger(0, QScriptDebugger::tr("Go to Line"), 886 QScriptDebugger::tr("Line:"), 886 887 view->cursorLineNumber(), 887 888 1, INT_MAX, 1, &ok); … … 992 993 m_debugger->scriptsModel->addScript(scriptId, data); 993 994 994 #if QT_VERSION >= 0x040500995 995 // ### could be slow, might want to do this in a separate thread 996 QString xml = qt_scriptToXml(data.contents(), data.baseLineNumber()); 996 // Q_ASSERT_X(false, Q_FUNC_INFO, "implement me"); 997 QString xml; // = qt_scriptToXml(data.contents(), data.baseLineNumber()); 997 998 QScriptXmlParser::Result extraInfo = QScriptXmlParser::parse(xml); 998 999 m_debugger->scriptsModel->addExtraScriptInfo( 999 1000 scriptId, extraInfo.functionsInfo, extraInfo.executableLineNumbers); 1000 #endif1001 1001 1002 1002 if (++m_index < m_added.size()) … … 1020 1020 SyncBreakpointsJob(QScriptDebuggerPrivate *debugger) 1021 1021 : QScriptDebuggerCommandSchedulerJob(debugger), 1022 m_debugger(debugger) {}1022 m_debugger(debugger), m_index(-1) {} 1023 1023 void start() 1024 1024 { … … 1079 1079 LoadLocalsJob(QScriptDebuggerPrivate *debugger, int frameIndex) 1080 1080 : QScriptDebuggerCommandSchedulerJob(debugger), 1081 m_debugger(debugger), m_frameIndex(frameIndex) , m_state(0){}1081 m_debugger(debugger), m_frameIndex(frameIndex) {} 1082 1082 1083 1083 void start() … … 1111 1111 QScriptDebuggerPrivate *m_debugger; 1112 1112 int m_frameIndex; 1113 int m_state;1114 1113 }; 1115 1114 … … 1338 1337 } 1339 1338 1339 QAction *QScriptDebugger::action(DebuggerAction action, QObject *parent) 1340 { 1341 switch (action) { 1342 case InterruptAction: 1343 return interruptAction(parent); 1344 case ContinueAction: 1345 return continueAction(parent); 1346 case StepIntoAction: 1347 return stepIntoAction(parent); 1348 case StepOverAction: 1349 return stepOverAction(parent); 1350 case StepOutAction: 1351 return stepOutAction(parent); 1352 case RunToCursorAction: 1353 return runToCursorAction(parent); 1354 case RunToNewScriptAction: 1355 return runToNewScriptAction(parent); 1356 case ToggleBreakpointAction: 1357 return toggleBreakpointAction(parent); 1358 case ClearDebugOutputAction: 1359 return clearDebugOutputAction(parent); 1360 case ClearErrorLogAction: 1361 return clearErrorLogAction(parent); 1362 case ClearConsoleAction: 1363 return clearConsoleAction(parent); 1364 case FindInScriptAction: 1365 return findInScriptAction(parent); 1366 case FindNextInScriptAction: 1367 return findNextInScriptAction(parent); 1368 case FindPreviousInScriptAction: 1369 return findPreviousInScriptAction(parent); 1370 case GoToLineAction: 1371 return goToLineAction(parent); 1372 } 1373 return 0; 1374 } 1375 1376 QWidget *QScriptDebugger::widget(DebuggerWidget widget) 1377 { 1378 switch (widget) { 1379 case ConsoleWidget: { 1380 QScriptDebuggerConsoleWidgetInterface *w = consoleWidget(); 1381 if (!w && widgetFactory()) { 1382 w = widgetFactory()->createConsoleWidget(); 1383 setConsoleWidget(w); 1384 } 1385 return w; 1386 } 1387 case StackWidget: { 1388 QScriptDebuggerStackWidgetInterface *w = stackWidget(); 1389 if (!w && widgetFactory()) { 1390 w = widgetFactory()->createStackWidget(); 1391 setStackWidget(w); 1392 } 1393 return w; 1394 } 1395 case ScriptsWidget: { 1396 QScriptDebuggerScriptsWidgetInterface *w = scriptsWidget(); 1397 if (!w && widgetFactory()) { 1398 w = widgetFactory()->createScriptsWidget(); 1399 setScriptsWidget(w); 1400 } 1401 return w; 1402 } 1403 case LocalsWidget: { 1404 QScriptDebuggerLocalsWidgetInterface *w = localsWidget(); 1405 if (!w && widgetFactory()) { 1406 w = widgetFactory()->createLocalsWidget(); 1407 setLocalsWidget(w); 1408 } 1409 return w; 1410 } 1411 case CodeWidget: { 1412 QScriptDebuggerCodeWidgetInterface *w = codeWidget(); 1413 if (!w && widgetFactory()) { 1414 w = widgetFactory()->createCodeWidget(); 1415 setCodeWidget(w); 1416 } 1417 return w; 1418 } 1419 case CodeFinderWidget: { 1420 QScriptDebuggerCodeFinderWidgetInterface *w = codeFinderWidget(); 1421 if (!w && widgetFactory()) { 1422 w = widgetFactory()->createCodeFinderWidget(); 1423 setCodeFinderWidget(w); 1424 } 1425 return w; 1426 } 1427 case BreakpointsWidget: { 1428 QScriptBreakpointsWidgetInterface *w = breakpointsWidget(); 1429 if (!w && widgetFactory()) { 1430 w = widgetFactory()->createBreakpointsWidget(); 1431 setBreakpointsWidget(w); 1432 } 1433 return w; 1434 } 1435 case DebugOutputWidget: { 1436 QScriptDebugOutputWidgetInterface *w = debugOutputWidget(); 1437 if (!w && widgetFactory()) { 1438 w = widgetFactory()->createDebugOutputWidget(); 1439 setDebugOutputWidget(w); 1440 } 1441 return w; 1442 } 1443 case ErrorLogWidget: { 1444 QScriptErrorLogWidgetInterface *w = errorLogWidget(); 1445 if (!w && widgetFactory()) { 1446 w = widgetFactory()->createErrorLogWidget(); 1447 setErrorLogWidget(w); 1448 } 1449 return w; 1450 } 1451 } 1452 return 0; 1453 } 1454 1340 1455 QScriptDebuggerConsoleWidgetInterface *QScriptDebugger::consoleWidget() const 1341 1456 { … … 1560 1675 interruptIcon.addPixmap(d->pixmap(QString::fromLatin1("d_interrupt.png")), QIcon::Disabled); 1561 1676 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1562 that->d_func()->interruptAction = new QAction(interruptIcon, Q Object::tr("Interrupt"), parent);1677 that->d_func()->interruptAction = new QAction(interruptIcon, QScriptDebugger::tr("Interrupt"), parent); 1563 1678 d->interruptAction->setEnabled(!d->interactive); 1564 d->interruptAction->setShortcut(Q Object::tr("Shift+F5"));1679 d->interruptAction->setShortcut(QScriptDebugger::tr("Shift+F5")); 1565 1680 QObject::connect(d->interruptAction, SIGNAL(triggered()), 1566 1681 that, SLOT(_q_interrupt())); … … 1577 1692 continueIcon.addPixmap(d->pixmap(QString::fromLatin1("d_play.png")), QIcon::Disabled); 1578 1693 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1579 that->d_func()->continueAction = new QAction(continueIcon, Q Object::tr("Continue"), parent);1694 that->d_func()->continueAction = new QAction(continueIcon, QScriptDebugger::tr("Continue"), parent); 1580 1695 d->continueAction->setEnabled(d->interactive); 1581 d->continueAction->setShortcut(Q Object::tr("F5"));1696 d->continueAction->setShortcut(QScriptDebugger::tr("F5")); 1582 1697 QObject::connect(d->continueAction, SIGNAL(triggered()), 1583 1698 that, SLOT(_q_continue())); … … 1594 1709 stepIntoIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepinto.png")), QIcon::Disabled); 1595 1710 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1596 that->d_func()->stepIntoAction = new QAction(stepIntoIcon, Q Object::tr("Step Into"), parent);1711 that->d_func()->stepIntoAction = new QAction(stepIntoIcon, QScriptDebugger::tr("Step Into"), parent); 1597 1712 d->stepIntoAction->setEnabled(d->interactive); 1598 d->stepIntoAction->setShortcut(Q Object::tr("F11"));1713 d->stepIntoAction->setShortcut(QScriptDebugger::tr("F11")); 1599 1714 QObject::connect(d->stepIntoAction, SIGNAL(triggered()), 1600 1715 that, SLOT(_q_stepInto())); … … 1611 1726 stepOverIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepover.png")), QIcon::Disabled); 1612 1727 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1613 that->d_func()->stepOverAction = new QAction(stepOverIcon, Q Object::tr("Step Over"), parent);1728 that->d_func()->stepOverAction = new QAction(stepOverIcon, QScriptDebugger::tr("Step Over"), parent); 1614 1729 d->stepOverAction->setEnabled(d->interactive); 1615 d->stepOverAction->setShortcut(Q Object::tr("F10"));1730 d->stepOverAction->setShortcut(QScriptDebugger::tr("F10")); 1616 1731 QObject::connect(d->stepOverAction, SIGNAL(triggered()), 1617 1732 that, SLOT(_q_stepOver())); … … 1628 1743 stepOutIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepout.png")), QIcon::Disabled); 1629 1744 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1630 that->d_func()->stepOutAction = new QAction(stepOutIcon, Q Object::tr("Step Out"), parent);1745 that->d_func()->stepOutAction = new QAction(stepOutIcon, QScriptDebugger::tr("Step Out"), parent); 1631 1746 d->stepOutAction->setEnabled(d->interactive); 1632 d->stepOutAction->setShortcut(Q Object::tr("Shift+F11"));1747 d->stepOutAction->setShortcut(QScriptDebugger::tr("Shift+F11")); 1633 1748 QObject::connect(d->stepOutAction, SIGNAL(triggered()), 1634 1749 that, SLOT(_q_stepOut())); … … 1645 1760 runToCursorIcon.addPixmap(d->pixmap(QString::fromLatin1("d_runtocursor.png")), QIcon::Disabled); 1646 1761 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1647 that->d_func()->runToCursorAction = new QAction(runToCursorIcon, Q Object::tr("Run to Cursor"), parent);1762 that->d_func()->runToCursorAction = new QAction(runToCursorIcon, QScriptDebugger::tr("Run to Cursor"), parent); 1648 1763 d->runToCursorAction->setEnabled(d->interactive); 1649 d->runToCursorAction->setShortcut(Q Object::tr("Ctrl+F10"));1764 d->runToCursorAction->setShortcut(QScriptDebugger::tr("Ctrl+F10")); 1650 1765 QObject::connect(d->runToCursorAction, SIGNAL(triggered()), 1651 1766 that, SLOT(_q_runToCursor())); … … 1663 1778 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1664 1779 that->d_func()->runToNewScriptAction = new QAction(runToNewScriptIcon, 1665 Q Object::tr("Run to New Script"), parent);1780 QScriptDebugger::tr("Run to New Script"), parent); 1666 1781 d->runToNewScriptAction->setEnabled(d->interactive); 1667 1782 QObject::connect(d->runToNewScriptAction, SIGNAL(triggered()), … … 1678 1793 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1679 1794 that->d_func()->toggleBreakpointAction = new QAction(toggleBreakpointIcon, 1680 Q Object::tr("Toggle Breakpoint"), parent);1681 d->toggleBreakpointAction->setShortcut(Q Object::tr("F9"));1795 QScriptDebugger::tr("Toggle Breakpoint"), parent); 1796 d->toggleBreakpointAction->setShortcut(QScriptDebugger::tr("F9")); 1682 1797 d->toggleBreakpointAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0)); 1683 1798 QObject::connect(d->toggleBreakpointAction, SIGNAL(triggered()), … … 1693 1808 QIcon clearDebugOutputIcon; 1694 1809 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1695 that->d_func()->clearDebugOutputAction = new QAction(clearDebugOutputIcon, Q Object::tr("Clear Debug Output"), parent);1810 that->d_func()->clearDebugOutputAction = new QAction(clearDebugOutputIcon, QScriptDebugger::tr("Clear Debug Output"), parent); 1696 1811 QObject::connect(d->clearDebugOutputAction, SIGNAL(triggered()), 1697 1812 that, SLOT(_q_clearDebugOutput())); … … 1706 1821 QIcon clearErrorLogIcon; 1707 1822 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1708 that->d_func()->clearErrorLogAction = new QAction(clearErrorLogIcon, Q Object::tr("Clear Error Log"), parent);1823 that->d_func()->clearErrorLogAction = new QAction(clearErrorLogIcon, QScriptDebugger::tr("Clear Error Log"), parent); 1709 1824 QObject::connect(d->clearErrorLogAction, SIGNAL(triggered()), 1710 1825 that, SLOT(_q_clearErrorLog())); … … 1719 1834 QIcon clearConsoleIcon; 1720 1835 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1721 that->d_func()->clearConsoleAction = new QAction(clearConsoleIcon, Q Object::tr("Clear Console"), parent);1836 that->d_func()->clearConsoleAction = new QAction(clearConsoleIcon, QScriptDebugger::tr("Clear Console"), parent); 1722 1837 QObject::connect(d->clearConsoleAction, SIGNAL(triggered()), 1723 1838 that, SLOT(_q_clearConsole())); … … 1733 1848 findInScriptIcon.addPixmap(d->pixmap(QString::fromLatin1("find.png")), QIcon::Normal); 1734 1849 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1735 that->d_func()->findInScriptAction = new QAction(findInScriptIcon, Q Object::tr("&Find in Script..."), parent);1736 d->findInScriptAction->setShortcut(Q Object::tr("Ctrl+F"));1850 that->d_func()->findInScriptAction = new QAction(findInScriptIcon, QScriptDebugger::tr("&Find in Script..."), parent); 1851 d->findInScriptAction->setShortcut(QScriptDebugger::tr("Ctrl+F")); 1737 1852 d->findInScriptAction->setEnabled( 1738 1853 (d->codeFinderWidget != 0) … … 1751 1866 QIcon findNextInScriptIcon; 1752 1867 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1753 that->d_func()->findNextInScriptAction = new QAction(findNextInScriptIcon, Q Object::tr("Find &Next"), parent);1868 that->d_func()->findNextInScriptAction = new QAction(findNextInScriptIcon, QScriptDebugger::tr("Find &Next"), parent); 1754 1869 d->findNextInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty()); 1755 d->findNextInScriptAction->setShortcut(Q Object::tr("F3"));1870 d->findNextInScriptAction->setShortcut(QScriptDebugger::tr("F3")); 1756 1871 QObject::connect(d->findNextInScriptAction, SIGNAL(triggered()), 1757 1872 that, SLOT(_q_findNextInScript())); … … 1766 1881 QIcon findPreviousInScriptIcon; 1767 1882 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1768 that->d_func()->findPreviousInScriptAction = new QAction(findPreviousInScriptIcon, Q Object::tr("Find &Previous"), parent);1883 that->d_func()->findPreviousInScriptAction = new QAction(findPreviousInScriptIcon, QScriptDebugger::tr("Find &Previous"), parent); 1769 1884 d->findPreviousInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty()); 1770 d->findPreviousInScriptAction->setShortcut(Q Object::tr("Shift+F3"));1885 d->findPreviousInScriptAction->setShortcut(QScriptDebugger::tr("Shift+F3")); 1771 1886 QObject::connect(d->findPreviousInScriptAction, SIGNAL(triggered()), 1772 1887 that, SLOT(_q_findPreviousInScript())); … … 1781 1896 QIcon goToLineIcon; 1782 1897 QScriptDebugger *that = const_cast<QScriptDebugger*>(this); 1783 that->d_func()->goToLineAction = new QAction(goToLineIcon, Q Object::tr("Go to Line"), parent);1784 d->goToLineAction->setShortcut(Q Object::tr("Ctrl+G"));1898 that->d_func()->goToLineAction = new QAction(goToLineIcon, QScriptDebugger::tr("Go to Line"), parent); 1899 d->goToLineAction->setShortcut(QScriptDebugger::tr("Ctrl+G")); 1785 1900 d->goToLineAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0)); 1786 1901 QObject::connect(d->goToLineAction, SIGNAL(triggered()), … … 1788 1903 } 1789 1904 return d->goToLineAction; 1905 } 1906 1907 QMenu *QScriptDebugger::createStandardMenu(QWidget *widgetParent, QObject *actionParent) 1908 { 1909 QMenu *menu = new QMenu(widgetParent); 1910 menu->setTitle(QScriptDebugger::tr("Debug")); 1911 menu->addAction(action(ContinueAction, actionParent)); 1912 menu->addAction(action(InterruptAction, actionParent)); 1913 menu->addAction(action(StepIntoAction, actionParent)); 1914 menu->addAction(action(StepOverAction, actionParent)); 1915 menu->addAction(action(StepOutAction, actionParent)); 1916 menu->addAction(action(RunToCursorAction, actionParent)); 1917 menu->addAction(action(RunToNewScriptAction, actionParent)); 1918 1919 menu->addSeparator(); 1920 menu->addAction(action(ToggleBreakpointAction, actionParent)); 1921 1922 menu->addSeparator(); 1923 menu->addAction(action(ClearDebugOutputAction, actionParent)); 1924 menu->addAction(action(ClearErrorLogAction, actionParent)); 1925 menu->addAction(action(ClearConsoleAction, actionParent)); 1926 1927 return menu; 1928 } 1929 1930 #ifndef QT_NO_TOOLBAR 1931 QToolBar *QScriptDebugger::createStandardToolBar(QWidget *widgetParent, QObject *actionParent) 1932 { 1933 QToolBar *tb = new QToolBar(widgetParent); 1934 tb->setObjectName(QLatin1String("qtscriptdebugger_standardToolBar")); 1935 tb->addAction(action(ContinueAction, actionParent)); 1936 tb->addAction(action(InterruptAction, actionParent)); 1937 tb->addAction(action(StepIntoAction, actionParent)); 1938 tb->addAction(action(StepOverAction, actionParent)); 1939 tb->addAction(action(StepOutAction, actionParent)); 1940 tb->addAction(action(RunToCursorAction, actionParent)); 1941 tb->addAction(action(RunToNewScriptAction, actionParent)); 1942 tb->addSeparator(); 1943 tb->addAction(action(FindInScriptAction, actionParent)); 1944 return tb; 1945 } 1946 #endif 1947 1948 bool QScriptDebugger::isInteractive() const 1949 { 1950 Q_D(const QScriptDebugger); 1951 return d->interactive; 1790 1952 } 1791 1953 -
trunk/src/scripttools/debugging/qscriptdebugger_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 71 71 class QAction; 72 72 class QEvent; 73 class QMenu; 74 #ifndef QT_NO_TOOLBAR 75 class QToolBar; 76 #endif 73 77 74 78 class QScriptDebuggerPrivate; … … 77 81 Q_OBJECT 78 82 public: 83 // mirrors QScriptEngineDebugger::DebuggerWidget 84 enum DebuggerWidget { 85 ConsoleWidget, 86 StackWidget, 87 ScriptsWidget, 88 LocalsWidget, 89 CodeWidget, 90 CodeFinderWidget, 91 BreakpointsWidget, 92 DebugOutputWidget, 93 ErrorLogWidget 94 }; 95 // mirrors QScriptEngineDebugger::DebuggerAction 96 enum DebuggerAction { 97 InterruptAction, 98 ContinueAction, 99 StepIntoAction, 100 StepOverAction, 101 StepOutAction, 102 RunToCursorAction, 103 RunToNewScriptAction, 104 ToggleBreakpointAction, 105 ClearDebugOutputAction, 106 ClearErrorLogAction, 107 ClearConsoleAction, 108 FindInScriptAction, 109 FindNextInScriptAction, 110 FindPreviousInScriptAction, 111 GoToLineAction 112 }; 113 79 114 QScriptDebugger(QObject *parent = 0); 80 115 ~QScriptDebugger(); … … 82 117 QScriptDebuggerFrontend *frontend() const; 83 118 void setFrontend(QScriptDebuggerFrontend *frontend); 119 120 QWidget *widget(DebuggerWidget widget); 121 QAction *action(DebuggerAction action, QObject *parent); 84 122 85 123 QScriptDebuggerConsoleWidgetInterface *consoleWidget() const; … … 132 170 QAction *clearErrorLogAction(QObject *parent) const; 133 171 172 QMenu *createStandardMenu(QWidget *widgetParent, QObject *actionParent); 173 #ifndef QT_NO_TOOLBAR 174 QToolBar *createStandardToolBar(QWidget *widgetParent, QObject *actionParent); 175 #endif 134 176 bool eventFilter(QObject *, QEvent *e); 177 178 bool isInteractive() const; 135 179 136 180 Q_SIGNALS: -
trunk/src/scripttools/debugging/qscriptdebuggeragent.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 62 62 63 63 QScriptDebuggerAgentPrivate::QScriptDebuggerAgentPrivate() 64 { 65 state = NoState;66 nextBreakpointId = 1;67 nextContextId = 0;68 statementCounter = 0; 64 : state(NoState), stepDepth(0), stepCount(0), 65 targetScriptId(-1), targetLineNumber(-1), returnCounter(0), 66 nextBreakpointId(1), hitBreakpointId(0), 67 nextContextId(0), statementCounter(0) 68 { 69 69 } 70 70 … … 89 89 QScriptDebuggerAgent::QScriptDebuggerAgent( 90 90 QScriptDebuggerBackendPrivate *backend, QScriptEngine *engine) 91 #if QT_VERSION >= 0x040500 92 : QScriptEngineAgent(*new QScriptDebuggerAgentPrivate, engine) 93 #else 94 : QScriptEngineAgent(engine), d_ptr(new QScriptDebuggerAgentPrivate) 95 #endif 96 { 97 Q_D(QScriptDebuggerAgent); 98 #if QT_VERSION < 0x040500 99 d_ptr->q_ptr = this; 100 #endif 91 : QScriptEngineAgent(engine), d_ptr(new QScriptDebuggerAgentPrivate()) 92 { 93 Q_D(QScriptDebuggerAgent); 101 94 d->backend = backend; 102 95 … … 118 111 if (d->backend) 119 112 d->backend->agentDestroyed(this); 120 #if QT_VERSION < 0x040500 121 delete d_ptr; 122 #endif 113 delete d; 123 114 } 124 115 … … 713 704 bool QScriptDebuggerAgent::supportsExtension(Extension extension) const 714 705 { 715 #if QT_VERSION >= 0x040500716 706 return (extension == DebuggerInvocationRequest); 717 #else718 Q_UNUSED(extension);719 return false;720 #endif721 707 } 722 708 … … 728 714 { 729 715 Q_UNUSED(extension); 730 #if QT_VERSION >= 0x040500731 716 Q_D(QScriptDebuggerAgent); 732 717 Q_ASSERT(extension == DebuggerInvocationRequest); … … 740 725 scriptId, lineNumber, columnNumber); 741 726 } 742 #else743 Q_UNUSED(argument);744 #endif745 727 return QVariant(); 746 728 } -
trunk/src/scripttools/debugging/qscriptdebuggeragent_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 126 126 127 127 private: 128 #if QT_VERSION < 0x040500129 128 QScriptDebuggerAgentPrivate *d_ptr; 130 #endif131 129 Q_DECLARE_PRIVATE(QScriptDebuggerAgent) 132 130 Q_DISABLE_COPY(QScriptDebuggerAgent) -
trunk/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 // 55 55 56 #include <private/qscriptengineagent_p.h>57 58 56 #include <QtScript/qscriptvalue.h> 59 57 #include <QtCore/qdatetime.h> … … 69 67 class QScriptDebuggerAgent; 70 68 class QScriptDebuggerAgentPrivate 71 #if QT_VERSION >= 0x04050072 : public QScriptEngineAgentPrivate73 #endif74 69 { 75 Q_DECLARE_PUBLIC(QScriptDebuggerAgent)76 70 public: 77 71 enum State { … … 126 120 127 121 QScriptDebuggerBackendPrivate *backend; 128 129 #if QT_VERSION < 0x040500130 QScriptDebuggerAgent *q_ptr;131 #endif132 122 }; 133 123 -
trunk/src/scripttools/debugging/qscriptdebuggerbackend.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 132 132 133 133 QScriptDebuggerBackendPrivate::QScriptDebuggerBackendPrivate() 134 { 135 eventReceiver = 0; 136 agent = 0; 137 commandExecutor = 0; 138 pendingEvaluateLineNumber = -1; 139 ignoreExceptions = false; 140 nextScriptValueIteratorId = 0; 141 nextScriptObjectSnapshotId = 0; 134 : agent(0), commandExecutor(0), 135 pendingEvaluateContextIndex(-1), pendingEvaluateLineNumber(-1), 136 ignoreExceptions(false), 137 nextScriptValueIteratorId(0), nextScriptObjectSnapshotId(0), 138 eventReceiver(0), 139 q_ptr(0) // q_ptr will be set later by QScriptDebuggerBackend constructor 140 { 142 141 } 143 142 … … 293 292 for (int i = 0; i < context->argumentCount(); ++i) { 294 293 if (i > 0) 295 str.append(QLatin1 String(" "));294 str.append(QLatin1Char(' ')); 296 295 str.append(context->argument(i).toString()); 297 296 } … … 386 385 { 387 386 detach(); 388 delete d_ptr;389 387 } 390 388 … … 413 411 d->agent = new QScriptDebuggerAgent(d, engine); 414 412 QScriptValue global = engine->globalObject(); 413 d->origTraceFunction = global.property(QString::fromLatin1("print")); 415 414 global.setProperty(QString::fromLatin1("print"), traceFunction()); 416 415 // global.setProperty(QString::fromLatin1("qAssert"), assertFunction()); 416 d->origFileNameFunction = global.property(QString::fromLatin1("__FILE__")); 417 417 global.setProperty(QString::fromLatin1("__FILE__"), fileNameFunction(), 418 QScriptValue::PropertyGetter | QScriptValue:: PropertySetter419 | QScriptValue::ReadOnly);418 QScriptValue::PropertyGetter | QScriptValue::ReadOnly); 419 d->origLineNumberFunction = global.property(QString::fromLatin1("__LINE__")); 420 420 global.setProperty(QString::fromLatin1("__LINE__"), lineNumberFunction(), 421 QScriptValue::PropertyGetter | QScriptValue::PropertySetter 422 | QScriptValue::ReadOnly); 421 QScriptValue::PropertyGetter | QScriptValue::ReadOnly); 423 422 engine->setAgent(d->agent); 424 423 } … … 434 433 { 435 434 Q_D(QScriptDebuggerBackend); 436 if (!d->agent) 437 return; 438 QScriptEngine *eng = d->agent->engine(); 439 if (eng && eng->agent() == d->agent) { 440 eng->setAgent(0); 441 QScriptValue global = eng->globalObject(); 442 if (global.property(QString::fromLatin1("print")).strictlyEquals(traceFunction())) 443 global.setProperty(QString::fromLatin1("print"), QScriptValue()); 444 // global.setProperty(QString::fromLatin1("qAssert"), QScriptValue()); 445 if (global.property(QString::fromLatin1("__FILE__")).strictlyEquals(fileNameFunction())) 446 global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue()); 447 if (global.property(QString::fromLatin1("__LINE__")).strictlyEquals(lineNumberFunction())) 448 global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue()); 449 d->agent->nullifyBackendPointer(); 450 d->agent = 0; // agent is owned by engine 435 if (d->agent) { 436 QScriptEngine *eng = d->agent->engine(); 437 if (eng && eng->agent() == d->agent) { 438 eng->setAgent(0); 439 QScriptValue global = eng->globalObject(); 440 global.setProperty(QString::fromLatin1("print"), d->origTraceFunction); 441 d->origTraceFunction = QScriptValue(); 442 // global.setProperty(QString::fromLatin1("qAssert"), QScriptValue()); 443 global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue(), 444 QScriptValue::PropertyGetter); 445 global.setProperty(QString::fromLatin1("__FILE__"), d->origFileNameFunction); 446 d->origFileNameFunction = QScriptValue(); 447 global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue(), 448 QScriptValue::PropertyGetter); 449 global.setProperty(QString::fromLatin1("__LINE__"), d->origLineNumberFunction); 450 d->origLineNumberFunction = QScriptValue(); 451 d->agent->nullifyBackendPointer(); 452 d->agent = 0; // agent is owned by engine 453 } 451 454 } 452 455 … … 616 619 { 617 620 QScriptContext *evalContext = engine()->pushContext(); 618 #if QT_VERSION >= 0x040500619 621 QScriptValueList scopeChain = ctx->scopeChain(); 620 622 if (scopeChain.isEmpty()) … … 622 624 while (!scopeChain.isEmpty()) 623 625 evalContext->pushScope(scopeChain.takeLast()); 624 #endif625 626 evalContext->setActivationObject(ctx->activationObject()); 626 627 evalContext->setThisObject(ctx->thisObject()); … … 805 806 if (!engine()) 806 807 return 0; 807 int count = 0; 808 QScriptContext *ctx = engine()->currentContext(); 809 while (ctx) { 810 ++count; 811 ctx = ctx->parentContext(); 812 } 813 return count; 808 return contextIds().count(); 814 809 } 815 810 -
trunk/src/scripttools/debugging/qscriptdebuggerbackend_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 145 145 protected: 146 146 QScriptDebuggerBackend(QScriptDebuggerBackendPrivate &dd); 147 QSc riptDebuggerBackendPrivate *d_ptr;147 QScopedPointer<QScriptDebuggerBackendPrivate> d_ptr; 148 148 149 149 private: -
trunk/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 #include <QtCore/qhash.h> 59 59 #include <QtCore/qlist.h> 60 #include <QtScript/qscriptvalue.h> 60 61 61 62 #include "qscriptdebuggerbackend_p.h" … … 67 68 class QScriptContext; 68 69 class QScriptEngine; 69 class QScriptValue;70 70 class QScriptValueIterator; 71 71 class QScriptObjectSnapshot; … … 127 127 128 128 QScriptDebuggerBackend *q_ptr; 129 130 QScriptValue origTraceFunction; 131 QScriptValue origFileNameFunction; 132 QScriptValue origLineNumberFunction; 129 133 }; 130 134 -
trunk/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 139 139 d->toolClose->setIcon(QIcon(QString::fromUtf8(":/qt/scripttools/debugging/images/%1/closetab.png").arg(system))); 140 140 d->toolClose->setAutoRaise(true); 141 d->toolClose->setText( QObject::tr("Close"));141 d->toolClose->setText(tr("Close")); 142 142 hboxLayout->addWidget(d->toolClose); 143 143 144 144 d->editFind = new QLineEdit(this); 145 145 d->editFind->setMinimumSize(QSize(150, 0)); 146 connect(d->editFind, SIGNAL(textChanged( const QString&)),146 connect(d->editFind, SIGNAL(textChanged(QString)), 147 147 this, SLOT(_q_updateButtons())); 148 148 connect(d->editFind, SIGNAL(returnPressed()), -
trunk/src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodeview.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 215 215 return false; 216 216 int linePosition = cursor.position() - block.position(); 217 linePosition -= 3;218 217 if (linePosition < 0) 219 218 linePosition = 0; … … 234 233 return false; 235 234 } 236 int pos2 = linePosition ;235 int pos2 = linePosition - 1; 237 236 while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) 238 237 ++pos2; -
trunk/src/scripttools/debugging/qscriptdebuggercodeview_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodewidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 50 50 #include <QtGui/qboxlayout.h> 51 51 #include <QtGui/qstackedwidget.h> 52 #include <QtGui/qtooltip.h>53 52 54 53 QT_BEGIN_NAMESPACE … … 198 197 const QPoint &pos, int lineNumber, const QStringList &path) 199 198 { 200 QString tip = toolTipProvider->toolTip(/*frameIndex=*/-1, lineNumber, path); 201 if (tip.indexOf(QLatin1Char('\n')) != -1) { 202 QStringList lines = tip.split(QLatin1Char('\n')); 203 int lineCount = lines.size(); 204 if (lineCount > 5) { 205 lines = lines.mid(0, 5); 206 lines.append(QString::fromLatin1("(... %0 more lines ...)").arg(lineCount - 5)); 207 } 208 tip = lines.join(QLatin1String("\n")); 209 } 210 QToolTip::showText(pos, tip); 199 toolTipProvider->showToolTip(pos, /*frameIndex=*/-1, lineNumber, path); 211 200 } 212 201 -
trunk/src/scripttools/debugging/qscriptdebuggercodewidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercommand.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 46 46 #include <QtCore/qhash.h> 47 47 #include <QtCore/qdatastream.h> 48 #include <QtCore/qstringlist.h> 48 49 49 50 Q_DECLARE_METATYPE(QScriptBreakpointData) … … 119 120 QScriptDebuggerCommand::~QScriptDebuggerCommand() 120 121 { 121 delete d_ptr;122 122 } 123 123 … … 559 559 } 560 560 561 QScriptDebuggerCommand QScriptDebuggerCommand::getPropertyExpressionValue( 562 int contextIndex, int lineNumber, const QStringList &path) 563 { 564 QScriptDebuggerCommand cmd(GetPropertyExpressionValue); 565 cmd.setContextIndex(contextIndex); 566 cmd.setLineNumber(lineNumber); 567 cmd.setAttribute(UserAttribute, path); 568 return cmd; 569 } 570 571 QScriptDebuggerCommand QScriptDebuggerCommand::getCompletions( 572 int contextIndex, const QStringList &path) 573 { 574 QScriptDebuggerCommand cmd(GetCompletions); 575 cmd.setContextIndex(contextIndex); 576 cmd.setAttribute(UserAttribute, path); 577 return cmd; 578 } 579 561 580 QScriptDebuggerCommand QScriptDebuggerCommand::newScriptObjectSnapshotCommand() 562 581 { … … 647 666 QDataStream &operator<<(QDataStream &out, const QScriptDebuggerCommand &command) 648 667 { 649 const QScriptDebuggerCommandPrivate *d = command.d_ptr ;668 const QScriptDebuggerCommandPrivate *d = command.d_ptr.data(); 650 669 out << (quint32)d->type; 651 670 out << (qint32)d->attributes.size(); … … 667 686 QDataStream &operator>>(QDataStream &in, QScriptDebuggerCommand &command) 668 687 { 669 QScriptDebuggerCommandPrivate *d = command.d_ptr ;688 QScriptDebuggerCommandPrivate *d = command.d_ptr.data(); 670 689 671 690 quint32 type; -
trunk/src/scripttools/debugging/qscriptdebuggercommand_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qhash.h> 59 59 #include <QtCore/qvariant.h> … … 107 107 GetScopeChain, 108 108 ContextsCheckpoint, 109 GetPropertyExpressionValue, 110 GetCompletions, 109 111 110 112 NewScriptObjectSnapshot, … … 230 232 static QScriptDebuggerCommand getScopeChainCommand(int contextIndex); 231 233 static QScriptDebuggerCommand contextsCheckpoint(); 234 static QScriptDebuggerCommand getPropertyExpressionValue(int contextIndex, int lineNumber, 235 const QStringList &path); 236 static QScriptDebuggerCommand getCompletions(int contextIndex, const QStringList &path); 232 237 233 238 static QScriptDebuggerCommand newScriptObjectSnapshotCommand(); … … 251 256 252 257 private: 253 QSc riptDebuggerCommandPrivate *d_ptr;258 QScopedPointer<QScriptDebuggerCommandPrivate> d_ptr; 254 259 255 260 Q_DECLARE_PRIVATE(QScriptDebuggerCommand) -
trunk/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 99 99 QScriptDebuggerCommandExecutor::~QScriptDebuggerCommandExecutor() 100 100 { 101 delete d_ptr; 101 } 102 103 static bool isPrefixOf(const QString &prefix, const QString &what) 104 { 105 return ((what.length() > prefix.length()) 106 && what.startsWith(prefix)); 102 107 } 103 108 … … 106 111 */ 107 112 QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( 108 109 113 QScriptDebuggerBackend *backend, 114 const QScriptDebuggerCommand &command) 110 115 { 111 116 QScriptDebuggerResponse response; … … 288 293 if (ctx) { 289 294 QScriptDebuggerValueList dest; 290 #if QT_VERSION >= 0x040500291 295 QScriptValueList src = ctx->scopeChain(); 292 296 for (int i = 0; i < src.size(); ++i) 293 297 dest.append(src.at(i)); 294 #else295 dest.append(ctx->activationObject());296 #endif297 298 response.setResult(dest); 298 299 } else { … … 303 304 case QScriptDebuggerCommand::ContextsCheckpoint: { 304 305 response.setResult(qVariantFromValue(backend->contextsCheckpoint())); 306 } break; 307 308 case QScriptDebuggerCommand::GetPropertyExpressionValue: { 309 QScriptContext *ctx = backend->context(command.contextIndex()); 310 int lineNumber = command.lineNumber(); 311 QVariant attr = command.attribute(QScriptDebuggerCommand::UserAttribute); 312 QStringList path = attr.toStringList(); 313 if (!ctx || path.isEmpty()) 314 break; 315 QScriptContextInfo ctxInfo(ctx); 316 if (ctx->callee().isValid() 317 && ((lineNumber < ctxInfo.functionStartLineNumber()) 318 || (lineNumber > ctxInfo.functionEndLineNumber()))) { 319 break; 320 } 321 QScriptValueList objects; 322 int pathIndex = 0; 323 if (path.at(0) == QLatin1String("this")) { 324 objects.append(ctx->thisObject()); 325 ++pathIndex; 326 } else { 327 objects << ctx->scopeChain(); 328 } 329 for (int i = 0; i < objects.size(); ++i) { 330 QScriptValue val = objects.at(i); 331 for (int j = pathIndex; val.isValid() && (j < path.size()); ++j) { 332 val = val.property(path.at(j)); 333 } 334 if (val.isValid()) { 335 bool hadException = (ctx->state() == QScriptContext::ExceptionState); 336 QString str = val.toString(); 337 if (!hadException && backend->engine()->hasUncaughtException()) 338 backend->engine()->clearExceptions(); 339 response.setResult(str); 340 break; 341 } 342 } 343 } break; 344 345 case QScriptDebuggerCommand::GetCompletions: { 346 QScriptContext *ctx = backend->context(command.contextIndex()); 347 QVariant attr = command.attribute(QScriptDebuggerCommand::UserAttribute); 348 QStringList path = attr.toStringList(); 349 if (!ctx || path.isEmpty()) 350 break; 351 QScriptValueList objects; 352 QString prefix = path.last(); 353 QSet<QString> matches; 354 if (path.size() > 1) { 355 const QString &topLevelIdent = path.at(0); 356 QScriptValue obj; 357 if (topLevelIdent == QLatin1String("this")) { 358 obj = ctx->thisObject(); 359 } else { 360 QScriptValueList scopeChain; 361 scopeChain = ctx->scopeChain(); 362 for (int i = 0; i < scopeChain.size(); ++i) { 363 QScriptValue oo = scopeChain.at(i).property(topLevelIdent); 364 if (oo.isObject()) { 365 obj = oo; 366 break; 367 } 368 } 369 } 370 for (int i = 1; obj.isObject() && (i < path.size()-1); ++i) 371 obj = obj.property(path.at(i)); 372 if (obj.isValid()) 373 objects.append(obj); 374 } else { 375 objects << ctx->scopeChain(); 376 QStringList keywords; 377 keywords.append(QString::fromLatin1("this")); 378 keywords.append(QString::fromLatin1("true")); 379 keywords.append(QString::fromLatin1("false")); 380 keywords.append(QString::fromLatin1("null")); 381 for (int i = 0; i < keywords.size(); ++i) { 382 const QString &kwd = keywords.at(i); 383 if (isPrefixOf(prefix, kwd)) 384 matches.insert(kwd); 385 } 386 } 387 388 for (int i = 0; i < objects.size(); ++i) { 389 QScriptValue obj = objects.at(i); 390 while (obj.isObject()) { 391 QScriptValueIterator it(obj); 392 while (it.hasNext()) { 393 it.next(); 394 QString propertyName = it.name(); 395 if (isPrefixOf(prefix, propertyName)) 396 matches.insert(propertyName); 397 } 398 obj = obj.prototype(); 399 } 400 } 401 QStringList matchesList = matches.toList(); 402 qStableSort(matchesList); 403 response.setResult(matchesList); 305 404 } break; 306 405 -
trunk/src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 #include <QtCore/qscopedpointer.h> 57 58 58 59 QT_BEGIN_NAMESPACE … … 75 76 protected: 76 77 QScriptDebuggerCommandExecutor(QScriptDebuggerCommandExecutorPrivate &dd); 77 QSc riptDebuggerCommandExecutorPrivate *d_ptr;78 QScopedPointer<QScriptDebuggerCommandExecutorPrivate> d_ptr; 78 79 79 80 private: -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 252 252 } 253 253 254 int QScriptDebuggerCommandSchedulerFrontend::scheduleGetPropertyExpressionValue( 255 int contextIndex, int lineNumber, const QStringList &path) 256 { 257 return scheduleCommand(QScriptDebuggerCommand::getPropertyExpressionValue(contextIndex, lineNumber, path)); 258 } 259 260 int QScriptDebuggerCommandSchedulerFrontend::scheduleGetCompletions(int contextIndex, const QStringList &path) 261 { 262 return scheduleCommand(QScriptDebuggerCommand::getCompletions(contextIndex, path)); 263 } 264 254 265 int QScriptDebuggerCommandSchedulerFrontend::scheduleEvaluate(int contextIndex, 255 266 const QString &program, -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 110 110 int scheduleGetScopeChain(int contextIndex); 111 111 int scheduleContextsCheckpoint(); 112 int scheduleGetPropertyExpressionValue(int contextIndex, int lineNumber, 113 const QStringList &path); 114 int scheduleGetCompletions(int contextIndex, const QStringList &path); 112 115 113 116 // iteration -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsole.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 164 164 for (int j = 0; j < completions.size(); ++j) { 165 165 if (j > 0) 166 msg.append(Q String::fromLatin1(", "));166 msg.append(QLatin1String(", ")); 167 167 msg.append(completions.at(j)); 168 168 } 169 msg.append(Q String::fromLatin1("."));169 msg.append(QLatin1Char('.')); 170 170 messageHandler->message(QtWarningMsg, msg); 171 171 return 0; … … 200 200 QScriptDebuggerConsole::~QScriptDebuggerConsole() 201 201 { 202 delete d_ptr;203 202 } 204 203 -
trunk/src/scripttools/debugging/qscriptdebuggerconsole_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 #include <QtCore/qscopedpointer.h> 57 58 58 59 #include "qscriptdebuggerconsolehistorianinterface_p.h" … … 110 111 111 112 private: 112 QSc riptDebuggerConsolePrivate *d_ptr;113 QScopedPointer<QScriptDebuggerConsolePrivate> d_ptr; 113 114 114 115 Q_DECLARE_PRIVATE(QScriptDebuggerConsole) -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 QScriptDebuggerConsoleCommand::~QScriptDebuggerConsoleCommand() 74 74 { 75 delete d_ptr;76 75 } 77 76 -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qlist.h> 59 59 … … 92 92 protected: 93 93 QScriptDebuggerConsoleCommand(QScriptDebuggerConsoleCommandPrivate &dd); 94 QSc riptDebuggerConsoleCommandPrivate *d_ptr;94 QScopedPointer<QScriptDebuggerConsoleCommandPrivate> d_ptr; 95 95 96 96 private: -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 91 91 QScriptDebuggerConsoleCommandGroupData::QScriptDebuggerConsoleCommandGroupData( 92 92 const QScriptDebuggerConsoleCommandGroupData &other) 93 : d_ptr(other.d_ptr )93 : d_ptr(other.d_ptr.data()) 94 94 { 95 95 if (d_ptr) … … 99 99 QScriptDebuggerConsoleCommandGroupData::~QScriptDebuggerConsoleCommandGroupData() 100 100 { 101 if (d_ptr && !d_ptr->ref.deref()) {102 delete d_ptr;103 d_ptr = 0;104 }105 101 } 106 102 … … 108 104 const QScriptDebuggerConsoleCommandGroupData &other) 109 105 { 110 if (d_ptr == other.d_ptr) 111 return *this; 112 if (d_ptr && !d_ptr->ref.deref()) 113 delete d_ptr; 114 d_ptr = other.d_ptr; 115 if (d_ptr) 116 d_ptr->ref.ref(); 106 d_ptr.assign(other.d_ptr.data()); 117 107 return *this; 118 108 } -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/private/qscopedpointer_p.h> 58 58 #include <QtCore/qmap.h> 59 59 … … 83 83 84 84 private: 85 QSc riptDebuggerConsoleCommandGroupDataPrivate *d_ptr;85 QScopedSharedPointer<QScriptDebuggerConsoleCommandGroupDataPrivate> d_ptr; 86 86 87 87 private: -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 106 106 QScriptDebuggerConsoleCommandManager::~QScriptDebuggerConsoleCommandManager() 107 107 { 108 delete d_ptr;109 108 } 110 109 -
trunk/src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qmap.h> 59 59 #include <QtCore/qlist.h> … … 87 87 88 88 private: 89 QSc riptDebuggerConsoleCommandManagerPrivate *d_ptr;89 QScopedPointer<QScriptDebuggerConsoleCommandManagerPrivate> d_ptr; 90 90 91 91 Q_DECLARE_PRIVATE(QScriptDebuggerConsoleCommandManager) -
trunk/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 362 362 { 363 363 Q_D(QScriptDebuggerConsoleGlobalObject); 364 Q_ASSERT(d->messageHandler != 0); 364 365 d->messageHandler->message(QtWarningMsg, text, fileName, lineNumber, columnNumber); 365 366 } … … 370 371 { 371 372 Q_D(QScriptDebuggerConsoleGlobalObject); 373 Q_ASSERT(d->messageHandler != 0); 372 374 d->messageHandler->message(QtDebugMsg, text, fileName, lineNumber, columnNumber); 373 375 } … … 378 380 { 379 381 Q_D(QScriptDebuggerConsoleGlobalObject); 382 Q_ASSERT(d->messageHandler != 0); 380 383 d->messageHandler->message(QtCriticalMsg, text, fileName, lineNumber, columnNumber); 381 384 } … … 449 452 bool QScriptDebuggerConsoleGlobalObject::checkSyntax(const QString &program) 450 453 { 451 #if QT_VERSION >= 0x040500452 454 return (QScriptEngine::checkSyntax(program).state() == QScriptSyntaxCheckResult::Valid); 453 #else454 Q_UNUSED(program);455 return true;456 #endif457 455 } 458 456 -
trunk/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerevent.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 62 62 QScriptDebuggerEventPrivate::QScriptDebuggerEventPrivate() 63 : type(QScriptDebuggerEvent::None) 63 64 { 64 65 } … … 98 99 QScriptDebuggerEvent::~QScriptDebuggerEvent() 99 100 { 100 delete d_ptr;101 101 } 102 102 … … 277 277 QDataStream &operator<<(QDataStream &out, const QScriptDebuggerEvent &event) 278 278 { 279 const QScriptDebuggerEventPrivate *d = event.d_ptr ;279 const QScriptDebuggerEventPrivate *d = event.d_ptr.data(); 280 280 out << (quint32)d->type; 281 281 out << (qint32)d->attributes.size(); … … 297 297 QDataStream &operator>>(QDataStream &in, QScriptDebuggerEvent &event) 298 298 { 299 QScriptDebuggerEventPrivate *d = event.d_ptr ;299 QScriptDebuggerEventPrivate *d = event.d_ptr.data(); 300 300 301 301 quint32 type; -
trunk/src/scripttools/debugging/qscriptdebuggerevent_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 #include <QtCore/qhash.h> 59 59 #include <QtCore/qvariant.h> 60 #include <QtCore/qscopedpointer.h> 60 61 61 62 QT_BEGIN_NAMESPACE … … 138 139 139 140 private: 140 QSc riptDebuggerEventPrivate *d_ptr;141 QScopedPointer<QScriptDebuggerEventPrivate> d_ptr; 141 142 142 143 Q_DECLARE_PRIVATE(QScriptDebuggerEvent) -
trunk/src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerfrontend.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 144 144 QScriptDebuggerFrontend::~QScriptDebuggerFrontend() 145 145 { 146 delete d_ptr;147 146 } 148 147 -
trunk/src/scripttools/debugging/qscriptdebuggerfrontend_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qstring.h> 59 59 … … 91 91 protected: 92 92 QScriptDebuggerFrontend(QScriptDebuggerFrontendPrivate &dd); 93 QSc riptDebuggerFrontendPrivate *d_ptr;93 QScopedPointer<QScriptDebuggerFrontendPrivate> d_ptr; 94 94 95 95 private: -
trunk/src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerjob.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 86 86 QScriptDebuggerJob::~QScriptDebuggerJob() 87 87 { 88 delete d_ptr;89 88 } 90 89 -
trunk/src/scripttools/debugging/qscriptdebuggerjob_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 #include <QtCore/qscopedpointer.h> 57 58 58 59 QT_BEGIN_NAMESPACE … … 77 78 protected: 78 79 QScriptDebuggerJob(QScriptDebuggerJobPrivate &dd); 79 QSc riptDebuggerJobPrivate *d_ptr;80 QScopedPointer<QScriptDebuggerJobPrivate> d_ptr; 80 81 81 82 private: -
trunk/src/scripttools/debugging/qscriptdebuggerjob_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 55 55 #include <QtCore/qdebug.h> 56 #include <QtCore/qcoreapplication.h> 56 57 #include <QtGui/qbrush.h> 57 58 #include <QtGui/qfont.h> … … 137 138 138 139 void deleteObjectSnapshots(const QList<qint64> &snapshotIds); 140 void deleteAllObjectSnapshots(); 139 141 140 142 QScriptDebuggerJobSchedulerInterface *jobScheduler; … … 239 241 for (int i = 0; i < snapshotIds.size(); ++i) 240 242 frontend.scheduleDeleteScriptObjectSnapshot(snapshotIds.at(i)); 243 } 244 245 void QScriptDebuggerLocalsModelPrivate::deleteAllObjectSnapshots() 246 { 247 QList<qint64> snapshotIds; 248 for (int i = 0; i < invisibleRootNode->children.count(); ++i) 249 snapshotIds += findSnapshotIdsRecursively(invisibleRootNode->children.at(i)); 250 deleteObjectSnapshots(snapshotIds); 241 251 } 242 252 … … 443 453 QScriptDebuggerLocalsModel::~QScriptDebuggerLocalsModel() 444 454 { 445 Q_D(QScriptDebuggerLocalsModel);446 QList<qint64> snapshotIds;447 for (int i = 0; i < d->invisibleRootNode->children.count(); ++i)448 snapshotIds += findSnapshotIdsRecursively(d->invisibleRootNode->children.at(i));449 QScriptDebuggerCommandSchedulerFrontend frontend(d->commandScheduler, 0);450 for (int j = 0; j < snapshotIds.size(); ++j)451 frontend.scheduleDeleteScriptObjectSnapshot(snapshotIds.at(j));452 455 } 453 456 … … 808 811 if (node->property.value().type() == QScriptDebuggerValue::StringValue) { 809 812 // escape 810 str.replace(QLatin1 String("\""), QLatin1String("\\\""));813 str.replace(QLatin1Char('\"'), QLatin1String("\\\"")); 811 814 str.prepend(QLatin1Char('\"')); 812 815 str.append(QLatin1Char('\"')); … … 867 870 if (role == Qt::DisplayRole) { 868 871 if (section == 0) 869 return Q Object::tr("Name");872 return QCoreApplication::translate("QScriptDebuggerLocalsModel", "Name"); 870 873 else if (section == 1) 871 return Q Object::tr("Value");874 return QCoreApplication::translate("QScriptDebuggerLocalsModel", "Value"); 872 875 } 873 876 } -
trunk/src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 207 207 QPalette pal = editor->palette(); 208 208 QColor col; 209 #if QT_VERSION >= 0x040500210 209 bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid); 211 #else212 bool ok = true;213 #endif214 210 if (ok) { 215 211 col = Qt::white; … … 278 274 QKeyEvent *ke = static_cast<QKeyEvent*>(event); 279 275 if ((ke->key() == Qt::Key_Enter) || (ke->key() == Qt::Key_Return)) { 280 #if QT_VERSION >= 0x040500281 276 if (QScriptEngine::checkSyntax(le->text()).state() != QScriptSyntaxCheckResult::Valid) { 282 277 // ignore when script contains syntax error 283 278 return true; 284 279 } 285 #endif286 280 } 287 281 if (ke->key() != Qt::Key_Tab) … … 297 291 const QModelIndex &index) const 298 292 { 299 #if QT_VERSION >= 0x040500300 293 if (index.column() == 1) { 301 294 // check that the syntax is OK … … 304 297 return; 305 298 } 306 #endif307 299 QStyledItemDelegate::setModelData(editor, model, index); 308 300 } -
trunk/src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 QT_BEGIN_NAMESPACE 62 62 63 class QDataStream; 64 63 65 class Q_AUTOTEST_EXPORT QScriptDebuggerObjectSnapshotDelta 64 66 { … … 69 71 }; 70 72 73 Q_AUTOTEST_EXPORT QDataStream &operator<<(QDataStream &, const QScriptDebuggerObjectSnapshotDelta &); 74 Q_AUTOTEST_EXPORT QDataStream &operator>>(QDataStream &, QScriptDebuggerObjectSnapshotDelta &); 75 71 76 QT_END_NAMESPACE 72 77 -
trunk/src/scripttools/debugging/qscriptdebuggerresponse.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 102 102 QScriptDebuggerResponse::~QScriptDebuggerResponse() 103 103 { 104 delete d_ptr;105 104 } 106 105 … … 321 320 QDataStream &operator<<(QDataStream &out, const QScriptDebuggerResponse &response) 322 321 { 323 const QScriptDebuggerResponsePrivate *d = response.d_ptr ;322 const QScriptDebuggerResponsePrivate *d = response.d_ptr.data(); 324 323 out << (quint32)d->error; 325 324 out << d->result; … … 337 336 QDataStream &operator>>(QDataStream &in, QScriptDebuggerResponse &response) 338 337 { 339 QScriptDebuggerResponsePrivate *d = response.d_ptr ;338 QScriptDebuggerResponsePrivate *d = response.d_ptr.data(); 340 339 341 340 quint32 error; -
trunk/src/scripttools/debugging/qscriptdebuggerresponse_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qscopedpointer.h> 58 58 #include <QtCore/qmap.h> 59 59 #include <QtCore/qvariant.h> … … 128 128 129 129 private: 130 QSc riptDebuggerResponsePrivate *d_ptr;130 QScopedPointer<QScriptDebuggerResponsePrivate> d_ptr; 131 131 132 132 Q_DECLARE_PRIVATE(QScriptDebuggerResponse) -
trunk/src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 368 368 { 369 369 public: 370 QScriptDebuggerScriptedConsoleCommandJobPrivate() {}370 QScriptDebuggerScriptedConsoleCommandJobPrivate() : command(0), commandCount(0) {} 371 371 ~QScriptDebuggerScriptedConsoleCommandJobPrivate() {} 372 372 … … 411 411 args.append(QScriptValue(engine, d->arguments.at(i))); 412 412 QScriptDebuggerConsoleGlobalObject *global; 413 #if QT_VERSION >= 0x040500414 413 global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject()); 415 #else416 global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());417 #endif418 414 Q_ASSERT(global != 0); 419 415 global->setScheduler(this); … … 445 441 args.append(QScriptValue(engine, commandId)); 446 442 QScriptDebuggerConsoleGlobalObject *global; 447 #if QT_VERSION >= 0x040500448 443 global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject()); 449 #else450 global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());451 #endif452 444 Q_ASSERT(global != 0); 453 445 global->setScheduler(this); … … 469 461 470 462 /*! 471 \ reimp463 \internal 472 464 */ 473 465 QString QScriptDebuggerScriptedConsoleCommand::name() const … … 478 470 479 471 /*! 480 \ reimp472 \internal 481 473 */ 482 474 QString QScriptDebuggerScriptedConsoleCommand::group() const … … 487 479 488 480 /*! 489 \ reimp481 \internal 490 482 */ 491 483 QString QScriptDebuggerScriptedConsoleCommand::shortDescription() const … … 496 488 497 489 /*! 498 \ reimp490 \internal 499 491 */ 500 492 QString QScriptDebuggerScriptedConsoleCommand::longDescription() const … … 505 497 506 498 /*! 507 \ reimp499 \internal 508 500 */ 509 501 QStringList QScriptDebuggerScriptedConsoleCommand::aliases() const … … 514 506 515 507 /*! 516 \ reimp508 \internal 517 509 */ 518 510 QStringList QScriptDebuggerScriptedConsoleCommand::seeAlso() const … … 523 515 524 516 /*! 525 \ reimp517 \internal 526 518 */ 527 519 QStringList QScriptDebuggerScriptedConsoleCommand::argumentTypes() const … … 532 524 533 525 /*! 534 \ reimp526 \internal 535 527 */ 536 528 QStringList QScriptDebuggerScriptedConsoleCommand::subCommands() const … … 541 533 542 534 /*! 543 \ reimp535 \internal 544 536 */ 545 537 QScriptDebuggerConsoleCommandJob *QScriptDebuggerScriptedConsoleCommand::createJob( … … 567 559 QScriptValue global = engine->newQObject(cppGlobal, 568 560 QScriptEngine::ScriptOwnership, 569 #if QT_VERSION >= 0x040500570 561 QScriptEngine::ExcludeSuperClassContents); 571 #else572 QScriptEngine::ExcludeSuperClassMethods573 | QScriptEngine::ExcludeSuperClassProperties);574 #endif575 562 { 576 563 QScriptValueIterator it(engine->globalObject()); … … 580 567 } 581 568 } 582 #if QT_VERSION >= 0x040500583 569 engine->setGlobalObject(global); 584 #else585 engine->globalObject().setScope(global);586 global = engine->globalObject();587 #endif588 570 589 571 cppGlobal->setMessageHandler(messageHandler); -
trunk/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackmodel.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 46 46 #include <QtScript/qscriptcontextinfo.h> 47 47 #include <QtCore/qfileinfo.h> 48 #include <QtCore/qcoreapplication.h> 48 49 49 50 QT_BEGIN_NAMESPACE … … 132 133 return name; 133 134 } else if (index.column() == 2) { 134 if (info.lineNumber() == -1)135 return QString::fromLatin1("<native>");136 135 QString fn = QFileInfo(info.fileName()).fileName(); 137 if (fn.isEmpty()) 138 fn = QString::fromLatin1("<anonymous script, id=%0>").arg(info.scriptId()); 136 if (fn.isEmpty()) { 137 if (info.functionType() == QScriptContextInfo::ScriptFunction) 138 fn = QString::fromLatin1("<anonymous script, id=%0>").arg(info.scriptId()); 139 else 140 fn = QString::fromLatin1("<native>"); 141 142 } 139 143 return QString::fromLatin1("%0:%1").arg(fn).arg(info.lineNumber()); 140 144 } … … 155 159 if (role == Qt::DisplayRole) { 156 160 if (section == 0) 157 return Q Object::tr("Level");161 return QCoreApplication::translate("QScriptDebuggerStackModel", "Level"); 158 162 else if (section == 1) 159 return Q Object::tr("Name");163 return QCoreApplication::translate("QScriptDebuggerStackModel", "Name"); 160 164 else if (section == 2) 161 return Q Object::tr("Location");165 return QCoreApplication::translate("QScriptDebuggerStackModel", "Location"); 162 166 } 163 167 return QVariant(); -
trunk/src/scripttools/debugging/qscriptdebuggerstackmodel_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackwidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebuggervalue.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 95 95 { 96 96 if (value.isValid()) { 97 d_ptr = new QScriptDebuggerValuePrivate;97 d_ptr.reset(new QScriptDebuggerValuePrivate); 98 98 if (value.isUndefined()) 99 99 d_ptr->type = UndefinedValue; … … 158 158 159 159 QScriptDebuggerValue::QScriptDebuggerValue(const QScriptDebuggerValue &other) 160 : d_ptr(other.d_ptr )160 : d_ptr(other.d_ptr.data()) 161 161 { 162 162 if (d_ptr) … … 166 166 QScriptDebuggerValue::~QScriptDebuggerValue() 167 167 { 168 if (d_ptr && !d_ptr->ref.deref()) {169 delete d_ptr;170 d_ptr = 0;171 }172 168 } 173 169 174 170 QScriptDebuggerValue &QScriptDebuggerValue::operator=(const QScriptDebuggerValue &other) 175 171 { 176 if (d_ptr == other.d_ptr) 177 return *this; 178 if (d_ptr && !d_ptr->ref.deref()) 179 delete d_ptr; 180 d_ptr = other.d_ptr; 181 if (d_ptr) 182 d_ptr->ref.ref(); 172 d_ptr.assign(other.d_ptr.data()); 183 173 return *this; 184 174 } -
trunk/src/scripttools/debugging/qscriptdebuggervalue_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/private/qscopedpointer_p.h> 58 58 #include <QtCore/qlist.h> 59 59 … … 104 104 105 105 private: 106 QSc riptDebuggerValuePrivate *d_ptr;106 QScopedSharedPointer<QScriptDebuggerValuePrivate> d_ptr; 107 107 108 108 Q_DECLARE_PRIVATE(QScriptDebuggerValue) -
trunk/src/scripttools/debugging/qscriptdebuggervalueproperty.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 42 42 #include "qscriptdebuggervalueproperty_p.h" 43 43 #include "qscriptdebuggervalue_p.h" 44 #include "qscriptdebuggerobjectsnapshotdelta_p.h" 44 45 45 46 #include <QtCore/qatomic.h> … … 106 107 */ 107 108 QScriptDebuggerValueProperty::QScriptDebuggerValueProperty(const QScriptDebuggerValueProperty &other) 108 : d_ptr(other.d_ptr )109 : d_ptr(other.d_ptr.data()) 109 110 { 110 111 if (d_ptr) … … 117 118 QScriptDebuggerValueProperty::~QScriptDebuggerValueProperty() 118 119 { 119 if (d_ptr && !d_ptr->ref.deref()) {120 delete d_ptr;121 d_ptr = 0;122 }123 120 } 124 121 … … 128 125 QScriptDebuggerValueProperty &QScriptDebuggerValueProperty::operator=(const QScriptDebuggerValueProperty &other) 129 126 { 130 if (d_ptr == other.d_ptr) 131 return *this; 132 if (d_ptr && !d_ptr->ref.deref()) 133 delete d_ptr; 134 d_ptr = other.d_ptr; 135 if (d_ptr) 136 d_ptr->ref.ref(); 127 d_ptr.assign(other.d_ptr.data()); 137 128 return *this; 138 129 } … … 226 217 } 227 218 219 QDataStream &operator<<(QDataStream &out, const QScriptDebuggerObjectSnapshotDelta &delta) 220 { 221 out << delta.removedProperties; 222 out << delta.changedProperties; 223 out << delta.addedProperties; 224 return out; 225 } 226 227 QDataStream &operator>>(QDataStream &in, QScriptDebuggerObjectSnapshotDelta &delta) 228 { 229 in >> delta.removedProperties; 230 in >> delta.changedProperties; 231 in >> delta.addedProperties; 232 return in; 233 } 234 228 235 QT_END_NAMESPACE -
trunk/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qlist.h> 58 #include <QtCore/private/qscopedpointer_p.h> 58 59 #include <QtScript/qscriptvalue.h> 59 60 … … 86 87 87 88 private: 88 QSc riptDebuggerValuePropertyPrivate *d_ptr;89 QScopedSharedPointer<QScriptDebuggerValuePropertyPrivate> d_ptr; 89 90 90 91 Q_DECLARE_PRIVATE(QScriptDebuggerValueProperty) -
trunk/src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 62 62 class QScriptErrorLogWidgetInterface; 63 63 class QScriptDebuggerCodeFinderWidgetInterface; 64 class QScriptDebuggerStackWidgetInterface; 65 class QScriptDebuggerScriptsWidgetInterface; 66 class QScriptDebuggerLocalsWidgetInterface; 67 class QScriptDebuggerCodeWidgetInterface; 68 class QScriptBreakpointsWidgetInterface; 64 69 65 70 class Q_AUTOTEST_EXPORT QScriptDebuggerWidgetFactoryInterface … … 72 77 virtual QScriptErrorLogWidgetInterface *createErrorLogWidget() = 0; 73 78 virtual QScriptDebuggerCodeFinderWidgetInterface *createCodeFinderWidget() = 0; 79 virtual QScriptDebuggerStackWidgetInterface *createStackWidget() = 0; 80 virtual QScriptDebuggerScriptsWidgetInterface *createScriptsWidget() = 0; 81 virtual QScriptDebuggerLocalsWidgetInterface *createLocalsWidget() = 0; 82 virtual QScriptDebuggerCodeWidgetInterface *createCodeWidget() = 0; 83 virtual QScriptBreakpointsWidgetInterface *createBreakpointsWidget() = 0; 74 84 }; 75 85 -
trunk/src/scripttools/debugging/qscriptdebugoutputwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebugoutputwidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptedit.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 111 111 QObject::connect(this, SIGNAL(blockCountChanged(int)), 112 112 this, SLOT(updateExtraAreaWidth())); 113 QObject::connect(this, SIGNAL(updateRequest( const QRect &,int)),114 this, SLOT(updateExtraArea( const QRect &,int)));113 QObject::connect(this, SIGNAL(updateRequest(QRect,int)), 114 this, SLOT(updateExtraArea(QRect,int))); 115 115 QObject::connect(this, SIGNAL(cursorPositionChanged()), 116 116 this, SLOT(highlightCurrentLine())); … … 155 155 { 156 156 m_executableLineNumbers = lineNumbers; 157 } 158 159 bool QScriptEdit::isExecutableLine(int lineNumber) const 160 { 161 #if 0 // ### enable me once we have information about the script again 162 return m_executableLineNumbers.contains(lineNumber); 163 #else 164 Q_UNUSED(lineNumber); 165 return true; 166 #endif 157 167 } 158 168 … … 343 353 } 344 354 345 #if QT_VERSION >= 0x040500 346 if (!m_executableLineNumbers.contains(lineNumber)) 355 if (!isExecutableLine(lineNumber)) 347 356 painter.setPen(pal.color(QPalette::Mid)); 348 357 else 349 #endif350 358 painter.setPen(QColor(Qt::darkCyan)); 351 359 QString number = QString::number(lineNumber); … … 371 379 if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking 372 380 bool hand = (e->pos().x() <= markWidth); 373 #if QT_VERSION >= 0x040500374 381 int lineNumber = cursor.blockNumber() + m_baseLineNumber; 375 hand = hand && m_executableLineNumbers.contains(lineNumber); 376 #endif 382 hand = hand && isExecutableLine(lineNumber); 377 383 #ifndef QT_NO_CURSOR 378 384 if (hand != (m_extraArea->cursor().shape() == Qt::PointingHandCursor)) … … 383 389 if (e->type() == QEvent::MouseButtonPress) { 384 390 if (e->button() == Qt::LeftButton) { 385 #if QT_VERSION >= 0x040500386 391 int lineNumber = cursor.blockNumber() + m_baseLineNumber; 387 bool executable = m_executableLineNumbers.contains(lineNumber); 388 #else 389 bool executable = true; 390 #endif 392 bool executable = isExecutableLine(lineNumber); 391 393 if ((e->pos().x() <= markWidth) && executable) 392 394 m_extraAreaToggleBlockNumber = cursor.blockNumber(); … … 403 405 } else if (e->button() == Qt::RightButton) { 404 406 int lineNumber = cursor.blockNumber() + m_baseLineNumber; 405 #if QT_VERSION >= 0x040500 406 if (!m_executableLineNumbers.contains(lineNumber)) 407 if (!isExecutableLine(lineNumber)) 407 408 return; 408 #endif409 409 bool has = m_breakpoints.contains(lineNumber); 410 410 QMenu *popup = new QMenu(); 411 QAction *toggleAct = new QAction( QObject::tr("Toggle Breakpoint"), popup);411 QAction *toggleAct = new QAction(tr("Toggle Breakpoint"), popup); 412 412 popup->addAction(toggleAct); 413 QAction *disableAct = new QAction( QObject::tr("Disable Breakpoint"), popup);414 QAction *enableAct = new QAction( QObject::tr("Enable Breakpoint"), popup);413 QAction *disableAct = new QAction(tr("Disable Breakpoint"), popup); 414 QAction *enableAct = new QAction(tr("Enable Breakpoint"), popup); 415 415 QWidget *conditionWidget = new QWidget(); 416 416 { 417 417 QHBoxLayout *hbox = new QHBoxLayout(conditionWidget); 418 hbox->addWidget(new QLabel( QObject::tr("Breakpoint Condition:")));418 hbox->addWidget(new QLabel(tr("Breakpoint Condition:"))); 419 419 hbox->addWidget(new QLineEdit()); 420 420 } -
trunk/src/scripttools/debugging/qscriptedit_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 76 76 void setExecutionLineNumber(int lineNumber, bool error); 77 77 void setExecutableLineNumbers(const QSet<int> &lineNumbers); 78 bool isExecutableLine(int lineNumber) const; 78 79 79 80 int currentLineNumber() const; -
trunk/src/scripttools/debugging/qscriptenginedebugger.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 43 43 #include "qscriptdebugger_p.h" 44 44 #include "qscriptenginedebuggerfrontend_p.h" 45 #include "qscriptdebuggerconsolewidget_p.h" 46 #include "qscriptdebuggerstackwidget_p.h" 47 #include "qscriptdebuggerscriptswidget_p.h" 48 #include "qscriptdebuggerlocalswidget_p.h" 49 #include "qscriptdebuggercodewidget_p.h" 50 #include "qscriptdebuggercodefinderwidget_p.h" 51 #include "qscriptbreakpointswidget_p.h" 52 #include "qscriptdebugoutputwidget_p.h" 53 #include "qscripterrorlogwidget_p.h" 54 #include "qscriptdebuggerwidgetfactoryinterface_p.h" 45 #include "qscriptdebuggerstandardwidgetfactory_p.h" 55 46 #include <private/qobject_p.h> 56 47 … … 59 50 #include <QtGui/qdockwidget.h> 60 51 #include <QtGui/qmainwindow.h> 61 #include <QtGui/qmenu.h>62 52 #include <QtGui/qmenubar.h> 63 #include <QtGui/qtoolbar.h>64 53 #include <QtGui/qboxlayout.h> 54 55 // this has to be outside the namespace 56 static void initScriptEngineDebuggerResources() 57 { 58 Q_INIT_RESOURCE(scripttools_debugging); 59 } 60 61 QT_BEGIN_NAMESPACE 65 62 66 63 class QtScriptDebuggerResourceInitializer … … 68 65 public: 69 66 QtScriptDebuggerResourceInitializer() { 70 Q_INIT_RESOURCE(scripttools_debugging); 67 // call outside-the-namespace function 68 initScriptEngineDebuggerResources(); 71 69 } 72 70 }; 73 71 74 QT_BEGIN_NAMESPACE75 76 72 /*! 77 73 \since 4.5 … … 80 76 \brief The QScriptEngineDebugger class provides a QScriptEngine debugger. 81 77 82 \ingroup script tools83 \mainclass 78 \ingroup script 79 84 80 85 81 The QScriptEngineDebugger class provides a debugger that can be … … 131 127 evaluationResumed() signal is emitted when script evaluation is 132 128 resumed, i.e, when execution control is given back to the script 133 engine. 129 engine. The state() function returns the debugger's current state. 134 130 135 131 When calling QScriptEngine::evaluate() it is useful to pass a … … 231 227 */ 232 228 229 /*! 230 \enum QScriptEngineDebugger::DebuggerState 231 \since 4.6 232 233 This enum specifies the current state of the debugger. 234 235 \value RunningState The debugger is running. (Script evaluation is allowed.) 236 \value SuspendedState The debugger has suspended script evaluation. 237 */ 238 233 239 class QScriptEngineDebuggerPrivate 234 : public QObjectPrivate, 235 public QScriptDebuggerWidgetFactoryInterface 240 : public QObjectPrivate 236 241 { 237 242 Q_DECLARE_PUBLIC(QScriptEngineDebugger) … … 240 245 ~QScriptEngineDebuggerPrivate(); 241 246 242 QScriptDebugOutputWidgetInterface *createDebugOutputWidget();243 QScriptDebuggerConsoleWidgetInterface *createConsoleWidget();244 QScriptErrorLogWidgetInterface *createErrorLogWidget();245 QScriptDebuggerCodeFinderWidgetInterface *createCodeFinderWidget();246 247 247 // private slots 248 248 void _q_showStandardWindow(); … … 252 252 QScriptDebugger *debugger; 253 253 QScriptEngineDebuggerFrontend *frontend; 254 #ifndef QT_NO_MAINWINDOW 254 255 QMainWindow *standardWindow; 256 #endif 255 257 bool autoShow; 256 258 … … 295 297 debugger = 0; 296 298 frontend = 0; 299 #ifndef QT_NO_MAINWINDOW 297 300 standardWindow = 0; 301 #endif 298 302 autoShow = true; 299 303 } … … 303 307 delete debugger; 304 308 delete frontend; 309 #ifndef QT_NO_MAINWINDOW 305 310 if (standardWindow) { 306 311 QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); … … 312 317 delete standardWindow; 313 318 } 314 } 315 316 QScriptDebugOutputWidgetInterface *QScriptEngineDebuggerPrivate::createDebugOutputWidget() 317 { 318 return new QScriptDebugOutputWidget(); 319 } 320 321 QScriptDebuggerConsoleWidgetInterface *QScriptEngineDebuggerPrivate::createConsoleWidget() 322 { 323 return new QScriptDebuggerConsoleWidget(); 324 } 325 326 QScriptErrorLogWidgetInterface *QScriptEngineDebuggerPrivate::createErrorLogWidget() 327 { 328 return new QScriptErrorLogWidget(); 329 } 330 331 QScriptDebuggerCodeFinderWidgetInterface *QScriptEngineDebuggerPrivate::createCodeFinderWidget() 332 { 333 return new QScriptDebuggerCodeFinderWidget(); 334 } 335 319 #endif 320 } 321 322 #ifndef QT_NO_MAINWINDOW 336 323 void QScriptEngineDebuggerPrivate::_q_showStandardWindow() 337 324 { … … 340 327 standardWindow->show(); 341 328 } 329 #endif 342 330 343 331 void QScriptEngineDebuggerPrivate::createDebugger() … … 346 334 if (!debugger) { 347 335 debugger = new QScriptDebugger(); 348 debugger->setWidgetFactory( this);336 debugger->setWidgetFactory(new QScriptDebuggerStandardWidgetFactory(q)); 349 337 QObject::connect(debugger, SIGNAL(started()), 350 338 q, SIGNAL(evaluationResumed())); … … 418 406 419 407 /*! 408 \since 4.6 409 410 Returns the current state of the debugger. 411 412 \sa evaluationResumed() 413 \sa evaluationSuspended() 414 */ 415 QScriptEngineDebugger::DebuggerState QScriptEngineDebugger::state() const 416 { 417 Q_D(const QScriptEngineDebugger); 418 return !d->debugger || !d->debugger->isInteractive() ? SuspendedState : RunningState; 419 } 420 421 /*! 420 422 421 423 Returns a pointer to the instance of the specified standard \a … … 441 443 Q_D(const QScriptEngineDebugger); 442 444 const_cast<QScriptEngineDebuggerPrivate*>(d)->createDebugger(); 443 switch (widget) { 444 case ConsoleWidget: { 445 QScriptDebuggerConsoleWidgetInterface *w = d->debugger->consoleWidget(); 446 if (!w) { 447 w = new QScriptDebuggerConsoleWidget(); 448 d->debugger->setConsoleWidget(w); 449 } 450 return w; 451 } 452 case StackWidget: { 453 QScriptDebuggerStackWidgetInterface *w = d->debugger->stackWidget(); 454 if (!w) { 455 w = new QScriptDebuggerStackWidget(); 456 d->debugger->setStackWidget(w); 457 } 458 return w; 459 } 460 case ScriptsWidget: { 461 QScriptDebuggerScriptsWidgetInterface *w = d->debugger->scriptsWidget(); 462 if (!w) { 463 w = new QScriptDebuggerScriptsWidget(); 464 d->debugger->setScriptsWidget(w); 465 } 466 return w; 467 } 468 case LocalsWidget: { 469 QScriptDebuggerLocalsWidgetInterface *w = d->debugger->localsWidget(); 470 if (!w) { 471 w = new QScriptDebuggerLocalsWidget(); 472 d->debugger->setLocalsWidget(w); 473 } 474 return w; 475 } 476 case CodeWidget: { 477 QScriptDebuggerCodeWidgetInterface *w = d->debugger->codeWidget(); 478 if (!w) { 479 w = new QScriptDebuggerCodeWidget(); 480 d->debugger->setCodeWidget(w); 481 } 482 return w; 483 } 484 case CodeFinderWidget: { 485 QScriptDebuggerCodeFinderWidgetInterface *w = d->debugger->codeFinderWidget(); 486 if (!w) { 487 w = new QScriptDebuggerCodeFinderWidget(); 488 d->debugger->setCodeFinderWidget(w); 489 } 490 return w; 491 } 492 case BreakpointsWidget: { 493 QScriptBreakpointsWidgetInterface *w = d->debugger->breakpointsWidget(); 494 if (!w) { 495 w = new QScriptBreakpointsWidget(); 496 d->debugger->setBreakpointsWidget(w); 497 } 498 return w; 499 } 500 case DebugOutputWidget: { 501 QScriptDebugOutputWidgetInterface *w = d->debugger->debugOutputWidget(); 502 if (!w) { 503 w = new QScriptDebugOutputWidget(); 504 d->debugger->setDebugOutputWidget(w); 505 } 506 return w; 507 } 508 case ErrorLogWidget: { 509 QScriptErrorLogWidgetInterface *w = d->debugger->errorLogWidget(); 510 if (!w) { 511 w = new QScriptErrorLogWidget(); 512 d->debugger->setErrorLogWidget(w); 513 } 514 return w; 515 } 516 } 517 return 0; 445 return d->debugger->widget(static_cast<QScriptDebugger::DebuggerWidget>(static_cast<int>(widget))); 518 446 } 519 447 … … 539 467 QScriptEngineDebugger *that = const_cast<QScriptEngineDebugger*>(this); 540 468 that->d_func()->createDebugger(); 541 switch (action) { 542 case InterruptAction: 543 return d->debugger->interruptAction(that); 544 case ContinueAction: 545 return d->debugger->continueAction(that); 546 case StepIntoAction: 547 return d->debugger->stepIntoAction(that); 548 case StepOverAction: 549 return d->debugger->stepOverAction(that); 550 case StepOutAction: 551 return d->debugger->stepOutAction(that); 552 case RunToCursorAction: 553 return d->debugger->runToCursorAction(that); 554 case RunToNewScriptAction: 555 return d->debugger->runToNewScriptAction(that); 556 case ToggleBreakpointAction: 557 return d->debugger->toggleBreakpointAction(that); 558 case ClearDebugOutputAction: 559 return d->debugger->clearDebugOutputAction(that); 560 case ClearErrorLogAction: 561 return d->debugger->clearErrorLogAction(that); 562 case ClearConsoleAction: 563 return d->debugger->clearConsoleAction(that); 564 case FindInScriptAction: 565 return d->debugger->findInScriptAction(that); 566 case FindNextInScriptAction: 567 return d->debugger->findNextInScriptAction(that); 568 case FindPreviousInScriptAction: 569 return d->debugger->findPreviousInScriptAction(that); 570 case GoToLineAction: 571 return d->debugger->goToLineAction(that); 572 } 573 return 0; 469 return d->debugger->action(static_cast<QScriptDebugger::DebuggerAction>(static_cast<int>(action)), that); 574 470 } 575 471 … … 612 508 \sa createStandardMenu(), createStandardToolBar() 613 509 */ 510 #ifndef QT_NO_MAINWINDOW 614 511 QMainWindow *QScriptEngineDebugger::standardWindow() const 615 512 { … … 624 521 QDockWidget *scriptsDock = new QDockWidget(win); 625 522 scriptsDock->setObjectName(QLatin1String("qtscriptdebugger_scriptsDockWidget")); 626 scriptsDock->setWindowTitle( QObject::tr("Loaded Scripts"));523 scriptsDock->setWindowTitle(tr("Loaded Scripts")); 627 524 scriptsDock->setWidget(widget(ScriptsWidget)); 628 525 win->addDockWidget(Qt::LeftDockWidgetArea, scriptsDock); … … 630 527 QDockWidget *breakpointsDock = new QDockWidget(win); 631 528 breakpointsDock->setObjectName(QLatin1String("qtscriptdebugger_breakpointsDockWidget")); 632 breakpointsDock->setWindowTitle( QObject::tr("Breakpoints"));529 breakpointsDock->setWindowTitle(tr("Breakpoints")); 633 530 breakpointsDock->setWidget(widget(BreakpointsWidget)); 634 531 win->addDockWidget(Qt::LeftDockWidgetArea, breakpointsDock); … … 636 533 QDockWidget *stackDock = new QDockWidget(win); 637 534 stackDock->setObjectName(QLatin1String("qtscriptdebugger_stackDockWidget")); 638 stackDock->setWindowTitle( QObject::tr("Stack"));535 stackDock->setWindowTitle(tr("Stack")); 639 536 stackDock->setWidget(widget(StackWidget)); 640 537 win->addDockWidget(Qt::RightDockWidgetArea, stackDock); … … 642 539 QDockWidget *localsDock = new QDockWidget(win); 643 540 localsDock->setObjectName(QLatin1String("qtscriptdebugger_localsDockWidget")); 644 localsDock->setWindowTitle( QObject::tr("Locals"));541 localsDock->setWindowTitle(tr("Locals")); 645 542 localsDock->setWidget(widget(LocalsWidget)); 646 543 win->addDockWidget(Qt::RightDockWidgetArea, localsDock); … … 648 545 QDockWidget *consoleDock = new QDockWidget(win); 649 546 consoleDock->setObjectName(QLatin1String("qtscriptdebugger_consoleDockWidget")); 650 consoleDock->setWindowTitle( QObject::tr("Console"));547 consoleDock->setWindowTitle(tr("Console")); 651 548 consoleDock->setWidget(widget(ConsoleWidget)); 652 549 win->addDockWidget(Qt::BottomDockWidgetArea, consoleDock); … … 654 551 QDockWidget *debugOutputDock = new QDockWidget(win); 655 552 debugOutputDock->setObjectName(QLatin1String("qtscriptdebugger_debugOutputDockWidget")); 656 debugOutputDock->setWindowTitle( QObject::tr("Debug Output"));553 debugOutputDock->setWindowTitle(tr("Debug Output")); 657 554 debugOutputDock->setWidget(widget(DebugOutputWidget)); 658 555 win->addDockWidget(Qt::BottomDockWidgetArea, debugOutputDock); … … 660 557 QDockWidget *errorLogDock = new QDockWidget(win); 661 558 errorLogDock->setObjectName(QLatin1String("qtscriptdebugger_errorLogDockWidget")); 662 errorLogDock->setWindowTitle( QObject::tr("Error Log"));559 errorLogDock->setWindowTitle(tr("Error Log")); 663 560 errorLogDock->setWidget(widget(ErrorLogWidget)); 664 561 win->addDockWidget(Qt::BottomDockWidgetArea, errorLogDock); … … 672 569 win->menuBar()->addMenu(that->createStandardMenu(win)); 673 570 674 QMenu *editMenu = win->menuBar()->addMenu( QObject::tr("Search"));571 QMenu *editMenu = win->menuBar()->addMenu(tr("Search")); 675 572 editMenu->addAction(action(FindInScriptAction)); 676 573 editMenu->addAction(action(FindNextInScriptAction)); … … 679 576 editMenu->addAction(action(GoToLineAction)); 680 577 681 QMenu *viewMenu = win->menuBar()->addMenu( QObject::tr("View"));578 QMenu *viewMenu = win->menuBar()->addMenu(tr("View")); 682 579 viewMenu->addAction(scriptsDock->toggleViewAction()); 683 580 viewMenu->addAction(breakpointsDock->toggleViewAction()); … … 697 594 win->setCentralWidget(central); 698 595 699 win->setWindowTitle( QObject::tr("Qt Script Debugger"));596 win->setWindowTitle(tr("Qt Script Debugger")); 700 597 win->setUnifiedTitleAndToolBarOnMac(true); 701 598 … … 715 612 return win; 716 613 } 614 #endif // QT_NO_MAINWINDOW 717 615 718 616 /*! … … 724 622 QMenu *QScriptEngineDebugger::createStandardMenu(QWidget *parent) 725 623 { 726 QMenu *menu = new QMenu(parent); 727 menu->setTitle(QObject::tr("Debug")); 728 menu->addAction(action(ContinueAction)); 729 menu->addAction(action(InterruptAction)); 730 menu->addAction(action(StepIntoAction)); 731 menu->addAction(action(StepOverAction)); 732 menu->addAction(action(StepOutAction)); 733 menu->addAction(action(RunToCursorAction)); 734 menu->addAction(action(RunToNewScriptAction)); 735 736 menu->addSeparator(); 737 menu->addAction(action(ToggleBreakpointAction)); 738 739 menu->addSeparator(); 740 menu->addAction(action(ClearDebugOutputAction)); 741 menu->addAction(action(ClearErrorLogAction)); 742 menu->addAction(action(ClearConsoleAction)); 743 744 return menu; 624 Q_D(QScriptEngineDebugger); 625 d->createDebugger(); 626 return d->debugger->createStandardMenu(parent, this); 745 627 } 746 628 … … 751 633 \sa createStandardMenu() 752 634 */ 635 #ifndef QT_NO_TOOLBAR 753 636 QToolBar *QScriptEngineDebugger::createStandardToolBar(QWidget *parent) 754 637 { 755 QToolBar *tb = new QToolBar(parent); 756 tb->setObjectName(QLatin1String("qtscriptdebugger_standardToolBar")); 757 tb->addAction(action(ContinueAction)); 758 tb->addAction(action(InterruptAction)); 759 tb->addAction(action(StepIntoAction)); 760 tb->addAction(action(StepOverAction)); 761 tb->addAction(action(StepOutAction)); 762 tb->addAction(action(RunToCursorAction)); 763 tb->addAction(action(RunToNewScriptAction)); 764 tb->addSeparator(); 765 tb->addAction(action(FindInScriptAction)); 766 return tb; 767 } 638 Q_D(QScriptEngineDebugger); 639 d->createDebugger(); 640 return d->debugger->createStandardToolBar(parent, this); 641 } 642 #endif 768 643 769 644 /*! -
trunk/src/scripttools/debugging/qscriptenginedebugger.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 49 49 QT_BEGIN_NAMESPACE 50 50 51 #if QT_VERSION >= 0x04050052 51 QT_MODULE(ScriptTools) 53 #else54 # define Q_SCRIPTTOOLS_EXPORT55 #endif56 52 57 53 class QAction; 58 54 class QScriptEngine; 59 55 class QWidget; 56 #ifndef QT_NO_MAINWINDOW 60 57 class QMainWindow; 58 #endif 61 59 class QMenu; 62 60 class QToolBar; … … 97 95 }; 98 96 97 enum DebuggerState { 98 RunningState, 99 SuspendedState 100 }; 101 99 102 QScriptEngineDebugger(QObject *parent = 0); 100 103 ~QScriptEngineDebugger(); … … 106 109 void setAutoShowStandardWindow(bool autoShow); 107 110 111 #ifndef QT_NO_MAINWINDOW 108 112 QMainWindow *standardWindow() const; 113 #endif 109 114 QToolBar *createStandardToolBar(QWidget *parent = 0); 110 115 QMenu *createStandardMenu(QWidget *parent = 0); … … 112 117 QWidget *widget(DebuggerWidget widget) const; 113 118 QAction *action(DebuggerAction action) const; 119 120 DebuggerState state() const; 114 121 115 122 Q_SIGNALS: -
trunk/src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 324 324 325 325 /*! 326 \ reimp326 \internal 327 327 */ 328 328 void QScriptEngineDebuggerFrontend::processCommand(int id, const QScriptDebuggerCommand &command) -
trunk/src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripterrorlogwidget.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripterrorlogwidget_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptmessagehandlerinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptobjectsnapshot.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptobjectsnapshot_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptscriptdata.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 99 99 100 100 QScriptScriptData::QScriptScriptData(const QScriptScriptData &other) 101 : d_ptr(other.d_ptr )101 : d_ptr(other.d_ptr.data()) 102 102 { 103 103 if (d_ptr) … … 107 107 QScriptScriptData::~QScriptScriptData() 108 108 { 109 if (d_ptr && !d_ptr->ref.deref()) {110 delete d_ptr;111 d_ptr = 0;112 }113 109 } 114 110 115 111 QScriptScriptData &QScriptScriptData::operator=(const QScriptScriptData &other) 116 112 { 117 if (d_ptr == other.d_ptr) 118 return *this; 119 if (d_ptr && !d_ptr->ref.deref()) 120 delete d_ptr; 121 d_ptr = other.d_ptr; 122 if (d_ptr) 123 d_ptr->ref.ref(); 113 d_ptr.assign(other.d_ptr.data()); 124 114 return *this; 125 115 } … … 192 182 QDataStream &operator<<(QDataStream &out, const QScriptScriptData &data) 193 183 { 194 const QScriptScriptDataPrivate *d = data.d_ptr ;184 const QScriptScriptDataPrivate *d = data.d_ptr.data(); 195 185 if (d) { 196 186 out << d->contents; … … 208 198 { 209 199 if (!data.d_ptr) { 210 data.d_ptr = new QScriptScriptDataPrivate();200 data.d_ptr.reset(new QScriptScriptDataPrivate()); 211 201 data.d_ptr->ref.ref(); 212 202 } 213 QScriptScriptDataPrivate *d = data.d_ptr ;203 QScriptScriptDataPrivate *d = data.d_ptr.data(); 214 204 in >> d->contents; 215 205 in >> d->fileName; -
trunk/src/scripttools/debugging/qscriptscriptdata_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/private/qscopedpointer_p.h> 58 58 #include <QtCore/qdatetime.h> 59 59 #include <QtCore/qmap.h> … … 92 92 93 93 private: 94 QSc riptScriptDataPrivate *d_ptr;94 QScopedSharedPointer<QScriptScriptDataPrivate> d_ptr; 95 95 96 96 Q_DECLARE_PRIVATE(QScriptScriptData) -
trunk/src/scripttools/debugging/qscriptstdmessagehandler.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 67 67 QScriptStdMessageHandler::~QScriptStdMessageHandler() 68 68 { 69 delete d_ptr;70 69 } 71 70 … … 93 92 msg.append(text); 94 93 95 FILE *fp = 0; 96 switch (type) { 97 case QtDebugMsg: 98 fp = stdout; 99 break; 100 case QtWarningMsg: 101 case QtCriticalMsg: 102 case QtFatalMsg: 103 fp = stderr; 104 break; 105 } 106 94 FILE *fp = (type == QtDebugMsg) ? stdout : stderr; 107 95 fprintf(fp, "%s\n", msg.toLatin1().constData()); 108 96 fflush(fp); -
trunk/src/scripttools/debugging/qscriptstdmessagehandler_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 53 53 // We mean it. 54 54 // 55 56 #include <QtCore/qscopedpointer.h> 55 57 56 58 #include "qscriptmessagehandlerinterface_p.h" … … 72 74 73 75 private: 74 QSc riptStdMessageHandlerPrivate *d_ptr;76 QScopedPointer<QScriptStdMessageHandlerPrivate> d_ptr; 75 77 76 78 private: -
trunk/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptsyntaxhighlighter_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscripttooltipproviderinterface_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 QT_BEGIN_NAMESPACE 59 59 60 class QPoint; 60 61 class QStringList; 61 62 … … 65 66 virtual ~QScriptToolTipProviderInterface() {} 66 67 67 virtual QString toolTip(int frameIndex, int lineNumber,68 const QStringList &path) = 0;68 virtual void showToolTip(const QPoint &pos, int frameIndex, 69 int lineNumber, const QStringList &path) = 0; 69 70 }; 70 71 -
trunk/src/scripttools/debugging/qscriptvalueproperty.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 96 96 */ 97 97 QScriptValueProperty::QScriptValueProperty(const QScriptValueProperty &other) 98 : d_ptr(other.d_ptr )98 : d_ptr(other.d_ptr.data()) 99 99 { 100 100 if (d_ptr) … … 107 107 QScriptValueProperty::~QScriptValueProperty() 108 108 { 109 if (d_ptr && !d_ptr->ref.deref()) {110 delete d_ptr;111 d_ptr = 0;112 }113 109 } 114 110 … … 118 114 QScriptValueProperty &QScriptValueProperty::operator=(const QScriptValueProperty &other) 119 115 { 120 if (d_ptr == other.d_ptr) 121 return *this; 122 if (d_ptr && !d_ptr->ref.deref()) 123 delete d_ptr; 124 d_ptr = other.d_ptr; 125 if (d_ptr) 126 d_ptr->ref.ref(); 116 d_ptr.assign(other.d_ptr.data()); 127 117 return *this; 128 118 } -
trunk/src/scripttools/debugging/qscriptvalueproperty_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 56 56 #include <QtCore/qobjectdefs.h> 57 57 #include <QtCore/qlist.h> 58 #include <QtCore/private/qscopedpointer_p.h> 58 59 #include <QtScript/qscriptvalue.h> 59 60 … … 82 83 83 84 private: 84 QSc riptValuePropertyPrivate *d_ptr;85 QScopedSharedPointer<QScriptValuePropertyPrivate> d_ptr; 85 86 86 87 Q_DECLARE_PRIVATE(QScriptValueProperty) -
trunk/src/scripttools/debugging/qscriptxmlparser.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/scripttools/debugging/qscriptxmlparser_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtSCriptTools module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 **
Note:
See TracChangeset
for help on using the changeset viewer.