@ -99,6 +99,8 @@ extern Q_GUI_EXPORT _qt_filedialog_existing_directory_hook qt_filedialog_existin
# ifdef INTEGRATE_WITH_TDE
static QString TDEFileDialogOpenName ( QWidget * parent , const QString & caption , const QString & dir , const QString & filter , QString * selectedFilter , QFileDialog : : Options )
{
Q_UNUSED ( selectedFilter ) ;
if ( parent ) {
return convertTQt3ToQt4String ( KFileDialog : : getOpenFileNameWId ( convertQt4ToTQt3String ( dir ) , convertQt4ToTQt3String ( filter ) , parent - > winId ( ) , convertQt4ToTQt3String ( caption ) ) ) ;
}
@ -109,6 +111,9 @@ static QString TDEFileDialogOpenName(QWidget *parent, const QString &caption, co
static QStringList TDEFileDialogOpenNames ( QWidget * parent , const QString & caption , const QString & dir , const QString & filter , QString * selectedFilter , QFileDialog : : Options )
{
Q_UNUSED ( selectedFilter ) ;
Q_UNUSED ( parent ) ;
// TQWidget* tqt3parent = TQT_TQWIDGET(TQWidget::find( parent->winId() ));
TQWidget * tqt3parent = 0 ;
return convertTQt3ToQt4StringList ( KFileDialog : : getOpenFileNames ( convertQt4ToTQt3String ( dir ) , convertQt4ToTQt3String ( filter ) , tqt3parent , convertQt4ToTQt3String ( caption ) ) ) ;
@ -116,6 +121,8 @@ static QStringList TDEFileDialogOpenNames(QWidget *parent, const QString &captio
static QString TDEFileDialogSaveName ( QWidget * parent , const QString & caption , const QString & dir , const QString & filter , QString * selectedFilter , QFileDialog : : Options )
{
Q_UNUSED ( selectedFilter ) ;
if ( parent ) {
return convertTQt3ToQt4String ( KFileDialog : : getSaveFileNameWId ( convertQt4ToTQt3String ( dir ) , convertQt4ToTQt3String ( filter ) , parent - > winId ( ) , convertQt4ToTQt3String ( caption ) ) ) ;
}
@ -126,6 +133,8 @@ static QString TDEFileDialogSaveName(QWidget *parent, const QString &caption, co
static QString TDEFileDialogSelectDirectory ( QWidget * parent , const QString & caption , const QString & dir , QFileDialog : : Options )
{
Q_UNUSED ( parent ) ;
TQWidget * tqt3parent = 0 ;
return convertTQt3ToQt4String ( KFileDialog : : getExistingDirectory ( convertQt4ToTQt3String ( dir ) , tqt3parent , convertQt4ToTQt3String ( caption ) ) ) ;
}
@ -243,7 +252,6 @@ Qt4TDEStyle::Qt4TDEStyle() : m_aboutData(NULL), m_tqApplication(NULL), m_tdeAppl
// How a bug of this magnitude could go undetected in a major Qt4 release is beyond me...I guess cell phones don't generally use thin lines in their widgets!?
// This is Yet Another Example of why TDE cannot rely on Qt4 for anything of any real importance
printf ( " [WARNING] Qt4 >= Qt 4.8.0 detected; you are likely affected by these Qt4 bugs: \n \r [WARNING] https://bugreports.qt-project.org/browse/QTBUG-25896 \n \r [WARNING] https://bugreports.qt-project.org/browse/QTBUG-26013 \n \r [WARNING] There is no known workaround for this problem; your Qt4 application will display with numerous graphical glitches. \n \r " ) ;
printf ( " [WARNING] You are also likely affected by a bug in QPixmap::fromX11Pixmap, which will result \n \r [WARNING] in qtoctave and similar applications failing to display, along with numerous BadDrawable errors! \n \r " ) ; fflush ( stdout ) ;
# endif
}
@ -621,6 +629,8 @@ QIcon Qt4TDEStyle::standardIconImplementation(StandardPixmap standardIcon, const
int Qt4TDEStyle : : styleHint ( StyleHint hint , const QStyleOption * opt , const QWidget * w , QStyleHintReturn * returnData ) const
{
Q_UNUSED ( returnData ) ;
int retval = 0 ;
TQWidget * interfaceWidget = 0 ;
@ -1064,7 +1074,6 @@ QSize Qt4TDEStyle::sizeFromContents(ContentsType type, const QStyleOption *opt,
TQStyleOption tqt3opt ( TQStyleOption : : Default ) ;
TQMenuItem * drawingItem = 0 ;
QAction * drawingAction = 0 ;
QList < QAction * > qt4menuactions ;
int tqt3tabwidth = 0 ;
int tqt3iconwidth = 0 ;
@ -1357,8 +1366,8 @@ int Qt4TDEStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
if ( opt ) {
m_tqt3generic_widget - > setGeometry ( 0 , 0 , opt - > rect . width ( ) , opt - > rect . height ( ) ) ;
interfaceWidget = m_tqt3generic_widget ;
}
retswitch = 1 ;
}
break ;
case QStyle : : PM_IndicatorWidth :
tqt3pixelmetric = TQStyle : : PM_IndicatorWidth ;
@ -1605,7 +1614,9 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
TQComboBox * m_tqt3combobox_widget = 0 ;
TQSlider * m_tqt3slider_widget = 0 ;
TQScrollBar * m_tqt3scrollbar_widget = 0 ;
#if 0
TQSpinBox * m_tqt3spinbox_widget = 0 ;
# endif
TQSpinWidget * m_tqt3spinwidget_widget = 0 ;
TQTitleBar * m_tqt3titlebar_widget = 0 ;
TQMenuBar * m_tqt3menubar_widget = 0 ;
@ -1623,7 +1634,9 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
m_tqt3combobox_widget = dynamic_cast < TQComboBox * > ( cacheResult ) ;
m_tqt3slider_widget = dynamic_cast < TQSlider * > ( cacheResult ) ;
m_tqt3scrollbar_widget = dynamic_cast < TQScrollBar * > ( cacheResult ) ;
#if 0
m_tqt3spinbox_widget = dynamic_cast < TQSpinBox * > ( cacheResult ) ;
# endif
m_tqt3spinwidget_widget = dynamic_cast < TQSpinWidget * > ( cacheResult ) ;
m_tqt3titlebar_widget = dynamic_cast < TQTitleBar * > ( cacheResult ) ;
m_tqt3menubar_widget = dynamic_cast < TQMenuBar * > ( cacheResult ) ;
@ -1935,8 +1948,8 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
interfaceWidget = 0 ;
}
break ;
#if 0
case TQT3WT_TQSpinBox :
#if 0
if ( ! m_tqt3spinbox_widget ) m_tqt3spinbox_widget = new TQSpinBox ( m_tqt3parent_widget ) ;
interfaceWidget = m_tqt3spinbox_widget ;
// Copy over all widget attributes
@ -1955,8 +1968,8 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
}
interfaceWidget = 0 ;
}
break ;
# endif
break ;
case TQT3WT_TQSpinWidget :
if ( ! m_tqt3spinwidget_widget ) m_tqt3spinwidget_widget = new TQSpinWidget ( m_tqt3parent_widget ) ;
interfaceWidget = m_tqt3spinwidget_widget ;
@ -2005,11 +2018,15 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
m_tqt3toolbox_widget - > setEnabled ( qt4toolbox_widget - > isEnabled ( ) ) ;
// Remove all tabs
for ( i = 0 ; i < m_tqt3toolbox_widget - > count ( ) ; i + + ) {
m_tqt3toolbox_widget - > removeItem ( m_tqt3toolbox_widget - > item ( i ) ) ;
TQWidget * item = m_tqt3toolbox_widget - > item ( i ) ;
m_tqt3toolbox_widget - > removeItem ( item ) ;
if ( item ) {
delete item ;
}
}
// Copy all tabs
for ( i = 0 ; i < qt4toolbox_widget - > count ( ) ; i + + ) {
m_tqt3toolbox_widget - > insertItem ( i , m_tqt3generic_widget , convertQt4ToTQt3String ( qt4toolbox_widget - > itemText ( i ) ) ) ;
m_tqt3toolbox_widget - > insertItem ( i , new TQWidget ( m_tqt3parent_widget ) , convertQt4ToTQt3String ( qt4toolbox_widget - > itemText ( i ) ) ) ;
}
}
else {
@ -2046,6 +2063,8 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
interfaceWidget = 0 ;
}
break ;
case TQT3WT_NONE :
break ;
}
if ( ( qt4objectptr ) & & ( ! cacheResult ) & & ( interfaceWidget ) ) {
@ -2067,8 +2086,6 @@ void Qt4TDEStyle::handleQt4ObjectDestroyed(QObject* obj) {
QRect Qt4TDEStyle : : subElementRect ( SubElement element , const QStyleOption * opt , const QWidget * w ) const
{
TQStyle : : SFlags sflags = 0 ;
bool can_override = true ;
TQStyle : : SubRect tqtSR ;
@ -2110,8 +2127,6 @@ QRect Qt4TDEStyle::subElementRect(SubElement element, const QStyleOption *opt, c
QRect Qt4TDEStyle : : subControlRect ( ComplexControl control , const QStyleOptionComplex * opt , SubControl subControl , const QWidget * w ) const
{
TQStyle : : SFlags sflags = 0 ;
bool can_override = true ;
TQStyle : : ComplexControl tqtCC ;
TQStyle : : SubControl tqtSC ;