diff -rNu fglrx_panel_sources.orig/AdjustPage.cpp fglrx_panel_sources/AdjustPage.cpp --- fglrx_panel_sources.orig/AdjustPage.cpp 2004-10-20 14:51:04.000000000 +0200 +++ fglrx_panel_sources/AdjustPage.cpp 2004-10-20 15:57:33.178002376 +0200 @@ -23,7 +23,7 @@ #endif // DEBUG -AdjustPage::AdjustPage ( QWidget *parent, int CurMonitor ) : QWidget ( parent, (const char *)0 ) +AdjustPage::AdjustPage ( QWidget *parent, int CurMonitor ) : QWidget ( parent, reinterpret_cast(0) ) { m_CurMonitor = CurMonitor ; m_Init = FALSE ; @@ -185,23 +185,23 @@ pColorBlue->setFrameStyle ( QFrame::Panel | QFrame::Sunken ) ; pColorBlue->setBackgroundColor ( Qt::blue ) ; - pSliderRed = new QSlider ( (int)(GAMMA_MIN*100), (int)(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; + pSliderRed = new QSlider ( static_cast(GAMMA_MIN*100), static_cast(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; pSliderRed->setGeometry ( 120, 230, 150, 25 ) ; - pSliderRed->setTickmarks ( (QSlider::TickSetting)2 ) ; //Below + pSliderRed->setTickmarks ( static_cast(2) ) ; //Below pSliderRed->setFocusPolicy ( QWidget::StrongFocus ) ; pSliderRed->setBackgroundPixmap ( pixmap ) ; pSliderRed->setBackgroundOrigin ( QWidget::ParentOrigin ) ; - pSliderGreen = new QSlider ( (int)(GAMMA_MIN*100), (int)(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; + pSliderGreen = new QSlider ( static_cast(GAMMA_MIN*100), static_cast(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; pSliderGreen->setGeometry ( 120, 265, 150, 25 ) ; - pSliderGreen->setTickmarks ( (QSlider::TickSetting)2 ) ; //Below + pSliderGreen->setTickmarks ( static_cast(2) ) ; //Below pSliderGreen->setFocusPolicy ( QWidget::StrongFocus ) ; pSliderGreen->setBackgroundPixmap ( pixmap ) ; pSliderGreen->setBackgroundOrigin ( QWidget::ParentOrigin ) ; - pSliderBlue = new QSlider ( (int)(GAMMA_MIN*100), (int)(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; + pSliderBlue = new QSlider ( static_cast(GAMMA_MIN*100), static_cast(GAMMA_MAX*100), 30, 100, QSlider::Horizontal, this) ; pSliderBlue->setGeometry ( 120, 300, 150, 25 ) ; - pSliderBlue->setTickmarks ( (QSlider::TickSetting)2 ) ; //Below + pSliderBlue->setTickmarks ( static_cast(2) ) ; //Below pSliderBlue->setFocusPolicy ( QWidget::StrongFocus ) ; pSliderBlue->setBackgroundPixmap ( pixmap ) ; pSliderBlue->setBackgroundOrigin ( QWidget::ParentOrigin ) ; @@ -310,13 +310,13 @@ #endif // FGL_LATER ReadGamma ( ) ; m_CurGamma = m_Gamma ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } @@ -362,15 +362,15 @@ { if (!(m_CurMonitor)) { - m_Gamma.red = ((float)((DriverData.ulGamma1 >> 20) & 0x3FF)) / 100; - m_Gamma.green = ((float)((DriverData.ulGamma1 >> 10) & 0x3FF)) / 100; - m_Gamma.blue = ((float)( DriverData.ulGamma1 & 0x3FF)) / 100; + m_Gamma.red = static_cast((DriverData.ulGamma1 >> 20) & 0x3FF) / 100; + m_Gamma.green = static_cast((DriverData.ulGamma1 >> 10) & 0x3FF) / 100; + m_Gamma.blue = static_cast( DriverData.ulGamma1 & 0x3FF) / 100; } else { - m_Gamma.red = ((float)((DriverData.ulGamma2 >> 20) & 0x3FF)) / 100; - m_Gamma.green = ((float)((DriverData.ulGamma2 >> 10) & 0x3FF)) / 100; - m_Gamma.blue = ((float)( DriverData.ulGamma2 & 0x3FF)) / 100; + m_Gamma.red = static_cast((DriverData.ulGamma2 >> 20) & 0x3FF) / 100; + m_Gamma.green = static_cast((DriverData.ulGamma2 >> 10) & 0x3FF) / 100; + m_Gamma.blue = static_cast( DriverData.ulGamma2 & 0x3FF) / 100; } #if 0 DEB(printf ("=== DriverData.ulGamma1 0x%08lx .ulGamma2 0x%08lx ===\n", @@ -408,7 +408,7 @@ m_Timings.hdisplay, m_Timings.vdisplay, - (int)(((1000.0*(double)m_DotClock)/m_Timings.htotal)/m_Timings.vtotal + 0.5) + static_cast(((1000.0*static_cast(m_DotClock))/m_Timings.htotal)/m_Timings.vtotal + 0.5) ) ; pMonitorBox->setTitle ( Str ) ; @@ -623,7 +623,7 @@ float CurGamma, DeltaGamma ; QString Str ; - CurGamma = ((float)Value) / 100 ; + CurGamma = static_cast(Value) / 100 ; if ( CurGamma == m_Gamma.red ) return ; if ( CurGamma < GAMMA_MIN ) CurGamma = GAMMA_MIN ; if ( CurGamma > GAMMA_MAX ) CurGamma = GAMMA_MAX ; @@ -635,14 +635,14 @@ m_Gamma.green += DeltaGamma ; if ( m_Gamma.green < GAMMA_MIN ) m_Gamma.green = GAMMA_MIN ; if ( m_Gamma.green > GAMMA_MAX ) m_Gamma.green = GAMMA_MAX ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; m_Gamma.blue += DeltaGamma ; if ( m_Gamma.blue < GAMMA_MIN ) m_Gamma.blue = GAMMA_MIN ; if ( m_Gamma.blue > GAMMA_MAX ) m_Gamma.blue = GAMMA_MAX ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } @@ -657,7 +657,7 @@ float CurGamma, DeltaGamma ; QString Str ; - CurGamma = ((float)Value) / 100 ; + CurGamma = static_cast(Value) / 100 ; if ( CurGamma == m_Gamma.green ) return ; if ( CurGamma < GAMMA_MIN ) CurGamma = GAMMA_MIN ; if ( CurGamma > GAMMA_MAX ) CurGamma = GAMMA_MAX ; @@ -669,14 +669,14 @@ m_Gamma.red += DeltaGamma ; if ( m_Gamma.red < GAMMA_MIN ) m_Gamma.red = GAMMA_MIN ; if ( m_Gamma.red > GAMMA_MAX ) m_Gamma.red = GAMMA_MAX ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; m_Gamma.blue += DeltaGamma ; if ( m_Gamma.blue < GAMMA_MIN ) m_Gamma.blue = GAMMA_MIN ; if ( m_Gamma.blue > GAMMA_MAX ) m_Gamma.blue = GAMMA_MAX ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } @@ -691,7 +691,7 @@ float CurGamma, DeltaGamma ; QString Str ; - CurGamma = ((float)Value) / 100 ; + CurGamma = static_cast(Value) / 100 ; if ( CurGamma == m_Gamma.blue ) return ; if ( CurGamma < GAMMA_MIN ) CurGamma = GAMMA_MIN ; if ( CurGamma > GAMMA_MAX ) CurGamma = GAMMA_MAX ; @@ -703,14 +703,14 @@ m_Gamma.red += DeltaGamma ; if ( m_Gamma.red < GAMMA_MIN ) m_Gamma.red = GAMMA_MIN ; if ( m_Gamma.red > GAMMA_MAX ) m_Gamma.red = GAMMA_MAX ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; m_Gamma.green += DeltaGamma ; if ( m_Gamma.green < GAMMA_MIN ) m_Gamma.green = GAMMA_MIN ; if ( m_Gamma.green > GAMMA_MAX ) m_Gamma.green = GAMMA_MAX ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; } @@ -728,18 +728,18 @@ if ( pCouple->isChecked() ) { m_Gamma.green = GAMMA_DEFAULT ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; m_Gamma.blue = GAMMA_DEFAULT ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } InvokeGammaCorrection ( ) ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; } @@ -753,18 +753,18 @@ if ( pCouple->isChecked() ) { m_Gamma.red = GAMMA_DEFAULT ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; m_Gamma.blue = GAMMA_DEFAULT ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } InvokeGammaCorrection ( ) ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; @@ -778,18 +778,18 @@ if ( pCouple->isChecked() ) { m_Gamma.red = GAMMA_DEFAULT ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; m_Gamma.green = GAMMA_DEFAULT ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; } InvokeGammaCorrection ( ) ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; } @@ -815,9 +815,9 @@ { GammaSettings.Monitor = m_CurMonitor; GammaSettings.ulGamma = - (unsigned long) ((((unsigned long)(m_Gamma.red * 100)) << 20 ) | - (((unsigned long)(m_Gamma.green * 100)) << 10 ) | - (((unsigned long)(m_Gamma.blue * 100)))); + (static_cast(m_Gamma.red * 100) << 20 ) | + (static_cast(m_Gamma.green * 100) << 10 ) | + (static_cast(m_Gamma.blue * 100)); RetC = ExtSetGamma(&GammaSettings); } @@ -872,13 +872,13 @@ #endif // FGL_LATER //reset Gamma m_Gamma = m_CurGamma ; - pSliderRed->setValue ( (int)(m_Gamma.red*100) ) ; + pSliderRed->setValue ( static_cast(m_Gamma.red*100) ) ; Str.sprintf ( "%.2f", m_Gamma.red ) ; pTextRed->setText ( Str ) ; - pSliderGreen->setValue ( (int)(m_Gamma.green*100) ) ; + pSliderGreen->setValue ( static_cast(m_Gamma.green*100) ) ; Str.sprintf ( "%.2f", m_Gamma.green ) ; pTextGreen->setText ( Str ) ; - pSliderBlue->setValue ( (int)(m_Gamma.blue*100) ) ; + pSliderBlue->setValue ( static_cast(m_Gamma.blue*100) ) ; Str.sprintf ( "%.2f", m_Gamma.blue ) ; pTextBlue->setText ( Str ) ; InvokeGammaCorrection ( ) ; diff -rNu fglrx_panel_sources.orig/DualScreenPage.cpp fglrx_panel_sources/DualScreenPage.cpp --- fglrx_panel_sources.orig/DualScreenPage.cpp 2004-08-20 22:30:05.000000000 +0200 +++ fglrx_panel_sources/DualScreenPage.cpp 2004-10-20 15:41:46.784876000 +0200 @@ -25,7 +25,7 @@ #endif // DEBUG -DualScreenPage::DualScreenPage ( QWidget *parent ) : QWidget ( parent, (const char *)0 ) +DualScreenPage::DualScreenPage ( QWidget *parent ) : QWidget ( parent, reinterpret_cast(0) ) { m_Init = FALSE ; m_Changed = FALSE ; diff -rNu fglrx_panel_sources.orig/InfoPage.cpp fglrx_panel_sources/InfoPage.cpp --- fglrx_panel_sources.orig/InfoPage.cpp 2004-08-20 22:30:05.000000000 +0200 +++ fglrx_panel_sources/InfoPage.cpp 2004-10-20 15:31:48.689800272 +0200 @@ -2,7 +2,7 @@ #include "watermark.xpm" #include "atilogo.xpm" -InfoPage::InfoPage ( QWidget *parent, bool is_firegl ) : QWidget ( parent, (const char *)0 ) +InfoPage::InfoPage ( QWidget *parent, bool is_firegl ) : QWidget ( parent, reinterpret_cast(0) ) { m_Init = FALSE ; m_IsFireGL = is_firegl; @@ -38,7 +38,7 @@ if( m_IsFireGL ) { // ======== - BInfo = new QLabel ( tr("Display Adapter"), (QWidget *)this ) ; + BInfo = new QLabel ( tr("Display Adapter"), reinterpret_cast(this) ) ; // BInfo->setFont (QFont( "Helvetica", 18 ) ) ; BInfo->setGeometry ( 10, 10, 300, 20 ) ; BInfo->setAutoResize ( TRUE ) ; @@ -46,7 +46,7 @@ BInfo->setBackgroundOrigin ( QWidget::ParentOrigin ) ; BInfo->show ( ) ; - CardName = new QLabel ( tr("Card Name :"), (QWidget *)this ) ; + CardName = new QLabel ( tr("Card Name :"), reinterpret_cast(this) ) ; CardName->setGeometry ( 20, 35, 300, 20 ) ; CardName->setAutoResize ( TRUE ) ; @@ -54,7 +54,7 @@ CardName->setBackgroundOrigin ( QWidget::ParentOrigin ) ; CardName->show ( ) ; - CardName1 = new QLabel ( BoardInfo.BoardName ( ), (QWidget *)this ) ; + CardName1 = new QLabel ( BoardInfo.BoardName ( ), reinterpret_cast(this) ) ; CardName1->setGeometry ( 180, 35, 200, 20 ) ; CardName1->setAutoResize ( TRUE ) ; CardName1->setBackgroundPixmap ( pixmap ) ; @@ -62,14 +62,14 @@ CardName1->show ( ) ; - BiosVersion = new QLabel ( tr("BIOS Version :"), (QWidget *)this ) ; + BiosVersion = new QLabel ( tr("BIOS Version :"), reinterpret_cast(this) ) ; BiosVersion->setGeometry ( 20, 55, 300, 20 ) ; BiosVersion->setAutoResize ( TRUE ) ; BiosVersion->setBackgroundPixmap ( pixmap ) ; BiosVersion->setBackgroundOrigin ( QWidget::ParentOrigin ) ; BiosVersion->show ( ) ; - BiosVersion1 = new QLabel ( BoardInfo.BiosVersion ( ), (QWidget *)this ) ; + BiosVersion1 = new QLabel ( BoardInfo.BiosVersion ( ), reinterpret_cast(this) ) ; BiosVersion1->setGeometry ( 180, 55, 300, 20 ) ; BiosVersion1->setAutoResize ( TRUE ) ; BiosVersion1->setBackgroundPixmap ( pixmap ) ; @@ -77,14 +77,14 @@ BiosVersion1->show ( ) ; - ChipType = new QLabel ( tr("Chip Type :"), (QWidget *)this ) ; + ChipType = new QLabel ( tr("Chip Type :"), reinterpret_cast(this) ) ; ChipType->setGeometry ( 20, 75, 300, 20 ) ; ChipType->setAutoResize ( TRUE ) ; ChipType->setBackgroundPixmap ( pixmap ) ; ChipType->setBackgroundOrigin ( QWidget::ParentOrigin ) ; ChipType->show ( ) ; - ChipType1 = new QLabel ( BoardInfo.ChipType ( ), (QWidget *)this ) ; + ChipType1 = new QLabel ( BoardInfo.ChipType ( ), reinterpret_cast(this) ) ; ChipType1->setGeometry ( 180, 75, 300, 20 ) ; ChipType1->setAutoResize ( TRUE ) ; ChipType1->setBackgroundPixmap ( pixmap ) ; @@ -92,14 +92,14 @@ ChipType1->show ( ) ; - ChipRevision = new QLabel ( tr("Chip Revision :"), (QWidget *)this ) ; + ChipRevision = new QLabel ( tr("Chip Revision :"), reinterpret_cast(this) ) ; ChipRevision->setGeometry ( 20, 95, 300, 20 ) ; ChipRevision->setAutoResize ( TRUE ) ; ChipRevision->setBackgroundPixmap ( pixmap ) ; ChipRevision->setBackgroundOrigin ( QWidget::ParentOrigin ) ; ChipRevision->show ( ) ; - ChipRevision1 = new QLabel ( BoardInfo.ChipRevision ( ), (QWidget *)this ) ; + ChipRevision1 = new QLabel ( BoardInfo.ChipRevision ( ), reinterpret_cast(this) ) ; ChipRevision1->setGeometry ( 180, 95, 300, 20 ) ; ChipRevision1->setAutoResize ( TRUE ) ; ChipRevision1->setBackgroundPixmap ( pixmap ) ; @@ -107,14 +107,14 @@ ChipRevision1->show ( ) ; #if 0 - ChipSpeed = new QLabel ( tr("Chip Speed :"), (QWidget *)this ) ; + ChipSpeed = new QLabel ( tr("Chip Speed :"), reinterpret_cast(this) ) ; ChipSpeed->setGeometry ( 20, 120, 300, 20 ) ; ChipSpeed->setAutoResize ( TRUE ) ; ChipSpeed->setBackgroundPixmap ( pixmap ) ; ChipSpeed->setBackgroundOrigin ( QWidget::ParentOrigin ) ; ChipSpeed->show ( ) ; - ChipSpeed1 = new QLabel ( BoardInfo.ChipSpeed ( ), (QWidget *)this ) ; + ChipSpeed1 = new QLabel ( BoardInfo.ChipSpeed ( ), reinterpret_cast(this) ) ; ChipSpeed1->setGeometry ( 180, 120, 300, 20 ) ; ChipSpeed1->setAutoResize ( TRUE ) ; ChipSpeed1->setBackgroundPixmap ( pixmap ) ; @@ -122,7 +122,7 @@ ChipSpeed1->show ( ) ; #endif - DacSpeed = new QLabel ( tr("DAC Speed :"), (QWidget *)this ) ; + DacSpeed = new QLabel ( tr("DAC Speed :"), reinterpret_cast(this) ) ; // DacSpeed->setGeometry ( 20, 140, 300, 20 ) ; DacSpeed->setGeometry ( 20, 115, 300, 20 ) ; DacSpeed->setAutoResize ( TRUE ) ; @@ -130,7 +130,7 @@ DacSpeed->setBackgroundOrigin ( QWidget::ParentOrigin ) ; DacSpeed->show ( ) ; - DacSpeed1 = new QLabel ( BoardInfo.DacSpeed ( ), (QWidget *)this ) ; + DacSpeed1 = new QLabel ( BoardInfo.DacSpeed ( ), reinterpret_cast(this) ) ; // DacSpeed1->setGeometry ( 180, 140, 300, 20 ) ; DacSpeed1->setGeometry ( 180, 115, 300, 20 ) ; DacSpeed1->setAutoResize ( TRUE ) ; @@ -139,7 +139,7 @@ DacSpeed1->show ( ) ; - MemoryType = new QLabel ( tr("Memory Type :"), (QWidget *)this ) ; + MemoryType = new QLabel ( tr("Memory Type :"), reinterpret_cast(this) ) ; // MemoryType->setGeometry ( 20, 160, 300, 20 ) ; MemoryType->setGeometry ( 20, 135, 300, 20 ) ; MemoryType->setAutoResize ( TRUE ) ; @@ -147,7 +147,7 @@ MemoryType->setBackgroundOrigin ( QWidget::ParentOrigin ) ; MemoryType->show ( ) ; - MemoryType1 = new QLabel ( BoardInfo.MemoryType ( ), (QWidget *)this ) ; + MemoryType1 = new QLabel ( BoardInfo.MemoryType ( ), reinterpret_cast(this) ) ; // MemoryType1->setGeometry ( 180, 160, 300, 20 ) ; MemoryType1->setGeometry ( 180, 135, 300, 20 ) ; MemoryType1->setAutoResize ( TRUE ) ; @@ -155,7 +155,7 @@ MemoryType1->setBackgroundOrigin ( QWidget::ParentOrigin ) ; MemoryType1->show ( ) ; - MemorySize = new QLabel ( tr("Memory Size :"), (QWidget *)this ) ; + MemorySize = new QLabel ( tr("Memory Size :"), reinterpret_cast(this) ) ; // MemorySize->setGeometry ( 20, 180, 300, 20 ) ; MemorySize->setGeometry ( 20, 155, 300, 20 ) ; MemorySize->setAutoResize ( TRUE ) ; @@ -163,7 +163,7 @@ MemorySize->setBackgroundOrigin ( QWidget::ParentOrigin ) ; MemorySize->show ( ) ; - MemorySize1 = new QLabel ( BoardInfo.MemorySize ( ), (QWidget *)this ) ; + MemorySize1 = new QLabel ( BoardInfo.MemorySize ( ), reinterpret_cast(this) ) ; // MemorySize1->setGeometry ( 180, 180, 300, 20 ) ; MemorySize1->setGeometry ( 180, 155, 300, 20 ) ; MemorySize1->setAutoResize ( TRUE ) ; @@ -172,14 +172,14 @@ MemorySize1->show ( ) ; #if 0 - MemorySpeed = new QLabel ( tr("Memory Speed :"), (QWidget *)this ) ; + MemorySpeed = new QLabel ( tr("Memory Speed :"), reinterpret_cast(this) ) ; MemorySpeed->setGeometry ( 20, 200, 300, 20 ) ; MemorySpeed->setAutoResize ( TRUE ) ; MemorySpeed->setBackgroundPixmap ( pixmap ) ; MemorySpeed->setBackgroundOrigin ( QWidget::ParentOrigin ) ; MemorySpeed->show ( ) ; - MemorySpeed1 = new QLabel ( BoardInfo.MemorySpeed ( ), (QWidget *)this ) ; + MemorySpeed1 = new QLabel ( BoardInfo.MemorySpeed ( ), reinterpret_cast(this) ) ; MemorySpeed1->setGeometry ( 180, 200, 300, 20 ) ; MemorySpeed1->setAutoResize ( TRUE ) ; MemorySpeed1->setBackgroundPixmap ( pixmap ) ; @@ -187,14 +187,14 @@ MemorySpeed1->show ( ) ; #endif - TransferMode = new QLabel ( tr("Transfer Mode :"), (QWidget *)this ) ; + TransferMode = new QLabel ( tr("Transfer Mode :"), reinterpret_cast(this) ) ; TransferMode->setGeometry ( 20, 175, 300, 20 ) ; TransferMode->setAutoResize ( TRUE ) ; TransferMode->setBackgroundPixmap ( pixmap ) ; TransferMode->setBackgroundOrigin ( QWidget::ParentOrigin ) ; TransferMode->show ( ) ; - TransferMode1 = new QLabel ( BoardInfo.TransferMode ( ), (QWidget *)this ) ; + TransferMode1 = new QLabel ( BoardInfo.TransferMode ( ), reinterpret_cast(this) ) ; TransferMode1->setGeometry ( 180, 175, 300, 20 ) ; TransferMode1->setAutoResize ( TRUE ) ; TransferMode1->setBackgroundPixmap ( pixmap ) ; @@ -206,7 +206,7 @@ if( m_IsFireGL ) { // ======== - DInfo = new QLabel ( tr("Display Driver"), (QWidget *)this ) ; + DInfo = new QLabel ( tr("Display Driver"), reinterpret_cast(this) ) ; // DInfo->setFont (QFont( "Helvetica", 18 ) ) ; DInfo->setGeometry ( 10, 200, 300, 20 ) ; DInfo->setAutoResize ( TRUE ) ; @@ -214,14 +214,14 @@ DInfo->setBackgroundOrigin ( QWidget::ParentOrigin ) ; DInfo->show ( ) ; - DriverVersion = new QLabel ( tr("Driver Version :"), (QWidget *)this ) ; + DriverVersion = new QLabel ( tr("Driver Version :"), reinterpret_cast(this) ) ; DriverVersion->setGeometry ( 20, 225, 300, 20 ) ; DriverVersion->setAutoResize ( TRUE ) ; DriverVersion->setBackgroundPixmap ( pixmap ) ; DriverVersion->setBackgroundOrigin ( QWidget::ParentOrigin ) ; DriverVersion->show ( ) ; - DriverVersion1 = new QLabel ( BoardInfo.DriverVersion ( ), (QWidget *)this ) ; + DriverVersion1 = new QLabel ( BoardInfo.DriverVersion ( ), reinterpret_cast(this) ) ; DriverVersion1->setGeometry ( 180, 225, 300, 20 ) ; DriverVersion1->setAutoResize ( TRUE ) ; DriverVersion1->setBackgroundPixmap ( pixmap ) ; @@ -231,7 +231,7 @@ // ======== - OGLInfo = new QLabel ( tr("OpenGL"), (QWidget *)this ) ; + OGLInfo = new QLabel ( tr("OpenGL"), reinterpret_cast(this) ) ; // OGLInfo->setFont (QFont( "Helvetica", 18 ) ) ; OGLInfo->setGeometry ( 10, 245, 300, 20 ) ; OGLInfo->setAutoResize ( TRUE ) ; @@ -239,42 +239,42 @@ OGLInfo->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLInfo->show ( ) ; - OGLVendor = new QLabel ( tr("OpenGL vendor string :"), (QWidget *)this ) ; + OGLVendor = new QLabel ( tr("OpenGL vendor string :"), reinterpret_cast(this) ) ; OGLVendor->setGeometry ( 20, 270, 300, 20 ) ; OGLVendor->setAutoResize ( TRUE ) ; OGLVendor->setBackgroundPixmap ( pixmap ) ; OGLVendor->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLVendor->show ( ) ; - OGLVendor1 = new QLabel ( BoardInfo.OGLVendor ( ), (QWidget *)this ) ; + OGLVendor1 = new QLabel ( BoardInfo.OGLVendor ( ), reinterpret_cast(this) ) ; OGLVendor1->setGeometry ( 180, 270, 300, 20 ) ; OGLVendor1->setAutoResize ( TRUE ) ; OGLVendor1->setBackgroundPixmap ( pixmap ) ; OGLVendor1->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLVendor1->show ( ) ; - OGLRenderer = new QLabel ( tr("OpenGL renderer string :"), (QWidget *)this ) ; + OGLRenderer = new QLabel ( tr("OpenGL renderer string :"), reinterpret_cast(this) ) ; OGLRenderer->setGeometry ( 20, 290, 300, 20 ) ; OGLRenderer->setAutoResize ( TRUE ) ; OGLRenderer->setBackgroundPixmap ( pixmap ) ; OGLRenderer->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLRenderer->show ( ) ; - OGLRenderer1 = new QLabel ( BoardInfo.OGLRenderer ( ), (QWidget *)this ) ; + OGLRenderer1 = new QLabel ( BoardInfo.OGLRenderer ( ), reinterpret_cast(this) ) ; OGLRenderer1->setGeometry ( 180, 290, 300, 20 ) ; OGLRenderer1->setAutoResize ( TRUE ) ; OGLRenderer1->setBackgroundPixmap ( pixmap ) ; OGLRenderer1->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLRenderer1->show ( ) ; - OGLVersion = new QLabel ( tr("OpenGL version string :"), (QWidget *)this ) ; + OGLVersion = new QLabel ( tr("OpenGL version string :"), reinterpret_cast(this) ) ; OGLVersion->setGeometry ( 20, 310, 300, 20 ) ; OGLVersion->setAutoResize ( TRUE ) ; OGLVersion->setBackgroundPixmap ( pixmap ) ; OGLVersion->setBackgroundOrigin ( QWidget::ParentOrigin ) ; OGLVersion->show ( ) ; - OGLVersion1 = new QLabel ( BoardInfo.OGLVersion ( ), (QWidget *)this ) ; + OGLVersion1 = new QLabel ( BoardInfo.OGLVersion ( ), reinterpret_cast(this) ) ; OGLVersion1->setGeometry ( 180, 310, 300, 20 ) ; OGLVersion1->setAutoResize ( TRUE ) ; OGLVersion1->setBackgroundPixmap ( pixmap ) ; @@ -282,7 +282,7 @@ OGLVersion1->show ( ) ; // ======== - Logo = new QLabel ( "", (QWidget *)this ) ; + Logo = new QLabel ( "", reinterpret_cast(this) ) ; Logo->setGeometry ( 10, 330, 72, 50 ) ; Logo->setBackgroundPixmap ( logopix ) ; Logo->show ( ) ; diff -rNu fglrx_panel_sources.orig/Page.cpp fglrx_panel_sources/Page.cpp --- fglrx_panel_sources.orig/Page.cpp 2004-08-20 22:30:05.000000000 +0200 +++ fglrx_panel_sources/Page.cpp 2004-10-20 15:21:41.000000000 +0200 @@ -12,7 +12,7 @@ extern unsigned long ulDesktopSetup; -Page::Page( QWidget *parent, int Type, bool is_firegl ) : QWidget( parent, (const char *)0 ) +Page::Page( QWidget *parent, int Type, bool is_firegl ) : QWidget( parent, reinterpret_cast(0) ) { QFrame *Frame ; int Cnt ; @@ -33,11 +33,11 @@ pFrame1->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 6, PANEL_HEIGHT - 94 - 6 ) ; pFrame1->setFrameStyle ( QFrame::Panel | QFrame::Raised ) ; - pInfo = new InfoPage ( (QWidget *)pFrame1, is_firegl ) ; + pInfo = new InfoPage ( reinterpret_cast(pFrame1), is_firegl ) ; pInfo->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 12, PANEL_HEIGHT - 94 - 12 ) ; connect( parent, SIGNAL( Activate( int ) ), pInfo, SLOT( OnActivate( int ) ) ); - ((Sheet *)parent)->addTab ( (QWidget *)this, tr("Information") ) ; + ((Sheet *)parent)->addTab ( reinterpret_cast(this), tr("Information") ) ; break ; } case DUALSCREEN_PAGE : @@ -49,12 +49,12 @@ pFrame1->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 6, PANEL_HEIGHT - 94 - 6 ) ; pFrame1->setFrameStyle ( QFrame::Panel | QFrame::Raised ) ; - pDual = new DualScreenPage ( (QWidget *)pFrame1 ) ; + pDual = new DualScreenPage ( reinterpret_cast(pFrame1) ) ; pDual->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 12, PANEL_HEIGHT - 94 - 12 ) ; connect( parent, SIGNAL( Activate( int ) ), pDual, SLOT( OnActivate( int ) ) ); connect( parent, SIGNAL( Apply( int * ) ), pDual, SLOT( OnApply( int * ) ) ); - ((Sheet *)parent)->addTab ( (QWidget *)this, tr("DualScreen") ) ; + ((Sheet *)parent)->addTab ( reinterpret_cast(this), tr("DualScreen") ) ; break ; } case ADJUST_PAGE : @@ -77,8 +77,8 @@ QString MonitorName ; MonitorName.sprintf ( tr("Screen %d"), Cnt + 1 ) ; - pAdjust = new AdjustPage ( (QWidget *)pTab, Cnt ) ; - pTab->addTab ( ( QWidget *)pAdjust, MonitorName ) ; + pAdjust = new AdjustPage ( reinterpret_cast(pTab), Cnt ) ; + pTab->addTab ( reinterpret_cast(pAdjust), MonitorName ) ; connect ( parent, SIGNAL( Activate ( int ) ), pAdjust, SLOT(OnActivate( int ) ) ); connect( parent, SIGNAL( Apply( int * ) ), pAdjust, SLOT( OnApply( int * ) ) ); connect( parent, SIGNAL( Cancel( ) ), pAdjust, SLOT( OnCancel( ) ) ); @@ -98,7 +98,7 @@ connect( parent, SIGNAL( Apply( int * ) ), pAdjust, SLOT( OnApply( int * ) ) ); connect( parent, SIGNAL( Cancel( ) ), pAdjust, SLOT( OnCancel( ) ) ); #endif // alternate path - ((Sheet *)parent)->addTab ( (QWidget *)this, tr("Adjustment") ) ; + ((Sheet *)parent)->addTab ( reinterpret_cast(this), tr("Adjustment") ) ; break ; } @@ -112,13 +112,13 @@ pFrame1->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 6, PANEL_HEIGHT - 94 - 6 ) ; pFrame1->setFrameStyle ( QFrame::Panel | QFrame::Raised ) ; - pTVout = new TVoutAdjustPage ( (QWidget *)pFrame1 ) ; + pTVout = new TVoutAdjustPage ( reinterpret_cast(pFrame1) ) ; pTVout->setGeometry ( 3, 3, PANEL_WIDTH - 24 - 12, PANEL_HEIGHT - 94 - 12 ) ; connect( parent, SIGNAL( Activate ( int ) ), pTVout, SLOT(OnActivate( int ) ) ); connect( parent, SIGNAL( Apply( int * ) ), pTVout, SLOT( OnApply( int * ) ) ); connect( parent, SIGNAL( Cancel( ) ), pTVout, SLOT( OnCancel( ) ) ); - ((Sheet *)parent)->addTab ( (QWidget *)this, tr("TV Out") ) ; + ((Sheet *)parent)->addTab ( reinterpret_cast(this), tr("TV Out") ) ; break ; } #endif // FGL_TVOUT diff -rNu fglrx_panel_sources.orig/TVoutAdjustPage.cpp fglrx_panel_sources/TVoutAdjustPage.cpp --- fglrx_panel_sources.orig/TVoutAdjustPage.cpp 2004-08-20 22:30:05.000000000 +0200 +++ fglrx_panel_sources/TVoutAdjustPage.cpp 2004-10-20 16:04:00.122177920 +0200 @@ -44,7 +44,7 @@ #define BUTTON_PRESS_ADD_VALUE 2 -TVoutAdjustPage::TVoutAdjustPage ( QWidget *parent ) : QWidget ( parent, (const char *)0 ) +TVoutAdjustPage::TVoutAdjustPage ( QWidget *parent ) : QWidget ( parent, reinterpret_cast(0) ) { m_Init = FALSE ; } @@ -82,7 +82,7 @@ pTVOn->setFocusPolicy ( QWidget::StrongFocus ) ; pTVOn->setBackgroundPixmap ( pixmap ) ; pTVOn->setBackgroundOrigin ( QWidget::ParentOrigin ) ; - pTVOn->setChecked((bool) m_TVConnect) ; + pTVOn->setChecked( static_cast(m_TVConnect) ) ; pTVOnBox->show ( ) ; pTVOn->show ( ) ; @@ -128,9 +128,9 @@ pTVColorBox->setBackgroundPixmap ( pixmap ) ; pTVColorBox->setBackgroundOrigin ( QWidget::ParentOrigin ) ; - pSliderTVColor = new QSlider ( (int)(0), (int)(0xFF), 30, 100, QSlider::Horizontal, this) ; + pSliderTVColor = new QSlider ( static_cast(0), static_cast(0xFF), 30, 100, QSlider::Horizontal, this) ; pSliderTVColor->setGeometry ( 175, 130, 190, 25 ) ; - pSliderTVColor->setTickmarks ( (QSlider::TickSetting)2 ) ; //Below + pSliderTVColor->setTickmarks ( static_cast(2) ) ; //Below pSliderTVColor->setFocusPolicy ( QWidget::StrongFocus ) ; pSliderTVColor->setBackgroundPixmap ( pixmap ) ; pSliderTVColor->setBackgroundOrigin ( QWidget::ParentOrigin ) ; @@ -145,7 +145,7 @@ pTVColorBox->show ( ) ; pSliderTVColor->show() ; - pSliderTVColor->setValue ( (int)(m_tvColorAdj) ) ; + pSliderTVColor->setValue ( static_cast(m_tvColorAdj) ) ; Str.sprintf ( "%3d", m_tvColorAdj ) ; pTextSliderTVColor->setText ( Str ) ; pTextSliderTVColor->show ( ) ; @@ -370,7 +370,7 @@ void TVoutAdjustPage::OnTVOn ( bool on ) { m_TVOOnOffChanged = TRUE ; - m_TVConnect = (int)on ; + m_TVConnect = static_cast(on); DEB(printf("[OnTVOn] m_TVConnect %d\n",m_TVConnect)); ExtATITVOEnableDisable(m_TVConnect); }