Summary: | Setting up internal mysql database fails [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Simon <freisim93> |
Component: | Setup-Database | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | ||
Version: | 5.0.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Unspecified | ||
Latest Commit: | http://commits.kde.org/digikam/5cbda9fcc0d7a6c0c83b1538866e064325270302 | Version Fixed In: | 5.1.0 |
Sentry Crash Report: | |||
Attachments: |
Patch of header file after refactor
Patch of cpp file after refactor databaseserver.patch minor patch on top of maiks commits |
Description
Simon
2016-07-28 20:56:00 UTC
Created attachment 100358 [details]
Patch of header file after refactor
Created attachment 100359 [details]
Patch of cpp file after refactor
Maik, Sound like this chnages your last patches in internal server before the 5.0.0 release... Right ? Gilles Yes, I test the patch tonight and check under Windows. Maik Simon, I think the problem was that --defaults-file is unknown under Windows with mysql_install_db.exe from MariaDB. I check it tonight. Maik Created attachment 100378 [details]
databaseserver.patch
This patch is for commit. Changes:
- fix missing i18n
- fix QString compile error
- remove struct databaseDirs
- fix MySQL init command under Windows
- code polishes
Maik
Git commit 5cbda9fcc0d7a6c0c83b1538866e064325270302 by Maik Qualmann. Committed on 29/07/2016 at 19:02. Pushed by mqualmann into branch 'master'. apply patch #100378 from Simon to refactor internal database server code and fix database initializing FIXED-IN: 5.1.0 M +2 -1 NEWS M +394 -331 libs/database/server/databaseserver.cpp M +39 -8 libs/database/server/databaseserver.h http://commits.kde.org/digikam/5cbda9fcc0d7a6c0c83b1538866e064325270302 We also use again ".mysql.digikam" as DB directory. A hidden directory is better if it is in the album root. Maik Created attachment 100382 [details]
minor patch on top of maiks commits
Thanks Maik for going over it and improve it. I have some minor points to add (additional.patch):
- Aren't the i18n calls in the arguments to processErrorLog redundant as this argument is later on passed to i18n again?
- One minor improvement over my own patch: In createMysqlFiles only create initCmdArgs if really necessary.
The following questions are purely out of curiosity/my education, so feel free to ignore it, but I would appreciate a short answer:
- You removed my struct workaround to make the private variables const. Obviously this is because my workaround was ugly and cumbersome. Is there a better way to make them const or is this in any case a useless thing to do?
- Why is the msg argument to processErrorLog declared as a reference?
The i18n() call is required, otherwise the message would not be translated. For example: i18n("my Text %1", msg); The translator can only translate the text "my Text %1", the argument is not visible for the translator. Perhaps this link to reference : http://stackoverflow.com/questions/2104328/whats-the-best-way-to-send-qstrings-in-a-function-call Git commit 28d594c6537d086c06cc737c26a9512e5d394835 by Maik Qualmann. Committed on 30/07/2016 at 05:41. Pushed by mqualmann into branch 'master'. create initCmdArgs if really necessary M +8 -8 libs/database/server/databaseserver.cpp http://commits.kde.org/digikam/28d594c6537d086c06cc737c26a9512e5d394835 Git commit f88ef9d28b55750bed458d0c3308a9d761d62b65 by Maik Qualmann. Committed on 30/07/2016 at 05:47. Pushed by mqualmann into branch 'master'. add debug M +1 -0 libs/database/server/databaseserver.cpp http://commits.kde.org/digikam/f88ef9d28b55750bed458d0c3308a9d761d62b65 |