Changeset 1648

Show
Ignore:
Timestamp:
09/01/09 11:30:51 (11 years ago)
Author:
arnonym
Message:

Since installing kde4.3 from ppa, some involved package was updated. This newer version seems to not like QWidget.handle() and logging.handle() having different signatures...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/ffado-mixer.in

    r1640 r1648  
    6464        self.textlogger = QTextLogger(self) 
    6565        dock = QDockWidget("Log Messages",self) 
    66         dock.setWidget(self.textlogger
     66        dock.setWidget(self.textlogger.textedit
    6767        logging.getLogger('').addHandler(self.textlogger) 
    6868        self.addDockWidget(Qt.BottomDockWidgetArea, dock) 
  • trunk/libffado/support/mixer-qt4/ffado/logginghandler.py

    r1640 r1648  
    3838        QObject.emit( self, SIGNAL("log(QString,int)"), "%s: %s" % (record.name, record.getMessage()), 5000 ) 
    3939 
    40 class QTextLogger( QTextEdit, logging.Handler ): 
     40class QTextLogger( logging.Handler ): 
    4141    def __init__( self, parent, level=logging.NOTSET ): 
    42         QTextEdit.__init__( self, parent ) 
    4342        logging.Handler.__init__( self, level ) 
    4443 
    45         self.setReadOnly( True ) 
    46         self.setAcceptRichText( True ) 
     44        self.textedit = QTextEdit( parent ) 
     45 
     46        self.textedit.setReadOnly( True ) 
     47        self.textedit.setAcceptRichText( True ) 
    4748 
    4849    def emit( self, record ): 
     
    5455        if record.levelno <= 10: 
    5556            color = QColor( "#808080" ) 
    56         self.setTextColor( color ) 
     57        self.textedit.setTextColor( color ) 
    5758        tmp = "%s %s: %s" % (record.asctime, record.name, record.getMessage()) 
    58         self.append( tmp ) 
    59         self.verticalScrollBar().triggerAction( QAbstractSlider.SliderToMaximum ) 
     59        self.textedit.append( tmp ) 
     60        self.textedit.verticalScrollBar().triggerAction( QAbstractSlider.SliderToMaximum ) 
    6061 
    6162#