diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-23 17:13:36 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-23 17:13:36 -0500 |
commit | d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5 (patch) | |
tree | baeeba639393f46abab749f4700a250091c3cc16 /tqtinterface/qt4/tools | |
parent | d7be1694839bacae31e500ea9e36b3c13257ce28 (diff) | |
download | experimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.tar.gz experimental-d3f7a9d6f1b8f6e24fb49aaa8caeaa7623ae48b5.zip |
Apply all Qt3.3.8d patches
NOTE: This will *likely* break compilation of TQt4
Please wait a few days for fixes to be committed as needed!
Diffstat (limited to 'tqtinterface/qt4/tools')
-rw-r--r-- | tqtinterface/qt4/tools/designer/tools/createcw/createcw.pro | 3 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/designer/uic/form.cpp | 11 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/makeqpf/main.cpp | 6 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qtconfig/mainwindow.cpp | 70 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qtconfig/mainwindow.h | 1 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui | 21 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qvfb/pda.skin | 2 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qvfb/qvfb.cpp | 2 | ||||
-rw-r--r-- | tqtinterface/qt4/tools/qvfb/qvfbview.cpp | 2 |
9 files changed, 99 insertions, 19 deletions
diff --git a/tqtinterface/qt4/tools/designer/tools/createcw/createcw.pro b/tqtinterface/qt4/tools/designer/tools/createcw/createcw.pro index 521f9c7..415c0be 100644 --- a/tqtinterface/qt4/tools/designer/tools/createcw/createcw.pro +++ b/tqtinterface/qt4/tools/designer/tools/createcw/createcw.pro @@ -3,3 +3,6 @@ CONFIG += qt warn_on release HEADERS = SOURCES = main.cpp TARGET = createcw + +target.path = $$bins.path +INSTALLS += target diff --git a/tqtinterface/qt4/tools/designer/uic/form.cpp b/tqtinterface/qt4/tools/designer/uic/form.cpp index 5fbbf14..11a0a69 100644 --- a/tqtinterface/qt4/tools/designer/uic/form.cpp +++ b/tqtinterface/qt4/tools/designer/uic/form.cpp @@ -734,16 +734,7 @@ void Uic::createFormImpl( const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - } else if ( n.tagName() == "includehints" ) { - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "includehint" ) { - TQString file = n2.firstChild().toText().data(); - localIncludes += file; - } - n2 = n2.nextSibling().toElement(); - } - } + } } // additional includes (local or global) and forward declaractions diff --git a/tqtinterface/qt4/tools/makeqpf/main.cpp b/tqtinterface/qt4/tools/makeqpf/main.cpp index 00e6cb0..3425549 100644 --- a/tqtinterface/qt4/tools/makeqpf/main.cpp +++ b/tqtinterface/qt4/tools/makeqpf/main.cpp @@ -47,7 +47,7 @@ #include <tqmemorymanager_qws.h> #endif -#include <stdlib.h> +#include <cstdlib> class FontViewItem : public TQListViewItem { @@ -137,8 +137,6 @@ public: } }; -extern TQString qws_topdir(); - class MakeTQPF : public TQMainWindow { TQ_OBJECT @@ -152,7 +150,7 @@ public: view->addColumn("Weight"); view->addColumn("Style"); setCentralWidget(view); - TQString fontdir = qws_topdir() + "/lib/fonts"; + TQString fontdir = TQString(getenv("TQTDIR")) + "/lib/fonts"; readFontDir(fontdir); connect(view,TQT_SIGNAL(selectionChanged(TQListViewItem*)), diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp b/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp index 754f139..7aaf211 100644 --- a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp +++ b/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp @@ -40,6 +40,7 @@ #include <tqapplication.h> #include <tqcombobox.h> #include <tqstylefactory.h> +#include <tqinputcontextfactory.h> #include <tqobjectlist.h> #include <tqfontdatabase.h> #include <tqlineedit.h> @@ -374,13 +375,73 @@ MainWindow::MainWindow() rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", FALSE ) ); -#ifdef TQ_WS_X11 +#if defined(TQ_WS_X11) inputStyle->setCurrentText( settings.readEntry( "/qt/XIMInputStyle", trUtf8( "On The Spot" ) ) ); #else inputStyle->hide(); inputStyleLabel->hide(); #endif +#if defined(TQ_WS_X11) && !defined(TQT_NO_IM_EXTENSIONS) + /* + This code makes it possible to set up default input method. + + The list of identifier names of input method which can be used + is acquired using TQInputContextFactory::keys(). And it is + translated to display name and set to inputMethodCombo which + displays the list of input method. + */ + inputMethodIdentifiers = TQInputContextFactory::keys(); + TQStringList imDispNames; + { + // input method switcher should named with "imsw-" prefix to + // prevent to be listed in ordinary input method list. + TQStringList::Iterator imIt = inputMethodIdentifiers.begin(); + while (imIt != inputMethodIdentifiers.end()) { + if ((*imIt).tqfind("imsw-") == 0) + imIt = inputMethodIdentifiers.remove(imIt); + else + imIt++; + } + // we should not sort the list + //inputMethodIdentifiers.sort(); + for (imIt = inputMethodIdentifiers.begin(); + imIt != inputMethodIdentifiers.end(); + imIt++) { + TQString dispName = TQInputContextFactory::displayName(*imIt); + if (dispName.isNull() || dispName.isEmpty()) + dispName = *imIt; + imDispNames << dispName; + } + } + //inputMethodCombo->insertStringList(inputMethodIdentifiers); + inputMethodCombo->insertStringList(imDispNames); + + /* + input method set up as a default in the past is chosen. + If nothing is set up, default input method in the platform is chosen. + */ + // default input method is XIM in X11. + TQString currentIM = settings.readEntry("/qt/DefaultInputMethod", "xim"); + { + int index = inputMethodIdentifiers.findIndex(currentIM); + // set up Selected input method. + if (0 <= index && index < inputMethodIdentifiers.count()) { + inputMethodCombo->setCurrentItem(index); + } else { + // Give up. this part is executed when specified IM is not + // installed. + TQString dispName = tr("Unknown Input Method") + " (" + currentIM + ")"; + inputMethodCombo->insertItem(dispName); + inputMethodCombo->setCurrentItem(inputMethodCombo->count() - 1); + inputMethodIdentifiers << currentIM; + } + } +#else + inputMethodCombo->hide(); + inputMethodLabel->hide(); +#endif + fontembeddingcheckbox->setChecked( settings.readBoolEntry("/qt/embedFonts", TRUE) ); fontpaths = settings.readListEntry("/qt/fontPath", ':'); fontpathlistbox->insertStringList(fontpaths); @@ -457,6 +518,13 @@ void MainWindow::fileSave() else if ( style == trUtf8( "Root" ) ) str = "Root"; settings.writeEntry( "/qt/XIMInputStyle", inputStyle->currentText() ); + +#if !defined(TQT_NO_IM_EXTENSIONS) + TQString imSwitcher = settings.readEntry("/qt/DefaultInputMethodSwitcher", "imsw-multi"); + settings.writeEntry("/qt/DefaultInputMethodSwitcher", imSwitcher); + int imIndex = inputMethodCombo->currentItem(); + settings.writeEntry("/qt/DefaultInputMethod", inputMethodIdentifiers[imIndex]); +#endif #endif TQStringList effects; diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindow.h b/tqtinterface/qt4/tools/qtconfig/mainwindow.h index 6f22c06..66acb8c 100644 --- a/tqtinterface/qt4/tools/qtconfig/mainwindow.h +++ b/tqtinterface/qt4/tools/qtconfig/mainwindow.h @@ -97,6 +97,7 @@ private: TQPalette editPalette, previewPalette; TQStyle *previewstyle; TQStringList fontpaths; + TQStringList inputMethodIdentifiers; bool modified; }; diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui b/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui index fb56464..fc770b0 100644 --- a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui +++ b/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui @@ -1029,6 +1029,19 @@ <number>0</number> </property> </widget> + <widget class=TQLABEL_OBJECT_NAME_STRING> + <property name="name"> + <cstring>inputMethodLabel</cstring> + </property> + <property name="text"> + <string>Default Input Method:</string> + </property> + </widget> + <widget class=TQCOMBOBOX_OBJECT_NAME_STRING> + <property name="name"> + <cstring>inputMethodCombo</cstring> + </property> + </widget> <spacer> <property name="name"> <cstring>spacer5</cstring> @@ -1042,7 +1055,7 @@ <property name="tqsizeHint"> <size> <width>20</width> - <height>40</height> + <height>30</height> </size> </property> </spacer> @@ -1718,6 +1731,12 @@ <slot>somethingModified()</slot> </connection> <connection> + <sender>inputMethodCombo</sender> + <signal>activated(int)</signal> + <receiver>MainWindowBase</receiver> + <slot>somethingModified()</slot> + </connection> + <connection> <sender>gstylecombo</sender> <signal>activated(const TQString&)</signal> <receiver>MainWindowBase</receiver> diff --git a/tqtinterface/qt4/tools/qvfb/pda.skin b/tqtinterface/qt4/tools/qvfb/pda.skin index 135e6b6..bdbf197 100644 --- a/tqtinterface/qt4/tools/qvfb/pda.skin +++ b/tqtinterface/qt4/tools/qvfb/pda.skin @@ -1,4 +1,4 @@ -pda_up.png pda_down.png +/usr/share/qvfb/pda_up.png /usr/share/qvfb/pda_down.png 57 81 240 320 0.5 diff --git a/tqtinterface/qt4/tools/qvfb/qvfb.cpp b/tqtinterface/qt4/tools/qvfb/qvfb.cpp index 8fb4cb1..2c7712c 100644 --- a/tqtinterface/qt4/tools/qvfb/qvfb.cpp +++ b/tqtinterface/qt4/tools/qvfb/qvfb.cpp @@ -94,7 +94,7 @@ void TQVFb::init( int display_id, int w, int h, int d, const TQString &skin_name bool vis = isVisible(); if ( vis ) hide(); menuBar()->hide(); - Skin *skin = new Skin( this, skin_name, w, h ); + Skin *skin = new Skin( this, TQString::tqfromLatin1( "/etc/qt3/qvfb/" ) + skin_name, w, h ); view = new TQVFbView( display_id, w, h, d, skin ); skin->setView( view ); view->setMargin( 0 ); diff --git a/tqtinterface/qt4/tools/qvfb/qvfbview.cpp b/tqtinterface/qt4/tools/qvfb/qvfbview.cpp index f7d0669..bc02db7 100644 --- a/tqtinterface/qt4/tools/qvfb/qvfbview.cpp +++ b/tqtinterface/qt4/tools/qvfb/qvfbview.cpp @@ -128,7 +128,7 @@ TQVFbView::TQVFbView( int display_id, int w, int h, int d, TQWidget *tqparent, data = (unsigned char *)shmat( shmId, 0, 0 ); } - if ( (int)data == -1 ) + if ( (long)data == -1 ) qFatal( "Cannot attach to shared memory" ); hdr = (TQVFbHeader *)data; |