[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdevelop/buildtools/qmake
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2007-05-01 0:18:48
Message-ID: 1177978728.823643.10769.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 659890 by apaku:
Use a KUrlSelector for target path as well
M +9 -10 projectconfigurationdlg.cpp
M +0 -1 projectconfigurationdlg.h
M +22 -37 projectconfigurationdlgbase.ui
--- branches/KDE/3.5/kdevelop/buildtools/qmake/projectconfigurationdlg.cpp \
#659889:659890 @@ -119,6 +119,8 @@
uidir_url->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
m_CWDEdit->completionObject()->setMode(KURLCompletion::DirCompletion);
m_CWDEdit->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
+ m_targetPath->completionObject()->setMode(KURLCompletion::DirCompletion);
+ m_targetPath->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly \
); }
void ProjectConfigurationDlg::updateSubproject( QMakeScopeItem* _item )
@@ -149,12 +151,6 @@
ProjectConfigurationDlg::~ProjectConfigurationDlg()
{}
-void ProjectConfigurationDlg::browseTargetPath()
-{
- m_targetPath->setText( URLUtil::getRelativePath( \
myProjectItem->scope->projectDir(), \
KFileDialog::getExistingDirectory() ) );
- buttonApply->setEnabled( false );
-}
-
void ProjectConfigurationDlg::updateProjectConfiguration()
{
// Template
@@ -398,16 +394,19 @@
myProjectItem->scope->addToPlusOp( "CONFIG", *it );
}
+ QString targetpath = m_targetPath->url();
+ if( !QFileInfo( targetpath ).isRelative() )
+ targetpath = URLUtil::getRelativePath( myProjectItem->scope->projectDir(), \
targetpath );
if( myProjectItem->scope->scopeType() == Scope::FunctionScope || \
myProjectItem->scope->scopeType() == Scope::SimpleScope ) {
if( myProjectItem->scope->variableValues("TARGET").findIndex( \
m_targetOutputFile->text() ) == -1 )
myProjectItem->scope->setEqualOp( "TARGET", QStringList( \
m_targetOutputFile->text() ) );
- if( myProjectItem->scope->variableValues("DESTDIR").findIndex( \
m_targetPath->text() ) == -1 )
- myProjectItem->scope->setEqualOp( "DESTDIR", QStringList( \
m_targetPath->text() ) ); + if( \
myProjectItem->scope->variableValues("DESTDIR").findIndex( targetpath ) == -1 ) + \
myProjectItem->scope->setEqualOp( "DESTDIR", QStringList( targetpath ) ); }else
{
myProjectItem->scope->setEqualOp( "TARGET", QStringList( \
m_targetOutputFile->text() ) );
- myProjectItem->scope->setEqualOp( "DESTDIR", QStringList( \
m_targetPath->text() ) ); + myProjectItem->scope->setEqualOp( "DESTDIR", \
QStringList( targetpath ) ); }
myProjectItem->updateValues( "DEFINES", QStringList::split( " ", \
m_defines->text() ) ); @@ -852,7 +851,7 @@
m_InstallTargetPath->setText( myProjectItem->scope->variableValues( \
"target.path" ).front() );
m_targetOutputFile->setText( myProjectItem->scope->variableValues( "TARGET" \
).front() );
- m_targetPath->setText( myProjectItem->scope->variableValues( "DESTDIR" ).front() \
); + m_targetPath->setURL( \
myProjectItem->scope->projectDir()+"/"+myProjectItem->scope->variableValues( \
"DESTDIR" ).front() );
m_defines->setText( myProjectItem->scope->variableValues( "DEFINES" ).join( " " \
) );
m_debugFlags->setText( myProjectItem->scope->variableValues( \
"QMAKE_CXXFLAGS_DEBUG" ).join( " " ) );
--- branches/KDE/3.5/kdevelop/buildtools/qmake/projectconfigurationdlg.h \
#659889:659890 @@ -65,7 +65,6 @@
public slots:
// virtual void radioLibrarytoggled(bool);
virtual void updateProjectConfiguration();
- virtual void browseTargetPath();
virtual void buildorderMoveUpClicked();
virtual void buildorderMoveDownClicked();
--- branches/KDE/3.5/kdevelop/buildtools/qmake/projectconfigurationdlgbase.ui \
#659889:659890 @@ -206,34 +206,15 @@
<cstring>m_targetOutputFile</cstring>
</property>
</widget>
- <widget class="KLineEdit" row="0" column="1">
+ <widget class="KLineEdit" row="1" column="1">
<property name="name">
- <cstring>m_targetPath</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="1" column="1" rowspan="1" \
colspan="2">
- <property name="name">
<cstring>m_targetOutputFile</cstring>
</property>
</widget>
- <widget class="KPushButton" row="0" column="2">
+ <widget class="KURLRequester" row="0" column="1">
<property name="name">
- <cstring>Browse</cstring>
+ <cstring>m_targetPath</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&Browse...</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Browse</string>
- </property>
</widget>
</grid>
</widget>
@@ -2251,12 +2232,6 @@
<slot>activateApply(const QString&)</slot>
</connection>
<connection>
- <sender>m_targetPath</sender>
- <signal>textChanged(const QString&)</signal>
- <receiver>ProjectConfigurationDlgBase</receiver>
- <slot>activateApply(const QString&)</slot>
- </connection>
- <connection>
<sender>objdir_url</sender>
<signal>urlSelected(const QString&)</signal>
<receiver>ProjectConfigurationDlgBase</receiver>
@@ -2371,12 +2346,6 @@
<slot>apply()</slot>
</connection>
<connection>
- <sender>Browse</sender>
- <signal>clicked()</signal>
- <receiver>ProjectConfigurationDlgBase</receiver>
- <slot>browseTargetPath()</slot>
- </connection>
- <connection>
<sender>buildmovedown_button</sender>
<signal>clicked()</signal>
<receiver>ProjectConfigurationDlgBase</receiver>
@@ -2640,6 +2609,24 @@
<receiver>ProjectConfigurationDlgBase</receiver>
<slot>upCustomValueClicked()</slot>
</connection>
+ <connection>
+ <sender>m_targetPath</sender>
+ <signal>textChanged(const QString&)</signal>
+ <receiver>ProjectConfigurationDlgBase</receiver>
+ <slot>activateApply(const QString&)</slot>
+ </connection>
+ <connection>
+ <sender>m_targetPath</sender>
+ <signal>returnPressed(const QString&)</signal>
+ <receiver>ProjectConfigurationDlgBase</receiver>
+ <slot>activateApply(const QString&)</slot>
+ </connection>
+ <connection>
+ <sender>m_targetPath</sender>
+ <signal>urlSelected(const QString&)</signal>
+ <receiver>ProjectConfigurationDlgBase</receiver>
+ <slot>activateApply(const QString&)</slot>
+ </connection>
</connections>
<tabstops>
<tabstop>TabBuild</tabstop>
@@ -2647,8 +2634,6 @@
<tabstop>radioLibrary</tabstop>
<tabstop>radioSubdirs</tabstop>
<tabstop>checkOrdered</tabstop>
- <tabstop>m_targetPath</tabstop>
- <tabstop>Browse</tabstop>
<tabstop>m_targetOutputFile</tabstop>
<tabstop>checkInstallTarget</tabstop>
<tabstop>m_InstallTargetPath</tabstop>
@@ -2750,7 +2735,6 @@
<include location="global" impldecl="in implementation">kpushbutton.h</include>
</includes>
<slots>
- <slot>browseTargetPath()</slot>
<slot>updateProjectConfiguration()</slot>
<slot>buildorderMoveUpClicked()</slot>
<slot>buildorderMoveDownClicked()</slot>
@@ -2802,6 +2786,7 @@
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>klineedit.h</includehint>
+ <includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>klineedit.h</includehint>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic