Gentoo Archives: gentoo-commits

From: "Markus Meier (maekke)" <maekke@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/qtpfsgui/files: qtpfsgui-1.9.2-trunk.patch
Date: Fri, 04 Jul 2008 21:17:02
Message-Id: E1KEseG-0008A3-61@stork.gentoo.org
1 maekke 08/07/04 21:16:56
2
3 Added: qtpfsgui-1.9.2-trunk.patch
4 Log:
5 revision bump for bug #222135; remove broken version
6 (Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc8 i686)
7
8 Revision Changes Path
9 1.1 media-gfx/qtpfsgui/files/qtpfsgui-1.9.2-trunk.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/qtpfsgui/files/qtpfsgui-1.9.2-trunk.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/qtpfsgui/files/qtpfsgui-1.9.2-trunk.patch?rev=1.1&content-type=text/plain
13
14 Index: qtpfsgui-1.9.2-trunk.patch
15 ===================================================================
16 Index: trunk/qtpfsgui/src/Fileformat/pfsoutldrimage.cpp
17 ===================================================================
18 --- trunk/qtpfsgui/src/Fileformat/pfsoutldrimage.cpp (revision 319)
19 +++ trunk/qtpfsgui/src/Fileformat/pfsoutldrimage.cpp (working copy)
20 @@ -62,9 +62,9 @@
21 *(data + 2 + (y*width+x)*4) = ( clamp( (*R)( x, y )*255.f, 0, 255) );
22 *(data + 3 + (y*width+x)*4) = 0xff;
23 } else {
24 - *(data + 3 + (y*width+x)*4) = ( clamp( (*B)( x, y )*255.f, 0, 255) );
25 + *(data + 3 + (y*width+x)*4) = ( clamp( (*R)( x, y )*255.f, 0, 255) );
26 *(data + 2 + (y*width+x)*4) = ( clamp( (*G)( x, y )*255.f, 0, 255) );
27 - *(data + 1 + (y*width+x)*4) = ( clamp( (*R)( x, y )*255.f, 0, 255) );
28 + *(data + 1 + (y*width+x)*4) = ( clamp( (*B)( x, y )*255.f, 0, 255) );
29 *(data + 0 + (y*width+x)*4) = 0xff;
30 }
31 }
32 Index: trunk/qtpfsgui/src/Common/gamma_and_levels.cpp
33 ===================================================================
34 --- trunk/qtpfsgui/src/Common/gamma_and_levels.cpp (revision 319)
35 +++ trunk/qtpfsgui/src/Common/gamma_and_levels.cpp (working copy)
36 @@ -189,12 +189,21 @@
37 return;
38 }
39
40 - //increment bins
41 - for (int i=0; i<data.width()*data.height(); i+=accuracy) {
42 - int v=qGray(*((QRgb*)(data.bits())+i));
43 - assert(v>=0 && v<=255);
44 - P[v] += 1;
45 - }
46 +// if (data.format()==QImage::Format_Indexed8) {
47 +// //increment bins
48 +// for (int i=0; i<data.width()*data.height(); i+=accuracy) {
49 +// const unsigned char v=*((const unsigned char*)(data.bits())+i);
50 +// P[v] += 1;
51 +// }
52 +//
53 +// } else {
54 + //increment bins
55 + for (int i=0; i<data.width()*data.height(); i+=accuracy) {
56 + int v=qGray(*((QRgb*)(data.bits())+i));
57 + assert(v>=0 && v<=255);
58 + P[v] += 1;
59 + }
60 +// }
61
62 //find max
63 float max=-1;
64 Index: trunk/qtpfsgui/src/Common/commandline.cpp
65 ===================================================================
66 --- trunk/qtpfsgui/src/Common/commandline.cpp (revision 319)
67 +++ trunk/qtpfsgui/src/Common/commandline.cpp (working copy)
68 @@ -378,7 +378,7 @@
69 if (!saveHdrFilename.isEmpty()) {
70 VERBOSEPRINT("Saving to file %1.",saveHdrFilename);
71 QFileInfo qfi(saveHdrFilename);
72 - const char* encodedName=QFile::encodeName(qfi.filePath()).constData();
73 + char* encodedName=strdup(QFile::encodeName(qfi.filePath()).constData());
74 if (qfi.suffix().toUpper()=="EXR") {
75 writeEXRfile(HDR,encodedName);
76 } else if (qfi.suffix().toUpper()=="HDR") {
77 @@ -397,6 +397,7 @@
78 } else {
79 error("Error, please specify a supported HDR file format.");
80 }
81 + free(encodedName);
82 } else {
83 VERBOSEPRINT("NOT Saving HDR image to file. %1","");
84 }
85 Index: trunk/qtpfsgui/src/Common/options.cpp
86 ===================================================================
87 --- trunk/qtpfsgui/src/Common/options.cpp (revision 319)
88 +++ trunk/qtpfsgui/src/Common/options.cpp (working copy)
89 @@ -60,8 +60,9 @@
90 if (!settings.contains(KEY_EXTERNAL_DCRAW_OPTIONS))
91 settings.setValue(KEY_EXTERNAL_DCRAW_OPTIONS,"-T");
92 dcraw_options=settings.value(KEY_EXTERNAL_DCRAW_OPTIONS).toStringList();
93 - if (!settings.contains(KEY_EXTERNAL_AIS_OPTIONS))
94 - settings.setValue(KEY_EXTERNAL_AIS_OPTIONS,"-a aligned_");
95 + //bug 2001032, remove spurious default QString "-a aligned_" value set by ver 1.9.2
96 + if (!settings.contains(KEY_EXTERNAL_AIS_OPTIONS) || settings.value(KEY_EXTERNAL_AIS_OPTIONS).toString()=="-a aligned_")
97 + settings.setValue(KEY_EXTERNAL_AIS_OPTIONS, QStringList() << "-a" << "aligned_");
98 align_image_stack_options=settings.value(KEY_EXTERNAL_AIS_OPTIONS).toStringList();
99 settings.endGroup();
100
101 Index: trunk/qtpfsgui/src/Threads/loadHdrThread.cpp
102 ===================================================================
103 --- trunk/qtpfsgui/src/Threads/loadHdrThread.cpp (revision 319)
104 +++ trunk/qtpfsgui/src/Threads/loadHdrThread.cpp (working copy)
105 @@ -58,7 +58,7 @@
106 QString extension = qfi.suffix().toUpper();
107 bool rawinput = (rawextensions.indexOf(extension)!=-1);
108 try {
109 - const char* encodedFileName=QFile::encodeName(qfi.filePath()).constData();
110 + char* encodedFileName=strdup(QFile::encodeName(qfi.filePath()).constData());
111 if (extension=="EXR") {
112 hdrpfsframe = readEXRfile(encodedFileName);
113 } else if (extension=="HDR") {
114 @@ -123,6 +123,7 @@
115 emit load_failed(tr("ERROR: File %1 has unsupported extension.").arg(fname));
116 return;
117 }
118 + free(encodedFileName);
119 #if 0
120 pfs::Channel *R,*G,*B;
121 hdrpfsframe->getRGBChannels( R, G, B );
122 Index: trunk/qtpfsgui/src/HdrCreation/HdrCreationManager.cpp
123 ===================================================================
124 --- trunk/qtpfsgui/src/HdrCreation/HdrCreationManager.cpp (revision 319)
125 +++ trunk/qtpfsgui/src/HdrCreation/HdrCreationManager.cpp (working copy)
126 @@ -261,7 +261,7 @@
127 clearlists(false);
128 for (int i=0;i<fileList.size();i++) {
129 //align_image_stack can only output tiff files
130 - const char* fname=QFile::encodeName(QString(qtpfsgui_options->tempfilespath + "/aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif")).constData();
131 + char* fname=strdup(QFile::encodeName(QString(qtpfsgui_options->tempfilespath + "/aligned_" + QString("%1").arg(i,4,10,QChar('0'))+".tif")).constData());
132 //qDebug("HCM: Loading back file name=%s", fname);
133 TiffReader reader(fname);
134 //if 8bit ldr tiff
135 @@ -279,6 +279,7 @@
136 listmdrB.push_back(B);
137 }
138 QFile::remove(fname);
139 + free(fname);
140 }
141 QFile::remove(QString(qtpfsgui_options->tempfilespath + "/hugin_debug_optim_results.txt"));
142 emit finishedAligning();
143 Index: trunk/qtpfsgui/src/MainWindow/mainWindow.cpp
144 ===================================================================
145 --- trunk/qtpfsgui/src/MainWindow/mainWindow.cpp (revision 319)
146 +++ trunk/qtpfsgui/src/MainWindow/mainWindow.cpp (working copy)
147 @@ -192,7 +192,8 @@
148 QString fname=(fd->selectedFiles()).at(0);
149 if(!fname.isEmpty()) {
150 QFileInfo qfi(fname);
151 - const char* encodedName=QFile::encodeName(qfi.filePath()).constData();
152 + QString absoluteFileName=qfi.absoluteFilePath();
153 + char* encodedName=strdup(QFile::encodeName(absoluteFileName).constData());
154 // if the new dir, the one just chosen by the user, is different from the one stored in the settings, update the settings.
155 if (RecentDirHDRSetting != qfi.path() )
156 // update internal field variable
157 @@ -219,10 +220,11 @@
158 delete fd;
159 return;
160 }
161 - setCurrentFile(fname);
162 + free(encodedName);
163 + setCurrentFile(absoluteFileName);
164 currenthdr->NeedsSaving=false;
165 - currenthdr->filename=fname;
166 - currenthdr->setWindowTitle(fname);
167 + currenthdr->filename=absoluteFileName;
168 + currenthdr->setWindowTitle(absoluteFileName);
169 }
170 } //if (fd->exec())
171 delete fd;
172
173
174
175 --
176 gentoo-commits@l.g.o mailing list