Skip to content

Commit

Permalink
Release version 6.4.0
Browse files Browse the repository at this point in the history
Bugfix Issue #89
Bugfix Issue #86
Bugfix Issue #85
Bugfix Issue #84
Bugfix Issue #83
Bugfix Issue #79
Bugfix Issue #78
Bugfix Issue #77
Bugfix Issue #75
  • Loading branch information
omix committed Oct 15, 2022
1 parent ea476f4 commit ca3f749
Show file tree
Hide file tree
Showing 238 changed files with 29,026 additions and 16,663 deletions.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This saves compilation time.

`> set PATH=...\apache-ant-1.10.3\bin;%PATH%`

`> set QTDIR=C:\Qt\6.3.0\msvc2019_64`
`> set QTDIR=C:\Qt\6.4.0\msvc2019_64`

#### Pre-Build Steps On Linux and macOS

Expand All @@ -65,9 +65,9 @@ This saves compilation time.

`> export JAVA_HOME_TARGET=path to your java jdk`

`> export QTDIR=/opt/Qt/6.3.0/gcc_64` on Linux
`> export QTDIR=/opt/Qt/6.4.0/gcc_64` on Linux

`> export QTDIR=/opt/Qt/6.3.0/macos` on macOS
`> export QTDIR=/opt/Qt/6.4.0/macos` on macOS

#### Building Bindings

Expand Down Expand Up @@ -100,7 +100,7 @@ to your project:
<version>$VERSION</version>
</dependency>
```
(exchange `$VERSION` either by `5.15.9`, `6.2.7` or by `6.3.4`).
(exchange `$VERSION` either by `5.15.10`, `6.2.8`, `6.3.5` or by `6.4.0`).

Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/).

Expand All @@ -120,7 +120,7 @@ public class Test {
Compile the file:

``` powershell
javac -cp qtjambi-6.3.4.jar Test.java
javac -cp qtjambi-6.4.0.jar Test.java
```

### Execute Example
Expand All @@ -132,16 +132,26 @@ Additionally, you need *Qt*. Use the [Qt installer](https://www.qt.io/download-q

When running a QtJambi application you have to make the locations of Qt libraries known to Java.
Therefore, use the PATH environment (LD_LIBRARY_PATH on Linux, DYLD_LIBRARY_PATH on macOS)
or the Java runtime property java.library.path. The example program can be executed this way:
or the Java runtime property java.library.path.
By default, on Windows Qt libraries are located in `bin` directory and on Linux and macOS in `lib` directory.
In case your Linux distribution provides Qt (of correct version) as system library you don't need to specify library path.

```
java -cp qtjambi-6.3.4.jar;. -Djava.library.path=C:\Qt\6.3.1\msvc2019_64\bin Test
The example program can be executed this way on Windows:

``` powershell
java -cp qtjambi-6.4.0.jar;. -Djava.library.path=C:\Qt\6.4.0\msvc2019_64\bin Test
```

On macOS you additionally need to use the start parameter -XstartOnFirstThread and point to Qt `lib` folder and not `bin`, for example:
On Linux it looks this way:

``` bash
java -cp qtjambi-6.4.0.jar:. -Djava.library.path=<path to>/Qt/6.4.0/gcc_64/lib Test
```
java -cp qtjambi-6.3.4.jar;. -Djava.library.path=/Users/max/Qt/6.2.3/macos/lib -XstartOnFirstThread Test

On macOS you additionally need to use the start parameter -XstartOnFirstThread:

``` bash
java -cp qtjambi-6.4.0.jar:. -Djava.library.path=<path to>/Qt/6.4.0/macos/lib -XstartOnFirstThread Test
```

In general, you can start learning how to use Qt in Java [as it is introduced for C++](https://doc.qt.io/qt-6/gettingstarted.html#create-your-first-applications).
Expand Down
4 changes: 2 additions & 2 deletions antfiles/generator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
</sequential>
</macrodef>

<target name="generator.xmlmerge-impl"
description="Merges the XML files used by the Qt Jambi generator.">
<target name="generator.xmlmerge-impl">
<xmlmerge victim="core"/>
<xmlmerge victim="concurrent"/>
<xmlmerge victim="gui"/>
Expand Down Expand Up @@ -144,6 +143,7 @@
<xmlmerge victim="activex"/>
<xmlmerge victim="ui4"/>
<xmlmerge victim="httpserver"/>
<xmlmerge victim="spatialaudio"/>
</target>

</project>
16 changes: 16 additions & 0 deletions autotestlib/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@ bool operator ==(const std::initializer_list<T>& a,const std::initializer_list<T
class General {

public:
static bool canVulkan(){
#if QT_CONFIG(vulkan)
return true;
#else
return false;
#endif
}
static bool hasVulkanInstance(QWindow* window){
#if QT_CONFIG(vulkan)
return window->vulkanInstance();
#else
Q_UNUSED(window)
return false;
#endif
}

#ifndef QTJAMBI_NO_WIDGETS
static void callPaintCell(QCalendarWidget *w, QPainter *painter);
static void callPaintCellNull(QCalendarWidget *w);
Expand Down
8 changes: 8 additions & 0 deletions autotestlib/injectedcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,11 @@ QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/widgets,QGraphicsItem$BlockedByModalPanelI
}
#endif
}

bool ImageIOHandlerSubclass::callRead(QImage *image) {
return read(image);
}

bool ImageIOHandlerSubclass::read(QImage *image) {
return image != nullptr ? image->load(":io/qt/autotests/svgcards-example.png") : true;
}
8 changes: 2 additions & 6 deletions autotestlib/injectedcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,9 @@ class ValidatorSubclass: public QValidator {
class ImageIOHandlerSubclass: public QImageIOHandler
{
public:
bool callRead(QImage *image) {
return read(image);
}
bool callRead(QImage *image);

bool read(QImage *image) {
return image != nullptr ? image->load("classpath:io/qt/autotests/svgcards-example.png") : true;
}
bool read(QImage *image) override;
};

#ifndef QTJAMBI_NO_SQL
Expand Down
Loading

0 comments on commit ca3f749

Please sign in to comment.