From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krandr/ktimerdialog.cpp | 2 +- krandr/ktimerdialog.h | 2 +- krandr/libkrandr.cc | 18 +++++++++--------- krandr/libkrandr.h | 18 +++++++++--------- krandr/lowlevel_randr.c | 36 ++++++++++++++++++------------------ krandr/lowlevel_randr.h | 8 ++++---- krandr/randr.cpp | 4 ++-- krandr/randr.h | 2 +- 8 files changed, 45 insertions(+), 45 deletions(-) (limited to 'krandr') diff --git a/krandr/ktimerdialog.cpp b/krandr/ktimerdialog.cpp index 55302b407..3885ca438 100644 --- a/krandr/ktimerdialog.cpp +++ b/krandr/ktimerdialog.cpp @@ -95,7 +95,7 @@ void KTimerDialog::setMainWidget( TQWidget *widget ) // yuck, here goes. TQVBox *newWidget = new TQVBox( this ); - if ( widget->parentWidget() != mainWidget ) { + if ( widget->tqparentWidget() != mainWidget ) { widget->reparent( newWidget, 0, TQPoint(0,0) ); } else { newWidget->insertChild( widget ); diff --git a/krandr/ktimerdialog.h b/krandr/ktimerdialog.h index 965a72393..71748c546 100644 --- a/krandr/ktimerdialog.h +++ b/krandr/ktimerdialog.h @@ -144,7 +144,7 @@ class KTimerDialog : public KDialogBase private: /** - * Prepares the layout that manages the widgets of the dialog + * Prepares the tqlayout that manages the widgets of the dialog */ void setupLayout(); diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc index cbb023e4f..e3e245b2e 100644 --- a/krandr/libkrandr.cc +++ b/krandr/libkrandr.cc @@ -32,7 +32,7 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa TQString retval; if (profileName != NULL) { - t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); } else { t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") ); @@ -216,7 +216,7 @@ TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString k int screenNumber = 0; TQString errorstr = ""; - t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); // Find all screens if (isValid() == true) { @@ -248,7 +248,7 @@ TQString KRandrSimpleAPI::getCurrentProfile () { TQString profileName; KSimpleConfig *t_config; - t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); profileName = t_config->readEntry("CurrentProfile"); delete t_config; return profileName; @@ -332,14 +332,14 @@ void KRandrSimpleAPI::output_off(ScreenInfo *screen_info, OutputInfo *output) internal_output_off(screen_info, output); } -CrtcInfo* KRandrSimpleAPI::auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info) +CrtcInfo* KRandrSimpleAPI::auto_tqfind_crtc (ScreenInfo *screen_info, OutputInfo *output_info) { - return internal_auto_find_crtc (screen_info, output_info); + return internal_auto_tqfind_crtc (screen_info, output_info); } -XRRModeInfo *KRandrSimpleAPI::find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id) +XRRModeInfo *KRandrSimpleAPI::tqfind_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id) { - return internal_find_mode_by_xid (screen_info, mode_id); + return internal_tqfind_mode_by_xid (screen_info, mode_id); } int KRandrSimpleAPI::mode_height (XRRModeInfo *mode_info, Rotation rotation) @@ -367,12 +367,12 @@ char *KRandrSimpleAPI::get_output_name (ScreenInfo *screen_info, RROutput id) return internal_get_output_name (screen_info, id); } -Status KRandrSimpleAPI::crtc_apply (CrtcInfo *crtc_info) +tqStatus KRandrSimpleAPI::crtc_apply (CrtcInfo *crtc_info) { return internal_crtc_apply (crtc_info); } -Status KRandrSimpleAPI::crtc_disable (CrtcInfo *crtc) +tqStatus KRandrSimpleAPI::crtc_disable (CrtcInfo *crtc) { return internal_crtc_disable (crtc); } diff --git a/krandr/libkrandr.h b/krandr/libkrandr.h index ced69a68d..4fab82e3d 100644 --- a/krandr/libkrandr.h +++ b/krandr/libkrandr.h @@ -101,14 +101,14 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay void output_off(ScreenInfo *screen_info, OutputInfo *output); /** - * Automatically finds the CRTC structure. + * Automatically tqfinds the CRTC structure. */ - CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info); + CrtcInfo* auto_tqfind_crtc (ScreenInfo *screen_info, OutputInfo *output_info); /** * Finds a mode by XID. */ - XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id); + XRRModeInfo *tqfind_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id); /** * Returns specified mode height in pixels. @@ -138,12 +138,12 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay /** * Applies specified CRTC. */ - Status crtc_apply (CrtcInfo *crtc_info); + tqStatus crtc_apply (CrtcInfo *crtc_info); /** * Disables specificed CRTC */ - Status crtc_disable (CrtcInfo *crtc); + tqStatus crtc_disable (CrtcInfo *crtc); /** * Applies all previously configured settings to the specified screen. @@ -183,15 +183,15 @@ extern "C" { // KRANDR_EXPORT int set_screen_size (ScreenInfo *screen_info); // KRANDR_EXPORT void output_auto (ScreenInfo *screen_info, OutputInfo *output_info); // KRANDR_EXPORT void output_off(ScreenInfo *screen_info, OutputInfo *output); -// KRANDR_EXPORT CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info); -// KRANDR_EXPORT XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id); +// KRANDR_EXPORT CrtcInfo* auto_tqfind_crtc (ScreenInfo *screen_info, OutputInfo *output_info); +// KRANDR_EXPORT XRRModeInfo *tqfind_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id); // KRANDR_EXPORT int mode_height (XRRModeInfo *mode_info, Rotation rotation); // KRANDR_EXPORT int mode_width (XRRModeInfo *mode_info, Rotation rotation); // KRANDR_EXPORT int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id); // KRANDR_EXPORT int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id); // KRANDR_EXPORT char *get_output_name (ScreenInfo *screen_info, RROutput id); -// KRANDR_EXPORT Status crtc_apply (CrtcInfo *crtc_info); -// KRANDR_EXPORT Status crtc_disable (CrtcInfo *crtc); +// KRANDR_EXPORT tqStatus crtc_apply (CrtcInfo *crtc_info); +// KRANDR_EXPORT tqStatus crtc_disable (CrtcInfo *crtc); // KRANDR_EXPORT int main_low_apply (ScreenInfo *screen_info); // KRANDR_EXPORT bool kRandrHasRandr(); diff --git a/krandr/lowlevel_randr.c b/krandr/lowlevel_randr.c index 251d3bef5..2d2856f06 100644 --- a/krandr/lowlevel_randr.c +++ b/krandr/lowlevel_randr.c @@ -25,7 +25,7 @@ #include #include -Status internal_crtc_disable (struct CrtcInfo *crtc); +tqStatus internal_crtc_disable (struct CrtcInfo *crtc); char * internal_get_output_name (struct ScreenInfo *screen_info, RROutput id) { @@ -45,7 +45,7 @@ char * internal_get_output_name (struct ScreenInfo *screen_info, RROutput id) return output_name; } -XRRModeInfo * internal_find_mode_by_xid (struct ScreenInfo *screen_info, RRMode mode_id) +XRRModeInfo * internal_tqfind_mode_by_xid (struct ScreenInfo *screen_info, RRMode mode_id) { XRRModeInfo *mode_info = NULL; XRRScreenResources *res; @@ -62,7 +62,7 @@ XRRModeInfo * internal_find_mode_by_xid (struct ScreenInfo *screen_info, RRMode return mode_info; } -static XRRCrtcInfo * internal_find_crtc_by_xid (struct ScreenInfo *screen_info, RRCrtc crtc_id) +static XRRCrtcInfo * internal_tqfind_crtc_by_xid (struct ScreenInfo *screen_info, RRCrtc crtc_id) { XRRCrtcInfo *crtc_info; Display *dpy; @@ -93,7 +93,7 @@ int internal_get_width_by_output_id (struct ScreenInfo *screen_info, RROutput ou break; } mode_id = crtc_info->cur_mode_id; - mode_info = internal_find_mode_by_xid (screen_info, mode_id); + mode_info = internal_tqfind_mode_by_xid (screen_info, mode_id); width = internal_mode_width (mode_info, crtc_info->cur_rotation); @@ -121,7 +121,7 @@ int internal_get_height_by_output_id (struct ScreenInfo *screen_info, RROutput o break; } mode_id = crtc_info->cur_mode_id; - mode_info = internal_find_mode_by_xid (screen_info, mode_id); + mode_info = internal_tqfind_mode_by_xid (screen_info, mode_id); height = internal_mode_height (mode_info, crtc_info->cur_rotation); @@ -161,7 +161,7 @@ int internal_mode_width (XRRModeInfo *mode_info, Rotation rotation) } -static struct CrtcInfo * internal_find_crtc (struct ScreenInfo *screen_info, XRROutputInfo *output) +static struct CrtcInfo * internal_tqfind_crtc (struct ScreenInfo *screen_info, XRROutputInfo *output) { struct CrtcInfo *crtc_info = NULL; int i; @@ -176,7 +176,7 @@ static struct CrtcInfo * internal_find_crtc (struct ScreenInfo *screen_info, XRR return crtc_info; } -struct CrtcInfo * internal_auto_find_crtc (struct ScreenInfo *screen_info, struct OutputInfo *output_info) +struct CrtcInfo * internal_auto_tqfind_crtc (struct ScreenInfo *screen_info, struct OutputInfo *output_info) { struct CrtcInfo *crtc_info = NULL; int i; @@ -215,7 +215,7 @@ int internal_set_screen_size (struct ScreenInfo *screen_info) if (!crtc->cur_mode_id) { continue; } - mode_info = internal_find_mode_by_xid (screen_info, crtc->cur_mode_id); + mode_info = internal_tqfind_mode_by_xid (screen_info, crtc->cur_mode_id); cur_x = crtc->cur_x; cur_y = crtc->cur_y; @@ -302,7 +302,7 @@ void internal_screen_apply (struct ScreenInfo *screen_info) } } -Status internal_crtc_apply (struct CrtcInfo *crtc_info) +tqStatus internal_crtc_apply (struct CrtcInfo *crtc_info) { struct ScreenInfo *screen_info; XRRCrtcInfo *rr_crtc_info; @@ -314,7 +314,7 @@ Status internal_crtc_apply (struct CrtcInfo *crtc_info) Rotation rotation; RROutput *outputs; int noutput; - Status s; + tqStatus s; int i; /*if (!crtc_info->changed) { @@ -361,7 +361,7 @@ Status internal_crtc_apply (struct CrtcInfo *crtc_info) return s; } -Status internal_crtc_disable (struct CrtcInfo *crtc) +tqStatus internal_crtc_disable (struct CrtcInfo *crtc) { struct ScreenInfo *screen_info; @@ -433,7 +433,7 @@ struct ScreenInfo* internal_read_screen_info (Display *display) output->id = sr->outputs[i]; output->info = XRRGetOutputInfo (display, sr, sr->outputs[i]); - output->cur_crtc = internal_find_crtc (screen_info, output->info); + output->cur_crtc = internal_tqfind_crtc (screen_info, output->info); output->auto_set = 0; if (output->cur_crtc) { output->off_set = 0; @@ -548,7 +548,7 @@ internal_preferred_mode (struct ScreenInfo *screen_info, struct OutputInfo *outp best = NULL; bestDist = 0; for (m = 0; m < output_info->nmode; m++) { - XRRModeInfo *mode_info = internal_find_mode_by_xid (screen_info, output_info->modes[m]); + XRRModeInfo *mode_info = internal_tqfind_mode_by_xid (screen_info, output_info->modes[m]); int dist; if (m < output_info->npreferred) @@ -584,7 +584,7 @@ int internal_main_low_apply (struct ScreenInfo *screen_info) int old_x, old_y, old_w, old_h; XRRCrtcInfo *crtc_info = XRRGetCrtcInfo (screen_info->dpy, screen_info->res, screen_info->crtcs[i]->id); - XRRModeInfo *old_mode = internal_find_mode_by_xid (screen_info, crtc_info->mode); + XRRModeInfo *old_mode = internal_tqfind_mode_by_xid (screen_info, crtc_info->mode); if (crtc_info->mode == None) { continue; @@ -606,7 +606,7 @@ int internal_main_low_apply (struct ScreenInfo *screen_info) internal_screen_apply (screen_info); for (i = 0; i < screen_info->n_crtc; i++) { - Status s; + tqStatus s; crtc_info = screen_info->crtcs[i]; s = internal_crtc_apply (crtc_info); @@ -632,7 +632,7 @@ void internal_output_auto (struct ScreenInfo *screen_info, struct OutputInfo *ou probe_output_info = XRRGetOutputInfo (screen_info->dpy, cur_res, output_info->id); if (RR_Disconnected != probe_output_info->connection) { output_info->info = probe_output_info; - output_info->cur_crtc = internal_auto_find_crtc (screen_info, output_info); + output_info->cur_crtc = internal_auto_tqfind_crtc (screen_info, output_info); } } @@ -646,10 +646,10 @@ void internal_output_auto (struct ScreenInfo *screen_info, struct OutputInfo *ou if (crtc_info) { crtc_info->cur_mode_id = mode_id; } else { - crtc_info = internal_auto_find_crtc (screen_info, output_info); + crtc_info = internal_auto_tqfind_crtc (screen_info, output_info); if (!crtc_info) { #if RANDR_GUI_DEBUG - fprintf (stderr, "Can not find usable CRTC\n"); + fprintf (stderr, "Can not tqfind usable CRTC\n"); #endif return; } else { diff --git a/krandr/lowlevel_randr.h b/krandr/lowlevel_randr.h index 54538aa44..e01c41acf 100644 --- a/krandr/lowlevel_randr.h +++ b/krandr/lowlevel_randr.h @@ -85,16 +85,16 @@ struct ScreenInfo* internal_read_screen_info (Display *); int internal_set_screen_size (struct ScreenInfo *screen_info); void internal_output_auto (struct ScreenInfo *screen_info, struct OutputInfo *output_info); void internal_output_off (struct ScreenInfo *screen_info, struct OutputInfo *output); -struct CrtcInfo* internal_auto_find_crtc (struct ScreenInfo *screen_info, struct OutputInfo *output_info); +struct CrtcInfo* internal_auto_tqfind_crtc (struct ScreenInfo *screen_info, struct OutputInfo *output_info); -XRRModeInfo *internal_find_mode_by_xid (struct ScreenInfo *screen_info, RRMode mode_id); +XRRModeInfo *internal_tqfind_mode_by_xid (struct ScreenInfo *screen_info, RRMode mode_id); int internal_mode_height (XRRModeInfo *mode_info, Rotation rotation); int internal_mode_width (XRRModeInfo *mode_info, Rotation rotation); int internal_get_width_by_output_id (struct ScreenInfo *screen_info, RROutput output_id); int internal_get_height_by_output_id (struct ScreenInfo *screen_info, RROutput output_id); char *internal_get_output_name (struct ScreenInfo *screen_info, RROutput id); -Status internal_crtc_apply (struct CrtcInfo *crtc_info); -Status internal_crtc_disable (struct CrtcInfo *crtc); +tqStatus internal_crtc_apply (struct CrtcInfo *crtc_info); +tqStatus internal_crtc_disable (struct CrtcInfo *crtc); int internal_main_low_apply (struct ScreenInfo *screen_info); #ifdef __cplusplus diff --git a/krandr/randr.cpp b/krandr/randr.cpp index e891c8a2d..94ce5801e 100644 --- a/krandr/randr.cpp +++ b/krandr/randr.cpp @@ -103,7 +103,7 @@ bool RandRScreen::applyProposed() { //kdDebug() << k_funcinfo << " size " << (SizeID)proposedSize() << ", rotation " << proposedRotation() << ", refresh " << refreshRateIndexToHz(proposedSize(), proposedRefreshRate()) << endl; - Status status; + tqStatus status; if (proposedRefreshRate() < 0) status = XRRSetScreenConfig(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), CurrentTime); @@ -555,7 +555,7 @@ RandRDisplay::RandRDisplay() : m_valid(true) { // Check extension - Status s = XRRQueryExtension(qt_xdisplay(), &m_eventBase, &m_errorBase); + tqStatus s = XRRQueryExtension(qt_xdisplay(), &m_eventBase, &m_errorBase); if (!s) { m_errorCode = TQString("%1, base %1").arg(s).arg(m_errorBase); m_valid = false; diff --git a/krandr/randr.h b/krandr/randr.h index 355f3d866..54d9d2f44 100644 --- a/krandr/randr.h +++ b/krandr/randr.h @@ -29,7 +29,7 @@ class KTimerDialog; class RandRScreenPrivate; -class RandRScreen : public QObject +class RandRScreen : public TQObject { Q_OBJECT -- cgit v1.2.1