From d4ebd66dff9ceb845ae1ed7845b48cd87b19385b Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 13 Jul 2009 11:51:45 +0200 Subject: make Calendar and Screenshot examples work again the qscript connect() function throws an error when attempting to connect to an overloaded signal, so we need to disambiguate. --- examples/CalendarWidget.qs | 16 ++++++++-------- examples/Screenshot.qs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/CalendarWidget.qs b/examples/CalendarWidget.qs index 9f9f876..dcacf54 100644 --- a/examples/CalendarWidget.qs +++ b/examples/CalendarWidget.qs @@ -226,13 +226,13 @@ CalendarWidget.prototype.createGeneralOptionsGroupBox = function() { this.verticalHeaderLabel = new QLabel(tr("&Vertical header:")); this.verticalHeaderLabel.setBuddy(this.verticalHeaderCombo); - this.localeCombo.currentIndexChanged.connect(this, this.localeChanged); - this.firstDayCombo.currentIndexChanged.connect(this, this.firstDayChanged); - this.selectionModeCombo.currentIndexChanged.connect(this, this.selectionModeChanged); + this.localeCombo['currentIndexChanged(int)'].connect(this, this.localeChanged); + this.firstDayCombo['currentIndexChanged(int)'].connect(this, this.firstDayChanged); + this.selectionModeCombo['currentIndexChanged(int)'].connect(this, this.selectionModeChanged); this.gridCheckBox.toggled.connect(this, this.calendar.setGridVisible); this.navigationCheckBox.toggled.connect(this, this.calendar.setNavigationBarVisible); - this.horizontalHeaderCombo.currentIndexChanged.connect(this, this.horizontalHeaderChanged); - this.verticalHeaderCombo.currentIndexChanged.connect(this, "verticalHeaderChanged"); + this.horizontalHeaderCombo['currentIndexChanged(int)'].connect(this, this.horizontalHeaderChanged); + this.verticalHeaderCombo['currentIndexChanged(int)'].connect(this, "verticalHeaderChanged"); var checkBoxLayout = new QHBoxLayout(); checkBoxLayout.addWidget(this.gridCheckBox, 0, Qt.AlignmentFlag(1)); //FIXME @@ -334,9 +334,9 @@ CalendarWidget.prototype.createTextFormatsGroupBox = function() { this.mayFirstCheckBox = new QCheckBox(tr("May &1 in red")); - this.weekdayColorCombo.currentIndexChanged.connect(this, this.weekdayFormatChanged); - this.weekendColorCombo.currentIndexChanged.connect(this, this.weekendFormatChanged); - this.headerTextFormatCombo.currentIndexChanged.connect(this, this.reformatHeaders); + this.weekdayColorCombo['currentIndexChanged(int)'].connect(this, this.weekdayFormatChanged); + this.weekendColorCombo['currentIndexChanged(int)'].connect(this, this.weekendFormatChanged); + this.headerTextFormatCombo['currentIndexChanged(int)'].connect(this, this.reformatHeaders); this.firstFridayCheckBox.toggled.connect(this, this.reformatCalendarPage); this.mayFirstCheckBox.toggled.connect(this, this.reformatCalendarPage); diff --git a/examples/Screenshot.qs b/examples/Screenshot.qs index ead2a32..4503851 100644 --- a/examples/Screenshot.qs +++ b/examples/Screenshot.qs @@ -111,7 +111,7 @@ Screenshot.prototype.createOptionsGroupBox = function() { this.delaySpinBox = new QSpinBox(); this.delaySpinBox.suffix = tr(" s"); this.delaySpinBox.maximum = 60; - this.delaySpinBox.valueChanged.connect(this, this.updateCheckBox); + this.delaySpinBox['valueChanged(int)'].connect(this, this.updateCheckBox); this.delaySpinBoxLabel = new QLabel(tr("Screenshot Delay:")); -- cgit v1.2.3