Tvangeste Цитата: Сборки для Windows и MacOS потому и делаются, что пользователям скомпилировать проект в этих OS не очень просто. Ну и повторюсь, что как раз в типичном случае пользователя Линукса сборка GoldenDict'a тривиальна, требует ровно три команды:
Скачал с помощью приведённой Вами команды git исходники и перенёс их на комп. с GD, несмотря на то, что Вы не ответили на мой вопрос о возможности этого.
Если это произошло не по причине того, что я у Вас "в игноре", то привожу Вам часть с ошибками вывода команды make (опуская подробности вывода команды qmake, которая напоминала, что в системе нет пакета hunspell, и которую пришлось запустить в дебаге, чтобы найти файл, в котором указана выдававшая ошибку отсутствующая опция --dirty, и удалить её оттуда):
Цитата: In file included from main.cc:6:
gdappstyle.hh:7:23: error: QProxyStyle: Нет такого файла или каталога
In file included from ./translatebox.hh:7,
from build/ui_scanpopup.h:26,
from scanpopup.hh:12,
from mainwindow.hh:19,
from main.cc:7:
./extlineedit.hh:9:30: error: QPropertyAnimation: Нет такого файла или каталога
main.cc:25:30: error: QWebSecurityOrigin: Нет такого файла или каталога
In file included from main.cc:6:
gdappstyle.hh:11: error: expected class-name before ‘{ token
gdappstyle.hh:15: error: expected `)' before ‘* token
gdappstyle.hh:16: error: ‘PixelMetric has not been declared
In file included from mainwindow.hh:12,
from main.cc:7:
build/ui_mainwindow.h:316: warning: unused parameter ‘MainWindow
In file included from scanpopup.hh:8,
from mainwindow.hh:19,
from main.cc:7:
articleview.hh: In member function ‘void ArticleView::setZoomFactor(qreal):
articleview.hh:141: error: ‘class ArticleWebView has no member named ‘setZoomFactor
main.cc: In function ‘int main(int, char**):
main.cc:114: error: no matching function for call to ‘QHotkeyApplication::setStyle(GdAppStyle*)
/usr/include/QtGui/qapplication.h:121: note: candidates are: static void QApplication::setStyle(QStyle*)
/usr/include/QtGui/qapplication.h:122: note: static QStyle* QApplication::setStyle(const QString&)
make: *** [build/main.o] Ошибка 1
Можете дать пруфлинк на эти исходники?
[more=А вот что бывает, когда простому пользователю предлагается заниматься компиляцией...]
Сменил:
QProxyStyle на QMotifStyle
QPropertyAnimation на QGraphicsItemAnimation
QWebSecurityOrigin на qwebkitglobal.h
Убрал:
void setZoomFactor( qreal factor )
{ ui.definition->setZoomFactor( factor ); }
Получил:
Цитата: In file included from mainwindow.hh:12,
from mainwindow.cc:4:
build/ui_mainwindow.h:316: warning: unused parameter ‘MainWindow
mainwindow.cc: In constructor ‘MainWindow::MainWindow(Config::Class&):
mainwindow.cc:518: error: ‘class MainTabWidget has no member named ‘setDocumentMode
mainwindow.cc: In member function ‘ArticleView* MainWindow::createNewTab(bool, const QString&):
mainwindow.cc:1371: error: ‘class ArticleView has no member named ‘setZoomFactor
mainwindow.cc: In member function ‘virtual bool MainWindow::eventFilter(QObject*, QEvent*):
mainwindow.cc:2084: error: ‘InsertParagraphSeparator is not a member of ‘QKeySequence
mainwindow.cc: In member function ‘void MainWindow::applyZoomFactor():
mainwindow.cc:3007: error: ‘class ArticleView has no member named ‘setZoomFactor
make: *** [build/mainwindow.o] Ошибка 1
Убрал:
ui.tabWidget->setDocumentMode( true );
view->setZoomFactor( cfg.preferences.zoomFactor );
if ( keyEvent->matches( QKeySequence::InsertParagraphSeparator ) &&
wordList->selectedItems().size() )
{
if ( cfg.preferences.searchInDock )
{
if ( ui.searchPane->isFloating() )
activateWindow();
}
getCurrentArticleView()->focus();
return cfg.preferences.searchInDock;
}
view.setZoomFactor( cfg.preferences.zoomFactor );
Получил:
Цитата: scanpopup.cc: In member function ‘void ScanPopup::applyZoomFactor():
scanpopup.cc:284: error: ‘class ArticleView has no member named ‘setZoomFactor
make: *** [build/scanpopup.o] Ошибка 1
Убрал:
definition->setZoomFactor( cfg.preferences.zoomFactor );
Получил:
Цитата: articleview.cc:21:23: error: QWebElement: Нет такого файла или каталога
articleview.cc: In constructor ‘ArticleView::ArticleView(QWidget*, ArticleNetworkAccessManager&, const std::vector<sptr<Dictionary::Class>, std::allocator<sptr<Dictionary::Class> > >&, const Instances::Groups&, bool, const Config::Class&, QAction*, const GroupComboBox*):
articleview.cc:114: error: ‘SelectAll is not a member of ‘QWebPage
articleview.cc: In member function ‘void ArticleView::loadFinished(bool):
articleview.cc:319: error: ‘class QWebHistoryItem has no member named ‘userData
articleview.cc: In member function ‘void ArticleView::setCurrentArticle(const QString&, bool):
articleview.cc:454: error: ‘class QWebHistoryItem has no member named ‘userData
articleview.cc:456: error: ‘class QWebHistoryItem has no member named ‘setUserData
articleview.cc: In member function ‘void ArticleView::saveHistoryUserData():
articleview.cc:549: error: ‘class QWebHistoryItem has no member named ‘userData
articleview.cc:561: error: ‘class QWebHistoryItem has no member named ‘setUserData
articleview.cc: In member function ‘bool ArticleView::canGoBack():
articleview.cc:1242: error: ‘class QWebHistory has no member named ‘currentItemIndex
articleview.cc: In member function ‘void ArticleView::contextMenuRequested(const QPoint&):
articleview.cc:1356: error: ‘QWebElement was not declared in this scope
articleview.cc:1356: error: expected `;' before ‘el
articleview.cc:1358: error: ‘el was not declared in this scope
articleview.cc:1446: error: ‘SelectAll is not a member of ‘QWebPage
articleview.cc: In member function ‘void ArticleView::resourceDownloadFinished():
articleview.cc:1635: error: no matching function for call to ‘QByteArray::append(const char*, size_t)
/usr/include/QtCore/qbytearray.h:210: note: candidates are: QByteArray& QByteArray::append(char)
/usr/include/QtCore/qbytearray.h:211: note: QByteArray& QByteArray::append(const char*)
/usr/include/QtCore/qbytearray.h:212: note: QByteArray& QByteArray::append(const QByteArray&)
/usr/include/QtCore/qstring.h:939: note: QByteArray& QByteArray::append(const QString&)
articleview.cc:1641: error: ‘class Phonon::MediaObject has no member named ‘clear
articleview.cc: In member function ‘void ArticleView::performFindOperation(bool, bool, bool):
articleview.cc:1888: error: ‘HighlightAllOccurrences is not a member of ‘QWebPage
make: *** [build/articleview.o] Ошибка 1
Сменил:
QWebElement на QWebFrame
QWebPage::SelectAll на QWebPage::SelectEndOfDocument
AudioPlayer::instance().object.clear() на AudioPlayer::instance().object.clearQueue()
Убрал:
QVariant userDataVariant = ui.definition->history()->currentItem().userData();
if ( userDataVariant.type() == QVariant::Map )
{
QMap< QString, QVariant > userData = userDataVariant.toMap();
QString currentArticle = userData.value( "currentArticle" ).toString();
if ( currentArticle.size() )
{
// There's an active article saved, so set it to be active.
setCurrentArticle( currentArticle );
}
double sx = 0, sy = 0;
if ( userData.value( "sx" ).type() == QVariant::Double )
sx = userData.value( "sx" ).toDouble();
if ( userData.value( "sy" ).type() == QVariant::Double )
sy = userData.value( "sy" ).toDouble();
if ( sx != 0 || sy != 0 )
{
// Restore scroll position
ui.definition->page()->mainFrame()->evaluateJavaScript(
QString( "window.scroll( %1, %2 );" ).arg( sx ).arg( sy ) );
}
}
else
if ( url.queryItemValue( "scrollto" ).startsWith( "gdfrom-" ) )
{
// There is no active article saved in history, but we have it as a parameter.
// setCurrentArticle will save it and scroll there.
setCurrentArticle( url.queryItemValue( "scrollto" ), true );
}
QMap< QString, QVariant > userData = ui.definition->history()->
currentItem().userData().toMap();
userData[ "currentArticle" ] = id;
ui.definition->history()->currentItem().setUserData( userData );
QMap< QString, QVariant > userData = ui.definition->history()->
currentItem().userData().toMap();
// Save current article, which can be empty
userData[ "currentArticle" ] = getCurrentArticle();
// We also save window position. We restore it when the page is fully loaded,
// when any hidden frames are expanded.
userData[ "sx" ] = ui.definition->page()->mainFrame()->evaluateJavaScript( "window.scrollX;" ).toDouble();
userData[ "sy" ] = ui.definition->page()->mainFrame()->evaluateJavaScript( "window.scrollY;" ).toDouble();
ui.definition->history()->currentItem().setUserData( userData );
return ui.definition->history()->currentItemIndex() > 1;
QWebElement el = r.element();
if( !popupView && el.tagName().compare( "img", Qt::CaseInsensitive ) == 0 )
{
imageUrl = QUrl::fromPercentEncoding( el.attribute( "src" ).toLatin1() );
if( !imageUrl.isEmpty() )
{
saveImageAction = new QAction( tr( "Save &image..." ), &menu );
menu.addAction( saveImageAction );
}
}
, data.size()
f |= QWebPage::HighlightAllOccurrences;
Получил:
Цитата: hunspell.cc:19:33: error: hunspell/hunspell.hxx: Нет такого файла или каталога
hunspell.cc:35: error: ‘Hunspell does not name a type
hunspell.cc: In constructor ‘HunspellMorpho::<unnamed>::HunspellDictionary::HunspellDictionary(const std::string&, const std::string&, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&):
hunspell.cc:44: error: class ‘HunspellMorpho::<unnamed>::HunspellDictionary does not have any field named ‘hunspell
hunspell.cc: At global scope:
hunspell.cc:93: error: ‘Hunspell was not declared in this scope
hunspell.cc:93: error: expected primary-expression before ‘, token
hunspell.cc:93: error: expected primary-expression before ‘const
hunspell.cc:97: error: ‘Hunspell was not declared in this scope
hunspell.cc:97: error: expected primary-expression before ‘, token
hunspell.cc:97: error: expected primary-expression before ‘char
hunspell.cc:160: error: ISO C++ forbids declaration of ‘Hunspell with no type
hunspell.cc:160: error: expected ‘; before ‘& token
hunspell.cc:170: error: ‘Hunspell has not been declared
hunspell.cc: In constructor ‘HunspellMorpho::<unnamed>::HunspellArticleRequest::HunspellArticleRequest(const std::wstring&, Mutex&, int&):
hunspell.cc:172: error: class ‘HunspellMorpho::<unnamed>::HunspellArticleRequest does not have any field named ‘hunspell
hunspell.cc: In member function ‘void HunspellMorpho::<unnamed>::HunspellArticleRequest::run():
hunspell.cc:223: error: ‘hunspell was not declared in this scope
hunspell.cc:288: error: ‘hunspell was not declared in this scope
hunspell.cc: In member function ‘virtual sptr<Dictionary::DataRequest> HunspellMorpho::<unnamed>::HunspellDictionary::getArticle(const std::wstring&, const std::vector<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >&, const std::wstring&):
hunspell.cc:299: error: ‘hunspell was not declared in this scope
hunspell.cc: At global scope:
hunspell.cc:331: error: ISO C++ forbids declaration of ‘Hunspell with no type
hunspell.cc:331: error: expected ‘; before ‘& token
hunspell.cc:341: error: ‘Hunspell has not been declared
hunspell.cc: In constructor ‘HunspellMorpho::<unnamed>::HunspellHeadwordsRequest::HunspellHeadwordsRequest(const std::wstring&, Mutex&, int&):
hunspell.cc:343: error: class ‘HunspellMorpho::<unnamed>::HunspellHeadwordsRequest does not have any field named ‘hunspell
hunspell.cc: In member function ‘QVector<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > HunspellMorpho::<unnamed>::HunspellHeadwordsRequest::suggest(std::wstring&):
hunspell.cc:471: error: ‘hunspell was not declared in this scope
hunspell.cc:517: error: ‘hunspell was not declared in this scope
hunspell.cc: In member function ‘virtual sptr<Dictionary::WordSearchRequest> HunspellMorpho::<unnamed>::HunspellDictionary::findHeadwordsForSynonym(const std::wstring&):
hunspell.cc:527: error: ‘hunspell was not declared in this scope
hunspell.cc: At global scope:
hunspell.cc:560: error: ISO C++ forbids declaration of ‘Hunspell with no type
hunspell.cc:560: error: expected ‘; before ‘& token
hunspell.cc:570: error: ‘Hunspell has not been declared
hunspell.cc: In constructor ‘HunspellMorpho::<unnamed>::HunspellPrefixMatchRequest::HunspellPrefixMatchRequest(const std::wstring&, Mutex&, int&):
hunspell.cc:572: error: class ‘HunspellMorpho::<unnamed>::HunspellPrefixMatchRequest does not have any field named ‘hunspell
hunspell.cc: In member function ‘void HunspellMorpho::<unnamed>::HunspellPrefixMatchRequest::run():
hunspell.cc:619: error: ‘hunspell was not declared in this scope
hunspell.cc: In member function ‘virtual sptr<Dictionary::WordSearchRequest> HunspellMorpho::<unnamed>::HunspellDictionary::prefixMatch(const std::wstring&, long unsigned int):
hunspell.cc:642: error: ‘hunspell was not declared in this scope
hunspell.cc: At global scope:
hunspell.cc:646: error: redefinition of ‘std::string HunspellMorpho::<unnamed>::encodeToHunspell
hunspell.cc:93: error: ‘std::string HunspellMorpho::<unnamed>::encodeToHunspell previously declared here
hunspell.cc:646: error: ‘Hunspell was not declared in this scope
hunspell.cc:646: error: ‘hunspell was not declared in this scope
hunspell.cc:646: error: expected primary-expression before ‘const
hunspell.cc:666: error: redefinition of ‘std::wstring HunspellMorpho::<unnamed>::decodeFromHunspell
hunspell.cc:97: error: ‘std::wstring HunspellMorpho::<unnamed>::decodeFromHunspell previously declared here
hunspell.cc:666: error: ‘Hunspell was not declared in this scope
hunspell.cc:666: error: ‘hunspell was not declared in this scope
hunspell.cc:666: error: expected primary-expression before ‘char
make: *** [build/hunspell.o] Ошибка 1
Убрал:
#include <hunspell/hunspell.hxx>
,
hunspell( files[ 0 ].c_str(), files[ 1 ].c_str() )
/// Encodes the given string to be passed to the hunspell object. May throw
/// Iconv::Ex
string encodeToHunspell( Hunspell &, wstring const & );
/// Decodes the given string returned by the hunspell object. May throw
/// Iconv::Ex
wstring decodeFromHunspell( Hunspell &, char const * );
Hunspell & hunspell;
HunspellArticleRequest( wstring const & word_,
Mutex & hunspellMutex_,
Hunspell & hunspell_ ):
hunspellMutex( hunspellMutex_ ),
hunspell( hunspell_ ),
word( word_ )
{
QThreadPool::globalInstance()->start(
new HunspellArticleRequestRunnable( *this, hasExited ) );
}
string encodedWord = encodeToHunspell( hunspell, trimmedWord );
if ( hunspell.spell( encodedWord.c_str() ) )
{
// Good word -- no spelling suggestions then.
finish();
return;
}
suggestionsCount = hunspell.suggest( &suggestions, encodedWord.c_str() );
if ( suggestionsCount )
{
// There were some suggestions made for us. Make an appropriate output.
string result = "<div class=\"gdspellsuggestion\">" +
Html::escape( QCoreApplication::translate( "Hunspell", "Spelling suggestions: " ).toUtf8().data() );
wstring lowercasedWord = Folding::applySimpleCaseOnly( word );
for( int x = 0; x < suggestionsCount; ++x )
{
wstring suggestion = decodeFromHunspell( hunspell, suggestions[ x ] );
if ( Folding::applySimpleCaseOnly( suggestion ) == lowercasedWord )
{
// If among suggestions we see the same word just with the different
// case, we botch the search -- our searches are case-insensitive, and
// there's no need for suggestions on a good word.
finish();
hunspell.free_list( &suggestions, suggestionsCount );
return;
}
string suggestionUtf8 = Utf8::encode( suggestion );
result += "<a href=\"bword:";
result += Html::escape( suggestionUtf8 ) + "\">";
result += Html::escape( suggestionUtf8 ) + "</a>";
if ( x != suggestionsCount - 1 )
result += ", ";
}
result += "</div>";
Mutex::Lock _( dataMutex );
data.resize( result.size() );
memcpy( &data.front(), result.data(), result.size() );
hasAnyData = true;
}
hunspell.free_list( &suggestions, suggestionsCount );
return new HunspellArticleRequest( word, getHunspellMutex(), hunspell );
Hunspell & hunspell;
HunspellHeadwordsRequest( wstring const & word_,
Mutex & hunspellMutex_,
Hunspell & hunspell_ ):
hunspellMutex( hunspellMutex_ ),
hunspell( hunspell_ ),
word( word_ )
{
QThreadPool::globalInstance()->start(
new HunspellHeadwordsRequestRunnable( *this, hasExited ) );
}
string encodedWord = encodeToHunspell( hunspell, word );
suggestionsCount = hunspell.analyze( &suggestions, encodedWord.c_str() );
if ( suggestionsCount )
{
// There were some suggestions made for us. Make an appropriate output.
wstring lowercasedWord = Folding::applySimpleCaseOnly( word );
static QRegExp cutStem( "^\\s*st
((\\s+(?!\\w{2}
)|\\S+)+)" );
for( int x = 0; x < suggestionsCount; ++x )
{
QString suggestion = gd::toQString( decodeFromHunspell( hunspell, suggestions[ x ] ) );
DPRINTF( ">>>Sugg: %s\n", suggestion.toLocal8Bit().data() );
if ( cutStem.indexIn( suggestion ) != -1 )
{
wstring alt = gd::toWString( cutStem.cap( 1 ) );
if ( Folding::applySimpleCaseOnly( alt ) != lowercasedWord ) // No point in providing same word
{
DPRINTF( ">>>>>Alt: %ls\n",
#ifdef Q_OS_WIN
gd::toQString( alt ).toStdWString().c_str()
#else
alt.c_str()
#endif
);
result.append( alt );
}
}
}
}
hunspell.free_list( &suggestions, suggestionsCount );
return new HunspellHeadwordsRequest( word, getHunspellMutex(), hunspell );
Hunspell & hunspell;
wstring word;
QAtomicInt isCancelled;
QSemaphore hasExited;
public:
HunspellPrefixMatchRequest( wstring const & word_,
Mutex & hunspellMutex_,
Hunspell & hunspell_ ):
hunspellMutex( hunspellMutex_ ),
hunspell( hunspell_ ),
word( word_ )
{
QThreadPool::globalInstance()->start(
new HunspellPrefixMatchRequestRunnable( *this, hasExited ) );
}
Hunspell & hunspell;
HunspellPrefixMatchRequest( wstring const & word_,
Mutex & hunspellMutex_,
Hunspell & hunspell_ ):
hunspellMutex( hunspellMutex_ ),
hunspell( hunspell_ ),
word( word_ )
{
QThreadPool::globalInstance()->start(
new HunspellPrefixMatchRequestRunnable( *this, hasExited ) );
}
string encodedWord = encodeToHunspell( hunspell, trimmedWord );
if ( hunspell.spell( encodedWord.c_str() ) )
{
// Known word -- add it to the result
Mutex::Lock _( dataMutex );
matches.push_back( WordMatch( trimmedWord, 1 ) );
}
return new HunspellPrefixMatchRequest( word, getHunspellMutex(), hunspell );
string encodeToHunspell( Hunspell & hunspell, wstring const & str )
{
Iconv conv( hunspell.get_dic_encoding(), Iconv::GdWchar );
void const * in = str.data();
size_t inLeft = str.size() * sizeof( wchar );
vector< char > result( str.size() * 4 + 1 ); // +1 isn't actually needed,
// but then iconv complains on empty
// words
void * out = &result.front();
size_t outLeft = result.size();
if ( conv.convert( in, inLeft, out, outLeft ) != Iconv::Success )
throw Iconv::Ex();
return string( &result.front(), result.size() - outLeft );
}
wstring decodeFromHunspell( Hunspell & hunspell, char const * str )
{
Iconv conv( Iconv::GdWchar, hunspell.get_dic_encoding() );
void const * in = str;
size_t inLeft = strlen( str );
vector< wchar > result( inLeft + 1 ); // +1 isn't needed, but see above
void * out = &result.front();
size_t outLeft = result.size() * sizeof( wchar );
if ( conv.convert( in, inLeft, out, outLeft ) != Iconv::Success )
throw Iconv::Ex();
return wstring( &result.front(), result.size() - outLeft/sizeof( wchar ) );
}
Получил:
Цитата: dictionarybar.cc: In member function ‘void DictionaryBar::setDictionaries(const std::vector<sptr<Dictionary::Class>, std::allocator<sptr<Dictionary::Class> > >&):
dictionarybar.cc:78: error: ‘class QIcon has no member named ‘availableSizes
make: *** [build/dictionarybar.o] Ошибка 1
Убрал:
QList< QSize > sizes = icon.availableSizes();
for( QList< QSize >::iterator i = sizes.begin(); i != sizes.end();
++i )
if ( i->width() == 14 && i->height() == 21 )
Получил:
Цитата: articlewebview.cc: In member function ‘virtual void ArticleWebView::mouseDoubleClickEvent(QMouseEvent*):
articlewebview.cc:38: error: ‘class QWebFrame has no member named ‘scrollBarGeometry
articlewebview.cc:39: error: ‘class QWebFrame has no member named ‘scrollBarGeometry
make: *** [build/articlewebview.o] Ошибка 1
Убрал:
int scrollBarWidth = page()->mainFrame()->scrollBarGeometry( Qt::Vertical ).width();
int scrollBarHeight = page()->mainFrame()->scrollBarGeometry( Qt::Horizontal ).height();
// emit the signal only if we are not double-clicking on scrollbars
if ( ( event->x() < width() - scrollBarWidth ) &&
( event->y() < height() - scrollBarHeight ) )
Получил:
Цитата: maintabwidget.cc: In member function ‘virtual bool MainTabWidget::eventFilter(QObject*, QEvent*):
maintabwidget.cc:68: error: ‘MiddleButton is not a member of ‘Qt
maintabwidget.cc:70: error: ‘tabCloseRequested was not declared in this scope
make: *** [build/maintabwidget.o] Ошибка 1
Убрал:
if( mev->button() == Qt::MiddleButton )
{
emit tabCloseRequested( tabBar()->tabAt( mev->pos() ) );
return true;
}
Получил:
Цитата: gdappstyle.cc:11: error: expected `)' before ‘* token
gdappstyle.cc: In member function ‘virtual int GdAppStyle::pixelMetric(QStyle::PixelMetric, const QStyleOption*, const QWidget*) const:
gdappstyle.cc:15: error: ‘QProxyStyle has not been declared
make: *** [build/gdappstyle.o] Ошибка 1
Сменил:
QProxyStyle на QMotifStyle
Получил:
Цитата: xdxf.cc: In function ‘void Xdxf::<unnamed>::addAllKeyTags(QXmlStreamReader&, std::list<QString, std::allocator<QString> >&):
xdxf.cc:684: error: ‘SkipChildElements is not a member of ‘QXmlStreamReader
xdxf.cc: In function ‘std::vector<sptr<Dictionary::Class>, std::allocator<sptr<Dictionary::Class> > > Xdxf::makeDictionaries(const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const std::string&, Dictionary::Initializing&):
xdxf.cc:1148: error: ‘SkipChildElements is not a member of ‘QXmlStreamReader
xdxf.cc:1153: error: ‘SkipChildElements is not a member of ‘QXmlStreamReader
make: *** [build/xdxf.o] Ошибка 1
Удалил везде QXmlStreamReader::SkipChildElements
Получил:
Цитата: decompress.cc: In function ‘QByteArray zlibDecompress(const char*, unsigned int):
decompress.cc:26: error: no matching function for call to ‘QByteArray::append(char [2048], unsigned int)
/usr/include/QtCore/qbytearray.h:210: note: candidates are: QByteArray& QByteArray::append(char)
/usr/include/QtCore/qbytearray.h:211: note: QByteArray& QByteArray::append(const char*)
/usr/include/QtCore/qbytearray.h:212: note: QByteArray& QByteArray::append(const QByteArray&)
/usr/include/QtCore/qbytearray.h:233: note: QByteArray& QByteArray::append(const QString&)
make: *** [build/decompress.o] Ошибка 1
Удалил:
, CHUNK_SIZE - zs.avail_out
Получил:
Цитата: extlineedit.cc: In member function ‘void ExtLineEdit::updateMargins():
extlineedit.cc:98: error: ‘QMargins was not declared in this scope
extlineedit.cc:98: error: expected `;' before ‘margins
extlineedit.cc:101: error: ‘margins was not declared in this scope
extlineedit.cc:101: error: ‘setTextMargins was not declared in this scope
extlineedit.cc:95: warning: unused variable ‘leftMargin
extlineedit.cc:96: warning: unused variable ‘rightMargin
extlineedit.cc: In member function ‘void ExtLineEdit::updateButtonPositions():
extlineedit.cc:113: error: ‘textMargins was not declared in this scope
extlineedit.cc:116: error: ‘textMargins was not declared in this scope
extlineedit.cc: In member function ‘void IconButton::animate(bool):
extlineedit.cc:175: error: ‘QPropertyAnimation was not declared in this scope
extlineedit.cc:175: error: ‘animation was not declared in this scope
extlineedit.cc:175: error: expected type-specifier before ‘QPropertyAnimation
extlineedit.cc:175: error: expected `;' before ‘QPropertyAnimation
extlineedit.cc:185: error: ‘QAbstractAnimation has not been declared
make: *** [build/extlineedit.o] Ошибка 1
Убрал:
int leftMargin = iconButtons[realLeft]->pixmap().width() + 8;
int rightMargin = iconButtons[realRight]->pixmap().width() + 8;
QMargins margins((iconEnabled[realLeft] ? leftMargin : 0), 1,
(iconEnabled[realRight] ? rightMargin : 0), 1);
setTextMargins(margins);
for (int i = 0; i < 2; ++i) {
Side iconPos = (Side)i;
if (layoutDirection() == Qt::RightToLeft)
iconPos = (iconPos == Left ? Right : Left);
if (iconPos == ExtLineEdit::Right) {
const int iconoffset = textMargins().right() + 4;
iconButtons[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));
} else {
const int iconoffset = textMargins().left() + 4;
iconButtons[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));
}
}
QPropertyAnimation *animation = new QPropertyAnimation(this, "opacity");
animation->setDuration(250);
if (visible)
{
animation->setEndValue(1.0);
}
else
{
animation->setEndValue(0.0);
}
animation->start(QAbstractAnimation::DeleteWhenStopped);
Получил:
Цитата: mdictparser.cc:24:23: error: lzo/lzo1x.h: Нет такого файла или каталога
mdictparser.cc: In static member function ‘static bool Mdict::MdictParser::parseCompressedBlock(size_t, const char*, size_t, QByteArray&):
mdictparser.cc:275: error: ‘lzo_uint was not declared in this scope
mdictparser.cc:275: error: expected `;' before ‘blockSize
mdictparser.cc:276: error: ‘blockSize was not declared in this scope
mdictparser.cc:278: error: ‘lzo1x_decompress_safe was not declared in this scope
mdictparser.cc:280: error: ‘LZO_E_OK was not declared in this scope
mdictparser.cc:286: error: ‘lzo_adler32 was not declared in this scope
mdictparser.cc:288: error: ‘lzo_adler32 was not declared in this scope
mdictparser.cc:288: error: declaration of ‘<typeprefixerror>lzo_adler32
mdictparser.cc:286: error: conflicts with previous declaration ‘<typeprefixerror>lzo_adler32
make: *** [build/mdictparser.o] Ошибка 1
Сменил:
lzo/lzo1x.h на maclibs/include/lzo/lzo1x.h
Получил:
Цитата: mdx.cc: In member function ‘void Mdx::MddResourceRequest::run():
mdx.cc:673: error: ‘replace is not a member of ‘std
make: *** [build/mdx.o] Ошибка 1
Убрал:
std::replace( resourceName.begin(), resourceName.end(), '/', '\\' );
Получил:
Цитата: /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -llzo2
collect2: ld returned 1 exit status
make: *** [goldendict] Ошибка 1
Убрал:
-llzo2
Получил:
Цитата: build/mdictparser.o: In function `Mdict::MdictParser::parseCompressedBlock(unsigned long, char const*, unsigned long, QByteArray&)':
/tmp/DICTIONS/goldendict/mdictparser.cc:278: undefined reference to `lzo1x_decompress_safe'
/tmp/DICTIONS/goldendict/mdictparser.cc:286: undefined reference to `lzo_adler32'
/tmp/DICTIONS/goldendict/mdictparser.cc:286: undefined reference to `lzo_adler32'
collect2: ld returned 1 exit status
make: *** [goldendict] Ошибка 1
Убрал:
result = lzo1x_decompress_safe( ( const uchar * )dataPtr, dataSize,
( uchar * )decompressedBlock.data(), &blockSize, NULL );
if ( result != LZO_E_OK || blockSize != decompressedBlockSize )
{
qWarning() << "MDict: parseCompressedBlock: decompression failed";
return false;
}
if ( checksum != lzo_adler32( lzo_adler32( 0, NULL, 0 ),
( const uchar * )decompressedBlock.constData(),
blockSize ) )
{
qWarning() << "MDict: parseCompressedBlock: lzo: checksum not match";
return false;
}
Запустил:
./goldendict
Получил:
Цитата: Ошибка сегментирования
[/more]
А под Линукс сборки так и нет. А когда из тестирования под какими-либо предлогами исключается основная целевая аудитория, то задача завоевания популярности очень осложняется...
Добавлено: ddddddima Цитата: У Вас супер компьютер? или у пользователей руборда?
Я же писал, что просто, когда статистика не может быть дутой, то картина резко меняется. Для примера можете поискать статистику по ОС на планшетах и смартфонах. Здесь, конечно, такой 100% точности, как для топ500 быть не может, но, тем не менее, она столь далёкой от истины, как статистика по десктопам (особенно, если иметь в виду не продажи, а конечные установки), быть не может. И здесь лидер Android/Linux...