El dijous, 19 de gener de 2023, a les 9:43:30 (CET), Martin Schnitkemper va escriure: > Hello, > > I tried to extend okular to save PDF-Print-Options (wish #463732). All > works well so far, I added a new item in the configuration dialog and the > new variable "PageScaleMode" is written to and read from "okularpartrc", > but I am not able to assign the value of "Okular::Settings::pageScaleMode" > to "m_scaleMode->setCurrentIndex" in module "generator_pdf.cpp". > > Compilation is successful, but it crashes on runtime after opening the print > dialog. Message on terminal is "you need to call Settings::instance before > using". > > I am not too familiar with C++ coding and it is my first try to extend an > application. I inspected already the other modules of the project where the > developers used "Okular::Settings::" in a similar & working way, but I > could not find out so far, where the instance has been set for a proper > usage. > > Can anyone tell me what I missed, or guide me to a code example of the > okular project where I can see how to get right access to the > "Okular::Settings::"?
Please push your code as a Merge Request so we can see it, much easier to comment on code when we can see it :) Cheers, Albert > > Thank you in advance for your support, > Martin