changeset 661:0238a7b6bca2

merge
author Volker Grabsch <vog@notjusthosting.com>
date Sat, 23 Jan 2010 00:08:50 +0100
parents 8bb726b9c531 (current diff) f77810598227 (diff)
children 9073c795e712
files
diffstat 4 files changed, 141 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/qt-test.cpp	Sat Jan 23 00:08:50 2010 +0100
@@ -0,0 +1,15 @@
+/* This file is part of mingw-cross-env.                     */
+/* See doc/index.html or doc/README for further information. */
+
+#include <QtGui/QApplication>
+#include "ui_qt-test.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    QMainWindow w;
+    Ui::MainWindow u;
+    u.setupUi(&w);
+    w.show();
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/qt-test.pro	Sat Jan 23 00:08:50 2010 +0100
@@ -0,0 +1,6 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html or doc/README for further information.
+
+TARGET   = test-qt
+SOURCES += qt-test.cpp
+FORMS   += qt-test.ui
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/qt-test.ui	Sat Jan 23 00:08:50 2010 +0100
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- This file is part of mingw-cross-env.                     -->
+<!-- See doc/index.html or doc/README for further information. -->
+
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>test-qt</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="QTextBrowser" name="textBrowser">
+      <property name="html">
+       <string>
+        <![CDATA[
+         <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+         <html>
+          <head>
+           <meta http-equiv="content-type" content="text/html; charset=utf-8">
+           <title>test-qt</title>
+           <style type="text/css">
+            body {
+             font-family: sans-serif;
+            }
+            h1 {
+             font-size: 14pt;
+             margin-top: 0em;
+             text-align: center;
+             background-color: #afa;
+            }
+           </style>
+          </head>
+          <body>
+           <h1>test-qt</h1>
+           <p>test-qt</p>
+           <ol>
+            <li>test-qt</li>
+            <li>test-qt</li>
+            <li><em>test-qt</em></li>
+           </ol>
+          </body>
+         </html>
+        ]]>
+       </string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>400</width>
+     <height>26</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>&amp;File</string>
+    </property>
+    <addaction name="actionQuit"/>
+   </widget>
+   <addaction name="menuFile"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionQuit">
+   <property name="text">
+    <string>&amp;Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>actionQuit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>299</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- a/src/qt.mk	Fri Jan 22 16:28:40 2010 +0100
+++ b/src/qt.mk	Sat Jan 23 00:08:50 2010 +0100
@@ -42,15 +42,15 @@
         -nomake docs \
         -nomake translations
 
-    $(MAKE) -C '$(1)'.native -j $(JOBS) sub-tools-bootstrap
-    $(MAKE) -C '$(1)'.native -j $(JOBS) sub-moc
-    $(MAKE) -C '$(1)'.native -j $(JOBS) sub-rcc
-    $(MAKE) -C '$(1)'.native -j $(JOBS) sub-uic
+    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-tools-bootstrap
+    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-moc
+    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-rcc
+    $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-uic
 
     # rebuild qmake to use "-unix" as default and to use the correct "ar" command
     $(SED) 's,\(Option::TARG_MODE Option::target_mode = Option::TARG_\)[A-Z_]*,\1UNIX_MODE,' -i '$(1)'.native/qmake/option.cpp
     $(SED) 's,"ar -M,"$(TARGET)-ar -M,' -i '$(1)'.native/qmake/generators/win32/mingw_make.cpp
-    $(MAKE) -C '$(1)'.native/qmake -j $(JOBS)
+    $(MAKE) -C '$(1)'.native/qmake -j '$(JOBS)'
 
     # install the native tools manually
     $(INSTALL) -m755 '$(1)'.native/bin/moc   '$(PREFIX)/bin/$(TARGET)-moc'
@@ -132,7 +132,13 @@
         -v
 
     $(MAKE) -C '$(1)' -j '$(JOBS)'
-    $(TARGET)-ranlib '$(1)'/lib/*.a
+    '$(TARGET)-ranlib' '$(1)'/lib/*.a
     rm -rf '$(PREFIX)/$(TARGET)/mkspecs'
-    $(MAKE) -C '$(1)' install
+    $(MAKE) -C '$(1)' -j 1 install
+
+    mkdir            '$(1)/test-qt'
+    cp '$(2)'*       '$(1)/test-qt/'
+    cd               '$(1)/test-qt' && '$(TARGET)-qmake'
+    $(MAKE)       -C '$(1)/test-qt' -j '$(JOBS)'
+    $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/'
 endef