KPhotoAlbum on Windows?

Teemu sikanauta at pumpuli.net
Mon Dec 16 14:58:25 GMT 2024


On 2024-12-16 01:30, Johannes Zarl-Zierl wrote:
>> Include <dirent.h> not available on Windows.
> 
> Quite possibly this could be solved by using MinGW on Windows. AFAIK 
> MinGW
> also support all of the other POSIX headers that you encountered.

Need to investigate MinGW then, should be easy with kde-craft.
I started with Visual Studio as it was the tool used in the official 
intro video on this page: 
https://community.kde.org/Get_Involved/development/Windows




>> 2) DB/ImageScout.cpp
>> 
>> Include <unistd.h> not available on Windows.
>> Commented out the include, compiled without errors. Not used?
> 
> unistd.h provides the read() and close() functions which are used in 
> this file.
> I don't know why this worked for you, maybe there's some support for 
> these
> functions on Windows? The official Windows API for this should be 
> ReadFile and
> CloseHandle, if I'm correct.

I had added <io.h> instead, but I had left that part out of my notes, 
sorry.



>> 6) Viewer/ViewerWidget.cpp
>> 
>> Couldn't get the <QDBusConnection> and <QDBusMessage> working, it
>> wouldn't find includes.
> 
> I noticed that QDbus is not explicitly linked against in 
> CMakeLists.txt. I've
> fixed that now, which should mean that the headers are found on Windows 
> also.


Compiles now OK, thanks. (Though the actual functionality might still 
not work).




>> 11) After all that trial and error, I'm at the last step, linking
>> executable bin\kphotoalbum.exe
>> 
>> With, this, I have these linking errors still, trying to solve but not
>> having much success:
> [...]
>> I have narrowed down that SettingsData-related error.
>> It only appears when the connect-function is used to with those values
>> declared in Q_SIGNALS in SettingsData.h.
>> E.g. in GridResizeSlider.cpp, having these rows causes the error:
>> 
>> 	connect(settings,
> &Settings::SettingsData::actualThumbnailSizeChanged,
>> this, &GridResizeSlider::setValue);
>> 	connect(settings, &Settings::SettingsData::thumbnailSizeChanged,
> this,
>> &GridResizeSlider::setMaximum);
>> 


> My immediate hope would be for this to be fixed by the explicit linking 
> of Qt
> libraries mentioned above.
> Other than that, is this only related to the viewSortTypeChanged() and
> matchTypeChanged() signals? If so, this may be related to them using 
> custom
> enum types. Maybe there's some additional work needed to register them 
> on
> Windows with the QMetaObject system.

No, not related to just those. In my example above, the signals causing 
the linking error were actualThumbnailSizeChanged and 
thumbnailSizeChanged.

Also, not only SettingsData is affected, as those ThumbnailCache-related 
link errors seems to be Signals related as well.
Commenting out this line from window.cpp removed the one error line 
related to window.cpp:
"connect(m_thumbnailCache, 
&ImageManager::ThumbnailCache::cacheInvalidated, this, 
&Window::slotBuildThumbnailsIfWanted);"


Teemu


More information about the KPhotoAlbum mailing list