[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdevelop/3.4 [POSSIBLY UNSAFE]
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2007-01-06 4:33:05
Message-ID: 1168057985.436159.24095.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 620454 by apaku:
Allow to set simple environment settings for external designer so we can use KDE4 \
widgets in it.
M +6 -0 languages/cpp/ccconfigwidget.cpp
M +40 -2 languages/cpp/ccconfigwidgetbase.ui
M +8 -0 languages/cpp/qtbuildconfig.cpp
M +3 -0 languages/cpp/qtbuildconfig.h
M +3 -1 src/partcontroller.cpp [POSSIBLY UNSAFE: KRun::runCommand]
--- branches/kdevelop/3.4/languages/cpp/ccconfigwidget.cpp #620453:620454
@@ -408,6 +408,7 @@
m_kdevexternal->setEnabled( false );
m_qtStyleVersion4->setEnabled( true );
m_designerPath->setEnabled( true );
+ m_designerPrefix->setEnabled( true );
m_qmakePath->setEnabled( true );
m_qtDir->setEnabled( false );
m_txtQtDir->setEnabled( false );
@@ -420,6 +421,7 @@
m_kdevexternal->setEnabled( true );
m_qtStyleVersion4->setEnabled( false );
m_designerPath->setEnabled( true );
+ m_designerPrefix->setEnabled( false );
m_qmakePath->setEnabled( true );
m_qtDir->setEnabled( true );
m_txtQtDir->setEnabled( true );
@@ -448,6 +450,7 @@
}else
{
m_qtdesigner->setChecked( true );
+ m_designerPrefix->setText( c->designerPrefix() );
}
}
@@ -503,6 +506,7 @@
c->setRoot( m_qtDir->url() );
c->setQMakePath( m_qmakePath->url() );
c->setDesignerPath( m_designerPath->url() );
+ c->setDesignerPrefix( m_designerPrefix->text() );
if( m_kdevembedded->isChecked() )
{
c->setDesignerIntegration( "EmbeddedKDevDesigner" );
@@ -539,6 +543,7 @@
m_qtStyleVersion3->setChecked( true );
m_kdevembedded->setEnabled( true );
m_kdevexternal->setEnabled( true );
+ m_designerPrefix->setEnabled( false );
}
if ( m_versionQt4->isChecked() )
{
@@ -546,6 +551,7 @@
m_qtdesigner->setChecked( true );
m_kdevembedded->setEnabled( false );
m_kdevexternal->setEnabled( false );
+ m_designerPrefix->setEnabled( true );
}
isValidQtDir( m_qtDir->url() );
isQMakeExecutable( m_qmakePath->url() );
--- branches/kdevelop/3.4/languages/cpp/ccconfigwidgetbase.ui #620453:620454
@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>519</width>
- <height>640</height>
+ <width>544</width>
+ <height>659</height>
</rect>
</property>
<property name="caption">
@@ -1451,6 +1451,9 @@
<property name="text">
<string>Designer Binary:</string>
</property>
+ <property name="buddy" stdset="0">
+ <cstring>m_designerPath</cstring>
+ </property>
</widget>
<widget class="KURLRequester">
<property name="name">
@@ -1462,6 +1465,38 @@
</widget>
</hbox>
</widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4</cstring>
+ </property>
+ <property name="text">
+ <string>Prefix to Designer</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>m_designerPrefix</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>m_designerPrefix</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Prefix the call for external \
designer with this</string> + </property>
+ <property name="whatsThis" stdset="0">
+ <string>Anything written here will be \
put in front of the designer executable when running the external Qt designer. This \
can be useful to set Environment variables for running the Qt4 designer so it picks \
up KDE4 widgets</string> + </property>
+ </widget>
+ </hbox>
+ </widget>
</vbox>
</widget>
<spacer>
@@ -1486,6 +1521,8 @@
</widget>
</grid>
</widget>
+<customwidgets>
+</customwidgets>
<connections>
<connection>
<sender>newPCSButton</sender>
@@ -1747,5 +1784,6 @@
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
+ <includehint>klineedit.h</includehint>
</includehints>
</UI>
--- branches/kdevelop/3.4/languages/cpp/qtbuildconfig.cpp #620453:620454
@@ -53,6 +53,7 @@
m_root = DomUtil::readEntry( *m_dom, m_configRoot + "/root", "" );
m_qmakePath = DomUtil::readEntry(*m_dom, m_configRoot + "/qmake", "");
m_designerPath = DomUtil::readEntry(*m_dom, m_configRoot + "/designer", "");
+ m_designerPrefix = DomUtil::readEntry(*m_dom, m_configRoot + "/designerprefix", \
"");
if( m_root.isEmpty() || !isValidQtDir( m_root ) )
{
@@ -71,6 +72,7 @@
m_designerPath = findExecutable( "designer" );
}
+
m_designerIntegration = DomUtil::readEntry( *m_dom, m_configRoot + \
"/designerintegration" ); if( m_designerIntegration.isEmpty() )
{
@@ -165,6 +167,7 @@
DomUtil::writeEntry( *m_dom, m_configRoot + "/designerintegration", \
m_designerIntegration ); DomUtil::writeEntry(*m_dom, m_configRoot + "/qmake", \
m_qmakePath );
DomUtil::writeEntry(*m_dom, m_configRoot + "/designer", m_designerPath );
+ DomUtil::writeEntry(*m_dom, m_configRoot + "/designerprefix", m_designerPrefix \
);
emit stored();
}
@@ -194,6 +197,11 @@
m_qmakePath = path;
}
+void QtBuildConfig::setDesignerPrefix( const QString& pfx )
+{
+ m_designerPrefix = pfx;
+}
+
void QtBuildConfig::setDesignerPath( const QString& path )
{
m_designerPath = path;
--- branches/kdevelop/3.4/languages/cpp/qtbuildconfig.h #620453:620454
@@ -42,6 +42,7 @@
inline const QString& root() const { return m_root; }
inline const QString& qmakePath() const { return m_qmakePath; }
inline const QString& designerPath() const { return m_designerPath; }
+ inline const QString& designerPrefix() const { return m_designerPrefix; }
inline const QString& designerIntegration() const { return m_designerIntegration; }
void setUsed( bool used );
@@ -49,6 +50,7 @@
void setIncludeStyle( int style );
void setRoot( const QString& root );
void setDesignerPath( const QString& path );
+ void setDesignerPrefix( const QString& pfx );
void setQMakePath( const QString& path );
void setDesignerIntegration( const QString& designerIntegration );
void init();
@@ -76,6 +78,7 @@
QString m_root; ///< The root directory of the used qt installation for Qt3
QString m_designerPath; ///< The path including the binary name of Qt Designer
QString m_qmakePath; ///< The path including the binary name of QMake
+ QString m_designerPrefix; ///< The Prefix for Designer
QString m_designerIntegration; ///< The type of designer used, kdevdesigner or qt \
designer
static const QString m_configRoot; ///< The root path of the configuration
--- branches/kdevelop/3.4/src/partcontroller.cpp #620453:620454
@@ -387,6 +387,7 @@
{
QString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" \
); QString designerExec = "designer";
+ QString designerPrefix = "";
QDomDocument* dom = API::getInstance()->projectDom();
if ( dom != 0 )
{
@@ -398,6 +399,7 @@
DesignerSetting = DomUtil::readEntry(*dom, \
"/kdevcppsupport/qt/designerintegration", DesignerSetting ); designerExec = \
DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designer", designerExec ); \
+ designerPrefix = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designerprefix", \
designerPrefix ); }
if ( DesignerSetting == "ExternalKDevDesigner" )
{
@@ -423,7 +425,7 @@
return;
}
}
- KRun::run( designerExec, url );
+ KRun::runCommand( designerPrefix+" "+designerExec+" "+url.pathOrURL() );
return;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic