diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/distpart | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/distpart')
-rw-r--r-- | parts/distpart/distpart_part.cpp | 4 | ||||
-rw-r--r-- | parts/distpart/distpart_part.h | 3 | ||||
-rw-r--r-- | parts/distpart/distpart_ui.ui | 156 | ||||
-rw-r--r-- | parts/distpart/distpart_widget.cpp | 18 | ||||
-rw-r--r-- | parts/distpart/distpart_widget.h | 3 | ||||
-rw-r--r-- | parts/distpart/specsupport.cpp | 36 |
6 files changed, 104 insertions, 116 deletions
diff --git a/parts/distpart/distpart_part.cpp b/parts/distpart/distpart_part.cpp index 77e69705..33b74c80 100644 --- a/parts/distpart/distpart_part.cpp +++ b/parts/distpart/distpart_part.cpp @@ -37,8 +37,8 @@ typedef KDevGenericFactory<DistpartPart> DistpartFactory; static const KDevPluginInfo data("kdevdistpart"); K_EXPORT_COMPONENT_FACTORY( libkdevdistpart, DistpartFactory( data ) ) -DistpartPart::DistpartPart(TQObject *parent, const char *name, const TQStringList &) - : KDevPlugin(&data, parent, name ? name : "DistpartPart") { +DistpartPart::DistpartPart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevPlugin(&data, tqparent, name ? name : "DistpartPart") { kdDebug(9007) << "DistpartPart::DistpartPart()" << endl; setInstance(DistpartFactory::instance()); diff --git a/parts/distpart/distpart_part.h b/parts/distpart/distpart_part.h index d380d4fd..870ba792 100644 --- a/parts/distpart/distpart_part.h +++ b/parts/distpart/distpart_part.h @@ -34,10 +34,11 @@ class KDialogBase; class DistpartPart : public KDevPlugin { Q_OBJECT + TQ_OBJECT public: - DistpartPart(TQObject *parent, const char *name, const TQStringList &); + DistpartPart(TQObject *tqparent, const char *name, const TQStringList &); ~DistpartPart(); public slots: diff --git a/parts/distpart/distpart_ui.ui b/parts/distpart/distpart_ui.ui index a987c009..7a53590b 100644 --- a/parts/distpart/distpart_ui.ui +++ b/parts/distpart/distpart_ui.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>distpart_ui</class> <author>Ian Reinhart Geiser <geiseri@yahoo.com></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>packaging_dialog</cstring> </property> @@ -21,13 +21,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -46,7 +46,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout30</cstring> </property> @@ -57,7 +57,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>titleLabel</cstring> </property> @@ -69,7 +69,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>0</height> @@ -79,7 +79,7 @@ <string><H2>Project Packaging & Publishing</H2></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>KDevelopGraphic</cstring> </property> @@ -91,13 +91,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>48</width> <height>48</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>48</width> <height>48</height> @@ -112,7 +112,7 @@ </widget> </hbox> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>actions_box</cstring> </property> @@ -127,7 +127,7 @@ <property name="tabPosition"> <enum>Top</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -143,7 +143,7 @@ <cstring>srcDistFileListBox</cstring> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="2" colspan="1"> + <widget class="TQCheckBox" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>customProjectCheckBox</cstring> </property> @@ -154,7 +154,7 @@ <string>Default is: %n-%v.tar.gz</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> <cstring>Layout19</cstring> </property> @@ -165,7 +165,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>sourceOptionsGroupBox</cstring> </property> @@ -176,7 +176,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>bzipCheckBox</cstring> </property> @@ -184,7 +184,7 @@ <string>Use &bzip2 instead of gzip</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout34</cstring> </property> @@ -195,7 +195,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>archiveNameLabel</cstring> </property> @@ -231,14 +231,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addFile</cstring> </property> @@ -288,7 +288,7 @@ </widget> </vbox> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>fileListLabel</cstring> </property> @@ -301,7 +301,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -312,17 +312,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> @@ -341,7 +341,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>vendorLabel</cstring> </property> @@ -394,7 +394,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>appNameLabel</cstring> </property> @@ -405,7 +405,7 @@ <cstring>appNameLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>summaryLabel</cstring> </property> @@ -416,7 +416,7 @@ <cstring>summaryLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>licenseLabel</cstring> </property> @@ -427,7 +427,7 @@ <cstring>licenseLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>releaseLabel</cstring> </property> @@ -438,7 +438,7 @@ <cstring>releaseLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>versionLabel</cstring> </property> @@ -493,7 +493,7 @@ Menu item: Project/Project Options/General/Version changes project compiled version number</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>groupLabel</cstring> </property> @@ -504,7 +504,7 @@ changes project compiled version number</string> <cstring>groupLineEdit</cstring> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>packagerLabel</cstring> </property> @@ -530,7 +530,7 @@ changes project compiled version number</string> </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>advancedOptionsGroupBox</cstring> </property> @@ -541,7 +541,7 @@ changes project compiled version number</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>devPackageCheckBox</cstring> </property> @@ -549,7 +549,7 @@ changes project compiled version number</string> <string>&Create development package</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>docsPackageCheckBox</cstring> </property> @@ -557,7 +557,7 @@ changes project compiled version number</string> <string>Create documentation package</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>appIconCheckBox</cstring> </property> @@ -565,7 +565,7 @@ changes project compiled version number</string> <string>Include application icon</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>archLabel</cstring> </property> @@ -573,7 +573,7 @@ changes project compiled version number</string> <string>Architecture target:<BR><b>(Note: You must have a compiler that supports this target)</b></string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>i386</string> @@ -644,17 +644,17 @@ changes project compiled version number</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> @@ -700,23 +700,23 @@ Build Files</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>projectDescriptionLabel</cstring> </property> @@ -753,15 +753,15 @@ Build Files</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -799,7 +799,7 @@ Build Files</string> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -810,7 +810,7 @@ Build Files</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>localOptionsGroupBox</cstring> </property> @@ -829,7 +829,7 @@ Build Files</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout15</cstring> </property> @@ -840,7 +840,7 @@ Build Files</string> <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>genHTMLCheckBox</cstring> </property> @@ -848,7 +848,7 @@ Build Files</string> <string>Ge&nerate HTML information page</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>useRPMInfoCheckBox</cstring> </property> @@ -866,7 +866,7 @@ Build Files</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -885,14 +885,14 @@ Build Files</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout21</cstring> </property> @@ -923,7 +923,7 @@ Build Files</string> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>remoteOptionsGroupBox</cstring> </property> @@ -954,14 +954,14 @@ Build Files</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>0</height> </size> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>Layout23</cstring> </property> @@ -972,7 +972,7 @@ Build Files</string> <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>fileSubmissionLabel</cstring> </property> @@ -993,7 +993,7 @@ Build Files</string> <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -1034,7 +1034,7 @@ Build Files</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>Layout25</cstring> </property> @@ -1045,7 +1045,7 @@ Build Files</string> <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>uploadCustomCheckBox</cstring> </property> @@ -1053,7 +1053,7 @@ Build Files</string> <string>Upload to &custom FTP site</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>uploadftpkdeorgCheckBox</cstring> </property> @@ -1071,7 +1071,7 @@ Build Files</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -1102,7 +1102,7 @@ Build Files</string> <string>Reset</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>uploadAppsKDEcomCheckBox</cstring> </property> @@ -1136,7 +1136,7 @@ Build Files</string> <sender>srcPackagePushButton</sender> <signal>clicked()</signal> <receiver>packaging_dialog</receiver> - <slot>slotsrcPackagePushButtonPressed()</slot> + <slot>Q_SLOTSrcPackagePushButtonPressed()</slot> </connection> <connection> <sender>importSPECPushButton</sender> @@ -1152,9 +1152,9 @@ Build Files</string> </connection> <connection> <sender>srcDistFileListBox</sender> - <signal>clicked(QListBoxItem*)</signal> + <signal>clicked(TQListBoxItem*)</signal> <receiver>packaging_dialog</receiver> - <slot>slotRemoveFile(QListBoxItem*)</slot> + <slot>slotRemoveFile(TQListBoxItem*)</slot> </connection> </connections> <tabstops> @@ -1201,17 +1201,17 @@ Build Files</string> <include location="global" impldecl="in implementation">klineedit.h</include> <include location="global" impldecl="in implementation">ktextedit.h</include> </includes> -<slots> +<Q_SLOTS> <slot>slotbuildAllPushButtonPressed()</slot> <slot>slotexportSPECPushButtonPressed()</slot> <slot>slotimportSPECPushButtonPressed()</slot> - <slot>slotsrcPackagePushButtonPressed()</slot> + <slot>Q_SLOTSrcPackagePushButtonPressed()</slot> <slot>slotAddFileButtonPressed()</slot> - <slot>slotRemoveFile(QListBoxItem *item)</slot> -</slots> + <slot>slotRemoveFile(TQListBoxItem *item)</slot> +</Q_SLOTS> <pixmapfunction>DesktopIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistbox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/parts/distpart/distpart_widget.cpp b/parts/distpart/distpart_widget.cpp index eebbbe36..177bd966 100644 --- a/parts/distpart/distpart_widget.cpp +++ b/parts/distpart/distpart_widget.cpp @@ -51,8 +51,8 @@ #include "specsupport.h" #include "lsmsupport.h" -DistpartDialog::DistpartDialog(DistpartPart *part, TQWidget *parent) - :distpart_ui(parent, "dist_widget"), m_part(part) { +DistpartDialog::DistpartDialog(DistpartPart *part, TQWidget *tqparent) + :distpart_ui(tqparent, "dist_widget"), m_part(part) { m_spec = new SpecSupport(m_part); connect( customProjectCheckBox, TQT_SIGNAL(toggled(bool) ), @@ -142,14 +142,14 @@ void DistpartDialog::slotcreateSrcArchPushButtonPressed() { } else { - prog->setLabel(i18n("Adding file: %1").arg( file) ); + prog->setLabel(i18n("Adding file: %1").tqarg( file) ); prog->progressBar()->setValue( (idx*100)/srcDistFileListBox->numRows() ); } } tar.close( ); prog->hide(); delete prog; - KMessageBox::information( this, i18n("Archive made at: %1").arg( filename ), i18n("Archive Done") ); + KMessageBox::information( this, i18n("Archive made at: %1").tqarg( filename ), i18n("Archive Done") ); } else @@ -192,7 +192,7 @@ void DistpartDialog::slotuploadSubmitPushButtonPressed() { else { for(unsigned int i=0; i< uploadFileListBox->count(); i++) KIO::NetAccess::copy(KURL::fromPathOrURL( uploadFileListBox->text(i) ), - KURL::fromPathOrURL( getuploadURLLineEditText() + uploadFileListBox->text(i).replace(TQRegExp("[^/]*/"),"") )); + KURL::fromPathOrURL( getuploadURLLineEditText() + uploadFileListBox->text(i).tqreplace(TQRegExp("[^/]*/"),"") )); } } @@ -455,9 +455,9 @@ void DistpartDialog::setprojectChangelogMultilineEditText(TQString text) { TQString DistpartDialog::getSourceName() { TQString name = (getcustomProjectCheckBoxState()) ? getarchNameFormatLineEditText() : TQString("%n-%v"); name += (getcustomProjectCheckBoxState() && getbzipCheckBoxState()) ? ".tar.bz2" : ".tar.gz"; - return name.replace(TQRegExp("%n"),getappNameFormatLineEditText()) - .replace(TQRegExp("%v"),getversionLineEditText()) - .replace(TQRegExp("%d"),TQDate::currentDate().toString("yyyyMMdd")); + return name.tqreplace(TQRegExp("%n"),getappNameFormatLineEditText()) + .tqreplace(TQRegExp("%v"),getversionLineEditText()) + .tqreplace(TQRegExp("%d"),TQDate::tqcurrentDate().toString("yyyyMMdd")); } void DistpartDialog::loadSettings() { @@ -592,7 +592,7 @@ void DistpartDialog::slotAddFileButtonPressed(){ } void DistpartDialog::slotRemoveFile(TQListBoxItem *item){ - if ( KMessageBox::Yes == KMessageBox::warningYesNo( this, i18n("Remove %1").arg( item->text() ), i18n("Remove File") )){ + if ( KMessageBox::Yes == KMessageBox::warningYesNo( this, i18n("Remove %1").tqarg( item->text() ), i18n("Remove File") )){ for(uint count =0; count< srcDistFileListBox->numRows(); count++){ if ( item == srcDistFileListBox->item(count)){ srcDistFileListBox->removeItem(count); diff --git a/parts/distpart/distpart_widget.h b/parts/distpart/distpart_widget.h index 32712ee1..36f70582 100644 --- a/parts/distpart/distpart_widget.h +++ b/parts/distpart/distpart_widget.h @@ -46,10 +46,11 @@ class ReadOnlyPart; class DistpartDialog : public distpart_ui { Q_OBJECT + TQ_OBJECT public: - DistpartDialog(DistpartPart *part, TQWidget *parent); + DistpartDialog(DistpartPart *part, TQWidget *tqparent); ~DistpartDialog(); signals: diff --git a/parts/distpart/specsupport.cpp b/parts/distpart/specsupport.cpp index ab4d684f..985c7c0f 100644 --- a/parts/distpart/specsupport.cpp +++ b/parts/distpart/specsupport.cpp @@ -38,23 +38,9 @@ #include <tqmessagebox.h> /// \FIXME This is at least the fifth place in the kdevelop code something like this exists -TQString QRegExp_escape(const TQString& str ) +TQString TQRegExp_escape(const TQString& str ) { -#if QT_VERSION >= 0x030100 return TQRegExp::escape(str); -#else - // this block is copyrighted by Trolltech AS (GPL) - static const char meta[] = "$()*+.?[\\]^{|}"; - TQString quoted = str; - int i = 0; - - while ( i < (int) quoted.length() ) { - if ( strchr(meta, quoted[i].latin1()) != 0 ) - quoted.insert( i++, "\\" ); - i++; - } - return quoted; -#endif } SpecSupport::SpecSupport(DistpartPart *part) : packageBase(), m_part(part) { @@ -86,7 +72,7 @@ SpecSupport::~SpecSupport() { void SpecSupport::slotbuildAllPushButtonPressed() { TQMap<TQString,TQString>::Iterator it; TQFile file1(dir + "/" + getAppSource()); - TQFile file2(*(map.find("_sourcedir")) + "/" + getAppSource()); + TQFile file2(*(map.tqfind("_sourcedir")) + "/" + getAppSource()); if (!file2.exists()) { if (!file1.exists()) { TQMessageBox::critical(0 ,i18n("Error"),i18n("You need to create a source archive first.")); @@ -95,17 +81,17 @@ void SpecSupport::slotbuildAllPushButtonPressed() { else if (KDevMakeFrontend *makeFrontend = m_part->extension<KDevMakeFrontend>("KDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + KProcess::quote(dir) + - " && cp " + KProcess::quote(getAppSource()) + " " + KProcess::quote(*(map.find("_sourcedir")))); + " && cp " + KProcess::quote(getAppSource()) + " " + KProcess::quote(*(map.tqfind("_sourcedir")))); } if (KDevMakeFrontend *makeFrontend = m_part->extension<KDevMakeFrontend>("KDevelop/MakeFrontend")) - makeFrontend->queueCommand(dir,"cd " + KProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + + makeFrontend->queueCommand(dir,"cd " + KProcess::quote((((it = map.tqfind("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -ba " + m_part->project()->projectName() + ".spec"); } // TQPushButton* exportSPECPushButton; void SpecSupport::slotexportSPECPushButtonPressed() { TQMap<TQString,TQString>::Iterator it; - TQString specname = ((it = map.find("_specdir")) != map.end()) ? (*it) : (m_part->project()->projectDirectory()); + TQString specname = ((it = map.tqfind("_specdir")) != map.end()) ? (*it) : (m_part->project()->projectDirectory()); specname += ("/" + m_part->project()->projectName() + ".spec"); TQFile file(specname); @@ -122,7 +108,7 @@ TQString SpecSupport::getInfo(TQString s, TQString motif) { TQRegExp re(motif + "[ \t]*([^ \t].*[^ \t])[ \t]*"); if (re.exactMatch(s)) return re.cap(1); - return TQString::null; + return TQString(); } // TQPushButton* importSPECPushButton; @@ -185,7 +171,7 @@ void SpecSupport::slotsrcPackagePushButtonPressed() { TQMap<TQString,TQString>::Iterator it; TQFile file1(dir + "/" + getAppSource()); - TQFile file2(*(map.find("_sourcedir")) + "/" + getAppSource()); + TQFile file2(*(map.tqfind("_sourcedir")) + "/" + getAppSource()); if (!file2.exists()) { if (!file1.exists()) { TQMessageBox::critical(0,i18n("Error"),i18n("You need to create a source archive first.")); @@ -194,10 +180,10 @@ void SpecSupport::slotsrcPackagePushButtonPressed() { else if (KDevMakeFrontend *makeFrontend = m_part->extension<KDevMakeFrontend>("KDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + KProcess::quote(dir) + - " && cp " + KProcess::quote(getAppSource()) + " " + KProcess::quote(*(map.find("_sourcedir")))); + " && cp " + KProcess::quote(getAppSource()) + " " + KProcess::quote(*(map.tqfind("_sourcedir")))); } if (KDevMakeFrontend *makeFrontend = m_part->extension<KDevMakeFrontend>("KDevelop/MakeFrontend")) - makeFrontend->queueCommand(dir,"cd " + KProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + + makeFrontend->queueCommand(dir,"cd " + KProcess::quote((((it = map.tqfind("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -bs " + m_part->project()->projectName() + ".spec"); } @@ -226,7 +212,7 @@ void SpecSupport::parseDotRpmmacros() { TQString value = re.cap(2).stripWhiteSpace(); while(subst.search(value) != -1) { - value.replace(TQRegExp("%\\{"+ QRegExp_escape( subst.cap(1) ) +"\\}"),*map.find(subst.cap(1))); + value.tqreplace(TQRegExp("%\\{"+ TQRegExp_escape( subst.cap(1) ) +"\\}"),*map.tqfind(subst.cap(1))); } map.insert(re.cap(1),value); } @@ -245,7 +231,7 @@ void SpecSupport::parseDotRpmmacros() { bool SpecSupport::createRpmDirectoryFromMacro(const TQString & name) { TQMap<TQString,TQString>::Iterator it; - if((it = map.find(name)) != map.end()) { + if((it = map.tqfind(name)) != map.end()) { TQDir dir(*it); if (!dir.exists()) return dir.mkdir(*it); } |