[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kcontrol/kxkb
From: Andy Rysin <arysin () yahoo ! com>
Date: 2006-07-06 2:46:51
Message-ID: 1152154011.320828.6175.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 558808 by rysin:
more port to qt4/kde4
M +5 -2 kxkb.cpp
M +4 -4 kxkbconfig.cpp
M +2 -2 pixmap.cpp
M +1 -1 x11helper.cpp
--- trunk/KDE/kdebase/workspace/kcontrol/kxkb/kxkb.cpp #558807:558808
@@ -48,6 +48,7 @@
#include <kdebug.h>
#include <kconfig.h>
#include <ktoolinvocation.h>
+#include <kactioncollection.h>
#include "kxkb_adaptor.h"
@@ -76,10 +77,11 @@
}
// keep in sync with kcmlayout.cpp
- keys = KGlobalAccel::self();
+// keys = new KActionCollection(this);
//TODO:
//#include "kxkbbindings.cpp"
//keys->updateConnections();
+
m_layoutOwnerMap = new LayoutMap(kxkbConfig);
@@ -226,7 +228,8 @@
{
const LayoutUnit layoutUnitKey(layoutPair);
if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) {
- return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) );
+ int ind = kxkbConfig.m_layouts.indexOf(layoutUnitKey);
+ return setLayout( kxkbConfig.m_layouts[ind] );
}
return false;
}
--- trunk/KDE/kdebase/workspace/kcontrol/kxkb/kxkbconfig.cpp #558807:558808
@@ -90,7 +90,7 @@
if( displayNamePair.count() == 2 ) {
LayoutUnit layoutUnit( displayNamePair[0] );
if( m_layouts.contains( layoutUnit ) ) {
- m_layouts[m_layouts.findIndex(layoutUnit)].displayName = \
displayNamePair[1].left(3); + m_layouts[m_layouts.indexOf(layoutUnit)].displayName \
= displayNamePair[1].left(3); }
}
}
@@ -105,7 +105,7 @@
if( includePair.count() == 2 ) {
LayoutUnit layoutUnit( includePair[0] );
if( m_layouts.contains( layoutUnit ) ) {
- m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1];
+ m_layouts[m_layouts.indexOf(layoutUnit)].includeGroup = includePair[1];
kDebug() << "Got inc group: " << includePair[0] << ": " << includePair[1] << \
endl; }
}
@@ -121,7 +121,7 @@
kDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << \
m_layouts.contains( layoutUnit ) << endl; if( m_layouts.contains( layoutUnit ) ) {
QString variantName = LayoutUnit::parseVariant(*it);
- m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName;
+ m_layouts[m_layouts.indexOf(layoutUnit)].includeGroup = variantName;
kDebug() << "Got inc group: " << layoutUnit.toPair() << ": " << variantName << \
endl; }
}
@@ -296,7 +296,7 @@
QString KxkbConfig::getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single)
{
- if( layoutUnit.variant == "" )
+ if( layoutUnit.variant.isEmpty() )
return getDefaultDisplayName( layoutUnit.layout );
QString displayName = layoutUnit.layout.left(2);
--- trunk/KDE/kdebase/workspace/kcontrol/kxkb/pixmap.cpp #558807:558808
@@ -205,7 +205,7 @@
void LayoutIcon::dimPixmap(QPixmap& pm)
{
- QImage image = pm.convertToImage();
+ QImage image = pm.toImage();
for (int y=0; y<image.height(); y++)
for(int x=0; x<image.width(); x++)
{
@@ -213,7 +213,7 @@
QRgb dimRgb(qRgb(qRed(rgb)*3/4, qGreen(rgb)*3/4, qBlue(rgb)*3/4));
image.setPixel(x, y, dimRgb);
}
- pm.convertFromImage(image);
+ pm = QPixmap::fromImage(image);
}
static const char* ERROR_LABEL = "err";
--- trunk/KDE/kdebase/workspace/kcontrol/kxkb/x11helper.cpp #558807:558808
@@ -108,7 +108,7 @@
RulesInfo*
X11Helper::loadRules(const QString& file, bool layoutsOnly)
{
- XkbRF_RulesPtr xkbRules = XkbRF_Load(QFile::encodeName(file).data(), "", true, \
true); + XkbRF_RulesPtr xkbRules = XkbRF_Load(QFile::encodeName(file).data(), \
(char*)"", true, true);
if (xkbRules == NULL) {
// throw Exception
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic