[PATCH] Improved adding images

Jan Darowski jan.darowski at gmail.com
Sun Mar 15 03:01:06 PDT 2015


1) To be honest I'm not sure where it comes from, seems like
QtDesigner chenged it...
2) I think this qstrdup can and should be removed... I used qstrdup
instead of strdup (they work the same) because somewhere else qstrdup
was used. It's good that you pointed it out because most of these
qstrdup uses cause mem leaks right now. I'm retarded.

In the evening I will send corrected version of these patches, sorry
for the bugs.

2015-03-15 3:38 GMT+01:00 Dirk Hohndel <dirk at hohndel.org>:
> On Sat, Mar 14, 2015 at 06:03:57PM +0100, Jan Darowski wrote:
>> diff --git a/qt-ui/shiftimagetimes.ui b/qt-ui/shiftimagetimes.ui
>> index cce51e8..ad81923 100644
>> --- a/qt-ui/shiftimagetimes.ui
>> +++ b/qt-ui/shiftimagetimes.ui
>> @@ -48,9 +48,9 @@
>>            <hour>23</hour>
>>            <minute>59</minute>
>>            <second>59</second>
>> -          <year>2010</year>
>> -          <month>12</month>
>> -          <day>31</day>
>> +          <year>2000</year>
>> +          <month>1</month>
>> +          <day>1</day>
>
> Why this change? (you have that more than once)
>
>> diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
>> index 8a0f2b0..b499095 100644
>> --- a/qt-ui/simplewidgets.cpp
>> +++ b/qt-ui/simplewidgets.cpp
>> @@ -289,7 +289,7 @@ void ShiftImageTimesDialog::syncCameraClicked()
>>       scene->addPixmap(picture.scaled(ui.DCImage->size()));
>>       ui.DCImage->setScene(scene);
>>
>> -     picture_get_timestamp(fileNames.at(0).toUtf8().data(), &timestamp);
>> +     picture_get_timestamp(qstrdup(fileNames.at(0).toUtf8().data()), &timestamp);
>
> Why qstrdup here? Why not strdup?
>
> /D


More information about the subsurface mailing list