[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs
From: Roberto Raggi <roberto () kdevelop ! org>
Date: 2007-02-21 12:38:24
Message-ID: 1172061504.084093.14127.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 635930 by raggi:
recursive blockSignals
M +4 -4 kate/part/kateschema.cpp
M +8 -8 kate/part/kateviewinternal.cpp
M +4 -4 kate/plugins/isearch/ISearchPlugin.cpp
M +2 -2 kde3support/kdeui/k3popupmenu.cpp
M +4 -4 kdeui/actions/kselectaction.cpp
M +6 -6 kdeui/widgets/kdatewidget.cpp
M +2 -2 kdeui/widgets/klineedit.cpp
M +2 -2 kdeui/widgets/kmenu.cpp
M +2 -2 kdeui/widgets/ktabwidget.cpp
M +12 -12 khtml/rendering/render_form.cpp
M +2 -2 kio/kfile/kfiledialog.cpp
M +5 -5 kio/kfile/kurlcombobox.cpp
M +2 -2 knotify/config/knotifyconfigactionswidget.cpp
--- trunk/KDE/kdelibs/kate/part/kateschema.cpp #635929:635930
@@ -239,7 +239,7 @@
m_schema = newSchema;
// first block signals otherwise setColor emits changed
- blockSignals(true);
+ bool blocked = blockSignals(true);
// If we havent this schema, read in from config file
if ( ! m_schemas.contains( newSchema ) )
@@ -313,7 +313,7 @@
ui->markers->setColor( m_schemas [ newSchema ].markerColors[ ui->combobox->currentIndex() ] );
- blockSignals(false);
+ blockSignals(blocked);
}
void KateSchemaConfigColorTab::apply ()
@@ -366,12 +366,12 @@
void KateSchemaConfigColorTab::slotComboBoxChanged(int index)
{
// temporarily block signals because setColor emits changed as well
- ui->markers->blockSignals(true);
+ bool blocked = ui->markers->blockSignals(true);
if (index<7)
ui->markers->setColor( m_schemas[m_schema].markerColors[index] );
else
ui->markers->setColor( m_schemas[m_schema].templateColors[index-7] );
- ui->markers->blockSignals(false);
+ ui->markers->blockSignals(blocked);
}
//END KateSchemaConfigColorTab
--- trunk/KDE/kdelibs/kate/part/kateviewinternal.cpp #635929:635930
@@ -372,9 +372,9 @@
KTextEditor::Cursor c = viewLineOffset(startPos(), offset);
scrollPos(c);
- m_lineScroll->blockSignals(true);
+ bool blocked = m_lineScroll->blockSignals(true);
m_lineScroll->setValue(startLine());
- m_lineScroll->blockSignals(false);
+ m_lineScroll->blockSignals(blocked);
}
void KateViewInternal::scrollAction( int action )
@@ -528,9 +528,9 @@
else
update();
- m_columnScroll->blockSignals(true);
+ bool blocked = m_columnScroll->blockSignals(true);
m_columnScroll->setValue(m_startX);
- m_columnScroll->blockSignals(false);
+ m_columnScroll->blockSignals(blocked);
}
// If changed is true, the lines that have been set dirty have been updated.
@@ -557,7 +557,7 @@
if (changed)
cache()->clear();
- m_lineScroll->blockSignals(true);
+ bool blocked = m_lineScroll->blockSignals(blocked);
if (width() != cache()->viewWidth())
cache()->setViewWidth(width());
@@ -574,7 +574,7 @@
m_lineScroll->setValue(startPos().line());
m_lineScroll->setSingleStep(1);
m_lineScroll->setPageStep(height() / renderer()->fontHeight());
- m_lineScroll->blockSignals(false);
+ m_lineScroll->blockSignals(blocked);
if (!m_view->dynWordWrap())
{
@@ -588,7 +588,7 @@
scrollColumns(0);
}
- m_columnScroll->blockSignals(true);
+ blocked = m_columnScroll->blockSignals(true);
// disable scrollbar
m_columnScroll->setDisabled (max == 0);
@@ -601,7 +601,7 @@
m_columnScroll->setSingleStep(renderer()->config()->fontMetrics().width('a'));
m_columnScroll->setPageStep(width());
- m_columnScroll->blockSignals(false);
+ m_columnScroll->blockSignals(blocked);
}
if (m_smartDirty)
--- trunk/KDE/kdelibs/kate/plugins/isearch/ISearchPlugin.cpp #635929:635930
@@ -333,14 +333,14 @@
updateLabelText( false, m_searchBackward );
- m_combo->blockSignals( true );
+ bool blocked = m_combo->blockSignals( true );
QString text = m_view->selectionText();
if( text.isEmpty() )
text = m_lastString;
m_combo->setItemText( m_combo->currentIndex(), text );
- m_combo->blockSignals( false );
+ m_combo->blockSignals( blocked );
m_combo->lineEdit()->selectAll();
// kDebug() << "Starting search at " << m_startLine << ", " << m_startCol << endl;
@@ -366,9 +366,9 @@
m_lastString = text;
}
- m_combo->blockSignals( true );
+ bool blocked = m_combo->blockSignals( true );
m_combo->clear();
- m_combo->blockSignals( false );
+ m_combo->blockSignals( blocked );
if( m_view ) {
m_view->setFocus(); // Will call endSearch()
--- trunk/KDE/kdelibs/kde3support/kdeui/k3popupmenu.cpp #635929:635930
@@ -527,9 +527,9 @@
// (deep within QWidget::hide) the activated(int) signal is the
// last signal to be emitted, even after things like aboutToHide()
// AJS
- blockSignals(true);
+ bool blocked = blockSignals(true);
d->m_ctxMenu->hide();
- blockSignals(false);
+ blockSignals(blocked);
}
Q3PopupMenu::hideEvent(e);
}
--- trunk/KDE/kdelibs/kdeui/actions/kselectaction.cpp #635929:635930
@@ -459,9 +459,9 @@
//kDebug (129) << "\t\tuser typed new item '" << newItemText << "'" << endl;
// Only 1 combobox contains this and it's not a proper action.
- triggeringCombo->blockSignals (true);
+ bool blocked = triggeringCombo->blockSignals (true);
triggeringCombo->removeItem (index);
- triggeringCombo->blockSignals (false);
+ triggeringCombo->blockSignals (blocked);
KAction *newAction = addAction (newItemText);
@@ -621,7 +621,7 @@
}
- comboBox->blockSignals (true);
+ bool blocked = comboBox->blockSignals (true);
if (event->type () == QEvent::ActionAdded)
{
@@ -691,7 +691,7 @@
comboBox->setCurrentIndex (newItem);
}
- comboBox->blockSignals (false);
+ comboBox->blockSignals (blocked);
return false/*propagate event*/;
}
--- trunk/KDE/kdelibs/kdeui/widgets/kdatewidget.cpp #635929:635930
@@ -103,18 +103,18 @@
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- d->m_day->blockSignals(true);
- d->m_month->blockSignals(true);
- d->m_year->blockSignals(true);
+ bool dayBlocked = d->m_day->blockSignals(true);
+ bool monthBlocked = d->m_month->blockSignals(true);
+ bool yearBlocked = d->m_year->blockSignals(true);
d->m_day->setMaximum(calendar->daysInMonth(date));
d->m_day->setValue(calendar->day(date));
d->m_month->setCurrentIndex(calendar->month(date)-1);
d->m_year->setValue(calendar->year(date));
- d->m_day->blockSignals(false);
- d->m_month->blockSignals(false);
- d->m_year->blockSignals(false);
+ d->m_day->blockSignals(dayBlocked);
+ d->m_month->blockSignals(monthBlocked);
+ d->m_year->blockSignals(yearBlocked);
d->m_dat = date;
emit changed(d->m_dat);
--- trunk/KDE/kdelibs/kdeui/widgets/klineedit.cpp #635929:635930
@@ -1377,10 +1377,10 @@
}
if ( matchedItem )
{
- d->completionBox->blockSignals( true );
+ bool blocked = d->completionBox->blockSignals( true );
d->completionBox->setCurrentItem( matchedItem );
matchedItem->setSelected(wasSelected);
- d->completionBox->blockSignals( false );
+ d->completionBox->blockSignals( blocked );
}
}
else // completion box not visible yet -> show it
--- trunk/KDE/kdelibs/kdeui/widgets/kmenu.cpp #635929:635930
@@ -518,9 +518,9 @@
// (deep within QWidget::hide) the activated(int) signal is the
// last signal to be emitted, even after things like aboutToHide()
// AJS
- blockSignals(true);
+ bool blocked = blockSignals(true);
d->ctxMenu->hide();
- blockSignals(false);
+ blockSignals(blocked);
}
QMenu::hideEvent(e);
}
--- trunk/KDE/kdelibs/kdeui/widgets/ktabwidget.cpp #635929:635930
@@ -423,7 +423,7 @@
bool current = ( from == currentIndex() );
bool enabled = isTabEnabled( from );
- blockSignals( true );
+ bool blocked = blockSignals( true );
removeTab( from );
// Work-around kmdi brain damage which calls showPage() in insertTab()
@@ -442,7 +442,7 @@
if ( current )
setCurrentIndex( to );
setTabEnabled( to, enabled );
- blockSignals( false );
+ blockSignals( blocked );
emit ( movedTab( from, to ) );
}
--- trunk/KDE/kdelibs/khtml/rendering/render_form.cpp #635929:635930
@@ -603,14 +603,14 @@
}
if (element()->value().string() != widget()->text()) {
- widget()->blockSignals(true);
+ bool blocked = widget()->blockSignals(true);
int pos = widget()->cursorPosition();
widget()->setText(element()->value().string());
widget()->setModified( false );
widget()->setCursorPosition(pos);
- widget()->blockSignals(false);
+ widget()->blockSignals(blocked);
}
widget()->setReadOnly(element()->readOnly());
@@ -869,10 +869,10 @@
void RenderFileButton::updateFromElement()
{
KLineEdit* edit = widget()->lineEdit();
- edit->blockSignals(true);
+ bool blocked = edit->blockSignals(true);
edit->setText(element()->value().string());
edit->blockSignals(false);
- edit->setModified( false );
+ edit->setModified(blocked );
RenderFormElement::updateFromElement();
}
@@ -929,15 +929,15 @@
void ComboBoxWidget::showPopup()
{
QPoint p = pos();
- blockSignals(true);
+ bool blocked = blockSignals(true);
move( m_kwp->absolutePos() );
- blockSignals(false);
+ blockSignals(blocked);
KComboBox::showPopup();
- blockSignals(true);
+ blocked = blockSignals(true);
move( p );
- blockSignals(false);
+ blockSignals(blocked);
}
void ComboBoxWidget::hidePopup()
@@ -1663,9 +1663,9 @@
RenderFormElement::setStyle(_style);
- widget()->blockSignals(true);
+ bool blocked = widget()->blockSignals(true);
widget()->setAlignment(textAlignment());
- widget()->blockSignals(false);
+ widget()->blockSignals(blocked);
scrollbarsStyled = false;
@@ -1694,7 +1694,7 @@
QString elementText = element()->value().string();
if ( elementText != text() )
{
- w->blockSignals(true);
+ bool blocked = w->blockSignals(true);
QTextCursor tc = w->textCursor();
int cx = w->horizontalScrollBar()->value();
int cy = w->verticalScrollBar()->value();
@@ -1702,7 +1702,7 @@
w->setTextCursor(tc);
w->horizontalScrollBar()->setValue( cx );
w->verticalScrollBar()->setValue( cy );
- w->blockSignals(false);
+ w->blockSignals(blocked);
}
element()->m_dirtyvalue = false;
--- trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp #635929:635930
@@ -1150,12 +1150,12 @@
d->pathCombo->setUrl( url );
}
- locationEdit->blockSignals( true );
+ bool blocked = locationEdit->blockSignals( true );
locationEdit->setCurrentIndex( 0 );
if ( d->keepLocation )
locationEdit->setEditText( filename );
- locationEdit->blockSignals( false );
+ locationEdit->blockSignals( blocked );
QString dir = url.url(KUrl::AddTrailingSlash);
static_cast<KUrlCompletion*>( d->pathCombo->completionObject() )->setDir( dir );
--- trunk/KDE/kdelibs/kio/kfile/kurlcombobox.cpp #635929:635930
@@ -217,7 +217,7 @@
if ( url.isEmpty() )
return;
- blockSignals( true );
+ bool blocked = blockSignals( true );
// check for duplicates
QMap<int,const KUrlComboItem*>::ConstIterator mit = itemMapper.begin();
@@ -229,7 +229,7 @@
if ( myMode == Directories )
updateItem( mit.value(), mit.key(), opendirIcon );
- blockSignals( false );
+ blockSignals( blocked );
return;
}
++mit;
@@ -275,7 +275,7 @@
setCurrentIndex( id );
urlAdded = true;
- blockSignals( false );
+ blockSignals( blocked );
}
@@ -336,13 +336,13 @@
++mit;
}
- blockSignals( true );
+ bool blocked = blockSignals( true );
setDefaults();
QListIterator<const KUrlComboItem*> it( itemList );
while ( it.hasNext() ) {
insertUrlItem( it.next() );
}
- blockSignals( false );
+ blockSignals( blocked );
}
--- trunk/KDE/kdelibs/knotify/config/knotifyconfigactionswidget.cpp #635929:635930
@@ -37,7 +37,7 @@
void KNotifyConfigActionsWidget::setConfigElement( KNotifyConfigElement * config )
{
- blockSignals(true); //to block the changed() signal
+ bool blocked = blockSignals(true); //to block the changed() signal
QString prstring=config->readEntry( "Action" );
QStringList actions=prstring.split ("|");
@@ -50,7 +50,7 @@
m_ui.Sound_select->setUrl( KUrl( config->readEntry( "sound" , true ) ) );
m_ui.Logfile_select->setUrl( KUrl( config->readEntry( "logfile" , true ) ) );
m_ui.Execute_select->setUrl( KUrl( config->readEntry( "execute" ) ) );
- blockSignals(false);
+ blockSignals(blocked);
}
void KNotifyConfigActionsWidget::save( KNotifyConfigElement * config )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic